Wowza Community

Using FFMPEG to live stream MPEG-DASH/HLS

Hello,

I am trying to figure out how to properly setup a live stream for viewing with MPEG-DASH and HLS (WebRTC as well but that’s for later). Following various tutorials and such, I currently have all playback types enabled. The transcoder is also enabled with pretty much the “default” values (I added a 1080p) and a SMIL file that reflects this.

For input I currently use the fairly simple command

ffmpeg -re -i [video].mp4 -f flv rtmp://[IP]/WowzaTest/ABRStream

but I have tried using the Wowza GoCoder application on my android phone as well with the same results.

Using this the streaming engine receives the stream and the transcoder provides the additional streams correctly. However, the issues come with viewing the stream. Using Adobe RTMP works fine but since the goal is to use HLS and MPEG-DASH that won’t do.

While the provided HLS player is not supported I have achieved the most success trying to view HLS using VLC. Using only the URL “[IP]/WowzaTest/playlist.m3u8” simply gives the error “httplive stream error: segment 0 should have been available” and nothing else happens.
Adding the SMIL file to the UR: “http://10.20.0.20:1935/WowzaTest/smil:ABRStream.smil/playlist.m3u8” also gives this error but I am able to receive the audio. How do I go about receiving the video as well?

The second issue is with MPEG-DASH, while I have been able to receive audio with HLS, with MPEG-DASH I haven’t even gotten that far. Whether I add the SMIL to the URL or not, the player just doesn’t seem to be able to find the manifest file at all.

I have seen mention of adding a .stream file to the server but that seemed more related to the encoder so I haven’t added one of those. I don’t know how basic these issues are but any advice would be appreciated, thank you.

The command that you are using is reencoding the file. You will want to pass the file through using a command similar to the following.

ffmpeg -re -i video.mp4 -codec copy -f flv "rtmp://[address:1935/live/myStream flashver=FMLE/3.0\20(compatible;\20FMSc/1.0) live=true pubUser=username pubPasswd=password"

Please make sure that your source video uses H.264 video with stereo AAC audio in an MP4 container.

While we cannot provide support for FFmpeg as it is a free and open source tool, you may find the information in the following blog helpful to create VOD content.

https://videoblerg.wordpress.com/2017/11/10/ffmpeg-and-how-to-use-it-wrong/

I recommend that you test with VOD content before moving to live as VOD can be much easier to diagnose than live streaming. Once you have VOD working with content that you have personally created then you can move to live and perform additional testing.

Thank you, that command helped me get video using HLS, still a bit spotty but I believe it gave me a nudge in the right direction. I will follow your advice and test with VOD from now on instead.