# how to detect when an external process starts a stream?

**URL:** <https://community.wowza.com/t/how-to-detect-when-an-external-process-starts-a-stream/41686>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [February 24, 2014, 3:06pm UTC](https://community.wowza.com/t/how-to-detect-when-an-external-process-starts-a-stream/41686 "2014-02-24T15:06:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Taras\_K](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@Taras\_K](https://community.wowza.com/u/Taras_K)\
**Post date:** [February 24, 2014, 3:06pm UTC](https://community.wowza.com/t/how-to-detect-when-an-external-process-starts-a-stream/41686/1 "2014-02-24T15:06:35Z")

</div>

Hi all:

I am using ffmpeg to generate streams, then pushing those streams to wowza. I was hoping to use the IMediaStreamActionNotify3 class’ onPublish method to detect when the generated stream were ready. However, it seems like ffmpeg creates the stream too soon, sometimes several seconds before there is any data being streamed.

Is there any way to detect when a stream both exists AND is streaming data?

Thanks,

Taras.

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [February 24, 2014, 4:51pm UTC](https://community.wowza.com/t/how-to-detect-when-an-external-process-starts-a-stream/41686/2 "2014-02-24T16:51:25Z")

</div>

Hi Taras.

If you are streaming true live streams you can use this module to look at when there are packets available:

[How to monitor live streams using IMediaStreamActionNotify2](https://www.wowza.com/docs/how-to-use-imediastreamactionnotify2-to-monitor-live-streams-modulestreamwatchdog)

If you are streaming a file as live streams you may want to consider using this scheduler:

[How to do scheduled streaming with Stream class streams](https://www.wowza.com/docs/how-to-schedule-streaming-with-wowza-streaming-engine-streampublisher)

Salvadore
