Hello,
I have a server that acts as origin/balancer and multiple servers that act as edges. I now have a requirement to deliver HLS to iOS clients. I am guessing I have to use the Transcoder AddOn. My questions are:
I know at least for RTMP, the client flash player receives a redirect to the least loaded edge. For HLS, how will this work with the balancer? More specifically, how will the IOS client be notified as to which edge it needs to connect to receive HLS stream?
All I know about HLS protocol is that it breaks apart the video into .ts files and clients loads m3u8 to play the .ts chunks over HTTP. How does Wowza deliver HLS in a origin/balancer, edge setup?
Thanks in advance.
No, Transcoder is not required. Take a look at this guide:
https://www.wowza.com/docs/how-to-configure-a-live-stream-repeater
Note that the standard LiveStreamPacketizers that are used on the origin, but there are repeater packetizers that are used on the edge. Also, you can remove packetizers that you are not going to use. In your case you only need cupertinostreamingpacketizer on the origin and cupertinostreamingrepeater on the edge.
Wowza has a load balancer:
https://www.wowza.com/docs/how-to-get-dynamic-load-balancing-addon
You will use the HTTP method of get “least loaded server”. You have to do this either in your application server as you form the html for a client, or you can do it with javascript XMLHTTPRequest in the browser.
Richard
Is mpegts.stream the name of a stream started on the origin? And are you using the method of specify an origin application with rtmp url in conf/liveedge/Application.xml /originURL ?
If so, I think the .stream file in this context might be a problem. Do this instead, create a .stream file on the edge, name it origin.stream and make the contents the actual origin stream name, which is full rtmp url to the origin application + stream name
Edge File: /contents/origin.stream
Contents: rtmp://[wowza-origin-address]:1935/liveorigin/mpegts.stream
You can check the chunklist in any browser, this will download a file:
http://[wowza-edge-ip]:1935/liveedge/mpegts.stream/chunklist.m3u8
Richard
What live encoder are you using? What is the audio and video codec? Are you starting the stream in StreamManager on the origin?
If you still don’t have this working we can take a look. First, stop the origin and edge and rename or delete the current access log in both. Then re-start both the origin and edge. Then start the encoder and start the stream on the origin in StreamManager. Then test playback in iOS on the edge.
Then zip up and send the conf and logs folder for the origin, and separately the conf and logs folders from the edge to support@wowza.com. The logs folders only needs to contain the current access and error log that show the testing.’
Include a link to this thread for reference
Richard
Also, send the .stream files you are using.
Check them to see if there is .txt extension. That is a common cause of problem.
Richard
The application named “live” should use StreamType “liverepeater-edge”. For rtmp playback, if the origin stream is working, that should be all you need to play public.stream if contains the rtmp url to the origin stream, as you have shown. What happens when you try? Make sure it is not named public.stream.txt
This is the basic guide for Live Repeater:
https://www.wowza.com/docs/how-to-configure-a-live-stream-repeater
Richard
OK, I have have setup all that was suggested:
That means I can get HLS from edge by using
http://[wowza-edge-ip]:1935/liveedge/mpegts.stream/playlist.m3u8
?
I am trying that on iOS safari but am having no response from that link.
Any ideas?
Thanks again
Richard,
I have created a stream files as you describe, but still not able to play stream when refer to the liveedge url. Is it even possible, could you please provide som suggestions how to debug the issue. Or how to make stream file refer to other rtmp url?
Richard, thank you for a quick response.
I am trying to achieve the following goals:
-
Need to stream source as MPEG-TS.
-
Stream should be distributed via live-edge and lieve-origin instances configuration to provide public link and handle origin internally
Actually I am using one wowza installation for testing.
So to stream a MPEG-TS I have a origin.stream
file which contains
udp://0.0.0.0:40004
Then I have public.stream which contains exact path for the origin rtmp URL
rtmp://localhost/liveorigin/origin.stream
I am using ffmpeg
to reproduce the source
ffmpeg -re -i /Library/WowzaMediaServer/content/sample.mp4 -vcodec libx264 -g 60 -vb 150000 -strict experimental -acodec aac -ab 96000 -ar 48000 -ac 2 -vbsf h264_mp4toannexb -f mpegts udp://127.0.0.1:40004?pkt_size=1316
video is a out of the box wowza default sample example.mp4
it has H264 video and AAC audio streams
What do I have working:
- I am able to see stream if I go directly
rtmp://localhost/liveorigin/origin.stream
What I need to work
- See the stream when I use
rtmp://localhost/live/public.stream
EDIT:
forgot to say, I am using web stremmanager console on 8086 port for management