# Reading stream file status using getStreams().getStream()

**URL:** <https://community.wowza.com/t/reading-stream-file-status-using-getstreams-getstream/44573>\
**Category:** Wowza Streaming Engine\
**Created:** [February 25, 2015, 9:50am UTC](https://community.wowza.com/t/reading-stream-file-status-using-getstreams-getstream/44573 "2015-02-25T09:50:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shrinivas\_shastri](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@shrinivas\_shastri](https://community.wowza.com/u/shrinivas_shastri)\
**Post date:** [February 25, 2015, 9:50am UTC](https://community.wowza.com/t/reading-stream-file-status-using-getstreams-getstream/44573/1 "2015-02-25T09:50:01Z")

</div>

Hi,

I want to get the status of a stream file running/not running from client application. I have modified the package given in the forum [[https://www.wowza.com/docs/how-to-add-a-web-service-interface-to-wowza-media-server-and-integrate-with-net-dotnet](https://www.wowza.com/docs/how-to-add-a-web-service-interface-to-wowza-media-server-and-integrate-with-net-dotnet) and added another method that uses the code below:

IMediaStream mediaStream = appInstance.getStreams().getStream(streamName);

if(mediaStream != null)

{

isRunning = mediaStream.isPlaying();

if(isRunning)

status = “Stream is running”;

else

status = “Stream is not running”;

}

else

status = “Stream name not found”;

Problem: When the stream is stopped, it returns “Stream name not found”. I expected it to return “Stream is not running” assuming stream file exists in the system but not running at the moment and “Stream not found” should be returned when I pass an invalid stream file name that doesn’t exist in the system. Does it mean the getStreams() will only return file names that are live and NOT all the stream files present in the system? Which API or property can I use to solve it?

Thanks,

Shrini

---

<div class="post-metadata">

**Author:** ![Andrew\_Kennedy1](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@Andrew\_Kennedy1](https://community.wowza.com/u/Andrew_Kennedy1)\
**Post date:** [March 7, 2015, 12:06am UTC](https://community.wowza.com/t/reading-stream-file-status-using-getstreams-getstream/44573/2 "2015-03-07T00:06:01Z")

</div>

Hi,

You are looking at the running streams for the application instance so

appInstance.getStreams()

So when there is no stream matching the name provided the object mediaStream is null.

Wowza does not keep track of stream files not in use but you should be able to get a list using the storage directory for the appInstance, if you then call getStreams, to return all the currently running streams you can compare the two to get those that are running and those that are not.

Andrew

---

<div class="post-metadata">

**Author:** ![HANFI\_NOOR](https://avatars.discourse-cdn.com/v4/letter/h/b2d939/32.png) [@HANFI\_NOOR](https://community.wowza.com/u/HANFI_NOOR)\
**Post date:** [March 20, 2015, 5:49am UTC](https://community.wowza.com/t/reading-stream-file-status-using-getstreams-getstream/44573/3 "2015-03-20T05:49:37Z")

</div>

What is the parameter for mpeg dash?

[solitaire games](http://www.solitairechamp.net)

dashUserHTTPHeaders?
