Wowza Community

FFmpeg to Wowza mp3 does not work

I am taking in a live audio source, converting it to mp3 with ffmpeg, and pushing that stream to Wowza. I have followed all the examples with live streaming and used the recommended Application.xml configurations. However, I cannot play the stream from Wowza.

If I stream a video source such as the following:

ffmpeg -y -f video4linux2 -async 1 -i /dev/video0 -f alsa -ac 2 -ar 44100 -b:a 64k -i hw:0,0 -c:a aac  -strict -2 -b:v 800k -g 15  -s 1280x720  -c:v libx264  -f  flv rtmp://myip:1935/live/mp4:test

it works just fine.

But if I take out everything but the audio and switch to mp3 like so:

ffmpeg -y -f alsa -ac 2 -ar 44100 -b:a 64k -i hw:0,0 -c:a mp3  -strict -2  -f mp3 rtmp://myip:1935/live/mp3:test

I receive a “dead stream” or “no source” when trying to play it.

Any ideas?

Try it like this:

ffmpeg -re -i [source stream or file]  -vn -acodec libmp3lame -ab 64000 -ar 44100 -ac 2 -strict experimental -f flv rtmp://localhost/live/ffmpeg

Or using FFmpeg as mpeg-ts encoder

ffmpeg -re -i [source stream or file]  -vn -acodec libmp3lame -ab 64000 -ar 44100 -ac 2 -strict experimental -f mpegts udp://127.0.0.1:10000?pkt_size=1316

The -vn flag excludes video.

Richard

Not sure what that issue is, perhaps the source. For reference these VLC command lines generate AAC and MP3 streams.

AAC:
vlc -vvv "%WMSAPP_HOME%/content/sample.mp4" --no-sout-video --sout "#transcode{acodec=mp4a,ab=96,channels=2,samplerate=48000}:rtp{dst=127.0.0.1,port=10000,mux=ts}"
MP3:
vlc -vvv "%WMSAPP_HOME%/content/sample.mp4" --no-sout-video --sout "#transcode{acodec=mp3,ab=64,channels=2,samplerate=44100}:rtp{dst=127.0.0.1,port=10000,mux=ts}"

You can re-stream using same mpeg-ts guide, and refer to this VLC guide.

Richard

Try it like this:

ffmpeg -re -i [source stream or file]  -vn -acodec libmp3lame -ab 64000 -ar 44100 -ac 2 -strict experimental -f flv rtmp://localhost/live/ffmpeg

The -vn flag excludes video.

Richard

Using this example the stream connects but using vlc and

rtmp://myip:1935/live/mp3:ffmpeg

and

rtmp://myip:1935/live/ffmpeg

I now get “VLC does not support the audio or video format “undf”. Unfortunately there is no way for you to fix this…”