Wowza Community

Is it possible to generate a .stream file using a http get request?

Is it possible to generate a .stream file using a http get request?

for example:

http://[wowza-ip-address]:8086/someinterface?streamname=mynewstreamfile.stream&application=live&restreamurl=rtmp://someotherserver:1935/live/_definst_/streamName

I would like a new file called mynewstreamfile.stream to be generated under ‘\content’ or ‘\content\live’ having the content:

rtmp://someotherserver:1935/live/_definst_/streamName

thanks

Hi,

There isn’t a http request that will do that, but you can simply create a .stream file in the content folder which contains the URL required.

Then if you what to automatically start that stream after the file is created you can use this method.

Daren

Hi,

There isn’t a complete tutorial as such, but there are several examples here that can provide good starting points.

Daren

Thank you for sharing your findings here.

Salvadore

Thanks for your reply,

Actually, in my application the addresses (in the .stream file) are changing constantly and should be created for each user and deleted when user logs out.

I guess I would need to create a custom httpprovider (for each wowza instance) which generates .stream files on demand.

Is there a good tutorial for creating or extending httpprovider?

I’m using Wowza Streaming Engine 4

thanks!

Amir

There is a way:

examples taken from here in the Stream Management section:

https://www.wowza.com/docs/how-to-use-curl-to-query-wowza-rest-api

Get a list of stream files

curl -X GET --header ‘Accept:application/json; charset=utf-8’ http://localhost:8087/v2/servers/defaultServer/vhosts/defaultVHost/applications/testlive/streamfiles

Add a stream file

curl -X POST --header ‘Accept:application/json; charset=utf-8’ --header ‘Content-type:application/json; charset=utf-8’ http://localhost:8087/v2/servers/defaultServer/vhosts/defaultVHost/applications/testlive/streamfiles/axis -d’

{

“restURI”: “http://localhost:8087/v2/servers/defaultServer/vhosts/defaultVHost/applications/testlive/streamfiles”,

“streamFiles”: [

{

“id”: “connectAppName= testlive&appInstance=definst&mediaCasterType=rtp”,

“href”: “http://localhohst:8087/v2/servers/defaultServer/vhosts/defaultVHost/applications/testlive/streamfiles/connectAppName=testlive&appInstance=definst&mediaCasterType=rtp”

}

]

}’

Connect a stream file

curl -X PUT --header ‘Accept:application/json; charset=utf-8’ --header ‘Content-type:application/json; charset=utf-8’ “http://localhost:8087/v2/servers/defaultServer/vhosts/defaultVHost/streamfiles/metallica/actions/connect?connectAppName=testlive&appInstance=definst&mediaCasterType=rtp”

Remove a stream file

curl -X DELETE --header ‘Accept:application/json; charset=utf-8’ http://localhost:8087/v2/servers/defaultServer/vhosts/defaultVHost/applications/testlive/streamfiles/axis