From RTMP to WebSocket playback URL, just like Wowza Cloud Ultra Low Latency

Guys,

I’m trying a solution for low latency (< 2 sec) streaming using WSE, that I can ingest RTMP and consume at a (modern) browser.

I saw that Wowza Cloud already do that (in preview) with something called Ultra Low Latency. And taking a closer look, I’ve realized that the solution that you found to don’t use HTTP endpoints (Dash or HLS) it was to use WebSocket.

But I didn’t found anything similar to this in WSE. So, my question is: how can I do the same with WSE? Is there some HTTP Provider to generate the WS endpoints?

Thank you and sorry my bad english.

If you are looking for low latency with Wowza Streaming Engine then please take a look at our WebRTC preview.

https://www.wowza.com/docs/how-to-use-webrtc-with-wowza-streaming-engine

@Kevin Moore

Thank you for your reply.

Does the WebRTC solution supports RTMP ingest?

How can I use the Wowza Player Preview (http://player.wowza.com/player/preview/index.html) with this setup? I mean, what will be the source URL? ws://[server_address]/[application]/definst/[stream_name]/stream.ws?

You can use an RTMP encoder, however that protocol does not support WebM codecs and as such you would need to use Transcoder to convert them to WebM compliant codecs. As an example FFmpeg can be used to deliver WebM compliant content into Wowza Streaming Engine using RTSP.

Below is an example of libvpx video at an even 30fps and a two second keyframe distance which is also known as a Group of Pictures of GOP. It also has libopus audio and is heading into Wowza Streaming Engine via RTSP.

ffmpeg -re -i inputfile.mp4 -pix_fmt yuv420p -vsync 1 -vcodec libvpx -r 30 -threads 0 -b:v 404000 -bufsize 500000 -maxrate  505000 -minrate 303000 -g 60 -sc_threshold 0 -acodec libopus -ab 96000 -ar 48000 -ac 2 -af "aresample=async=1:min_hard_comp=0.100000:first_pts=0" -rtsp_transport tcp -f rtsp rtsp://username:password@192.168.1.46:1935/live/myWebRTC

Below is an example of H.264 video at NTSC 29.970fps content being deinterlaced, resized, and having two second GOP. It also has AAC audio and is heading into Wowza Streaming Engine via RTMP.

ffmpeg -re -i inputfile.mp4 -pix_fmt yuv420p -deinterlace -vf "scale=640:360" -vsync 1 -vcodec libx264 -r 30000/1001 -threads 0 -b:v: 1024k -bufsize 1216k -maxrate 1280k -preset veryfast -profile:v baseline -tune film -g 60 -sc_threshold 0 -acodec aac -b:a 192k -ac 2 -ar 44100 -af "aresample=async=1:min_hard_comp=0.100000:first_pts=0" -f flv rtmp://username:password@192.168.1.46/live/myStream

Again, you would need to use Transcoder to convert the H.264 video with AAC audio to something that is supported by browsers using WebRTC which is the easiest solution as you can use any RTMP based encoder for this purpose.

Below is a list of codecs supported by different browsers.

https://www.wowza.com/docs/how-to-use-webrtc-with-wowza-streaming-engine#limitations

For playback you would need the sample WebRTC page. Playback would look roughly as follows.

SDP URL: wss://localhost.streamlock.net/webrtc-session.json
Application Name: live
Stream Name: myWebRTC