Wowza Community

HLS Stream through ffmpeg to Wowza

Hello I am trying to stream an HLS input through ffmpeg into RTMP output on Wowza cloud but don’t know how to do it. On facebook and youtube all you needed is the stream key. here is my current command

ffmpeg -re -i “https://mnmedias.api.telequebec.tv/m3u8/29880.m3u8” -acodec aac -vcodec libx264 -f flv “rtmp://[primary server]”

The application I am developing is on local host

1) You only need the “-re” option if you are doing static VOD to live.

2) You are using audio and video codecs without specifying anything. libx264 will, by default deliver CRF 23. Never use CRF. Always use bitrate.

3) You should have no need to reencode the content.

You will need to authenticate your encoder with Wowza Streaming Engine and Wowza Streaming Cloud. Here are a few examples.

Passthrough if you trust the source content.

ffmpeg -i https://mnmedias.api.telequebec.tv/m3u8/29880.m3u8 -codec copy -f flv "rtmp://127.0.0.1:1935/live/myStream flashver=FMLE/3.0\20(compatible;\20FMSc/1.0) live=true pubUser=live pubPasswd=live"

Below is an article that we found regarding how to use FFmpeg. While it focuses on VOD content the same concept applies for live.

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

The command line below would be useful start for encoding content that you do not trust.

ffmpeg -i https://mnmedias.api.telequebec.tv/m3u8/29880.m3u8 -pix_fmt yuv420p -vsync 1 -vcodec libx264 -r 23.976 -threads 0 -b:v: 1024k -bufsize 1216k -maxrate 1280k -preset medium -profile:v high -tune film -g 48 -x264opts no-scenecut -acodec aac -b:a 192k -ac 2 -ar 48000 -af "aresample=async=1:min_hard_comp=0.100000:first_pts=0" -f flv "rtmp://127.0.0.1:1935/live/myStream flashver=FMLE/3.0\20(compatible;\20FMSc/1.0) live=true pubUser=live pubPasswd=live"

Hey Kevin thank you for your help, I didn’t mention that the command I posted didn’t paint the full picture. Here is the full command I am trying to pass through (below)

which has complex filters to add text and pictures overlayed on to the video itself.

I tried your trusted source command but got this error

[rtmp @ 0x7f8354555620] Detected librtmp style URL parameters, these aren’t supported by the libavformat internal RTMP handler currently enabled. See the documentation for the correct way to pass parameters.

[tcp @ 0x7f8354629ba0] Connection to tcp://127.0.0.1:1935 failed: Connection refused

  1. ffmpeg -re -i “https://mnmedias.api.telequebec.tv/m3u8/29880.m3u8”-i ACE.png -i logo2.jpg -filter_complex “[1]scale=40:40[ovrl1], [0:v][ovrl1] overlay=580:10:enable=‘between(t,1,5)’[v1];[2]scale=40:40[ovrl2], [v1][ovrl2] overlay=580:10:enable=‘between(t,5,15)’[v2];[v2] drawtext=fontfile=fontfile=/System/Library/Fonts/Keyboard.ttf: \text=‘VideoGami’:fontcolor=white: fontsize=24: x=(w-text_w)/2: y=(h-text_h)/1.05: enable=‘between(t,1,10)’”-acodec aac -vcodec libx264 -f flv “rtmp://[output rtmp]”

Also I am very inexperienced and don’t know which parts of your trusted source command to replace with my own credential, for example, should I replace myStream with the stream name? what is 127.0.0.1 is that the set of numbers that appear next to the primary server once you start a stream on Wowza?

The test we will be doing will have authentication turned off

Before I begin, none of the credentials provided are authentic. They are fabricated for example purposes.

Here is how I got it to work

rtmp://[wowza-ip-address]:1935/[application]/[streamName].

wowza-ip-address = primary server

This was found on the documentation but can be confusing because as a noob, I ask myself, what is application?

well apparently it is “app-11bb” in “rtmp://99d999.entrypoint.cloud.wowza.com/app-11bb” (primary server)

so altogether it may look something like this

rtmp://99bbd9.entrypoint.cloud.wowza.com:1935/app-11af/app-11bb/fb38e999

which worked for me.

If you use authentication use this

rtmp://username:password@99bbd9.entrypoint.cloud.wowza.com:1935/app-11af/app-11bb/fb38e999