Wowza Community

FFmpeg RTSP send audio stream to Wowza Streaming Cloud

I am trying to send an audio-stream to my Wowza Cloud Service (trial account) using RTSP. This works fine using LibStreamer library for Android. I am now trying to do the same with FFmpeg on my desktop streaming my webcam’s audio. I have tried the following command (authentication disabled on Wowza):

ffmpeg -f dshow -re -i audio="Desktop Microphone (HD-3000 - Microsoft LifeCam.)" -acodec aac -strict -2 -f rtsp -muxdelay 0.1 rtsp://52.57.81.141:1935/app-xxx/yyyyyy

FFmpeg seems to do its thing however I would have expected that the webconsole of Wowza would show “connected” when receiving the stream from FFMpeg.

Any ideas? It might actually be a problem with Wowza but I checked this forum and I couldn’t find any post describing my problem.

You should add the following to force RTSP to use TCP delivery for both the control and data channels. If you do not then you may incur packet loss.

-rtsp_transport tcp

It is also important to specify the parameters of the audio such as bitrate, frequency and channels. In addition the built in AAC codec included with FFmpeg is no longer experimental so you if you are running a newer build you can skip that option.

ffmpeg -f dshow -re -i audio="Desktop Microphone (HD-3000 - Microsoft LifeCam.)" -acodec aac -b:a 192k -ac 2 -ar 44100 -af "aresample=async=1:min_hard_comp=0.100000:first_pts=0" -f rtsp -rtsp_transport tcp -muxdelay 0.1 rtsp://52.57.81.141:1935/app-xxx/yyyyyy

You should also be able to both stream your content and make a local copy of your output if you specify two outputs as shown below:

ffmpeg -f dshow -re -i audio="Desktop Microphone (HD-3000 - Microsoft LifeCam.)" -acodec aac -b:a 192k -ac 2 -ar 44100 -af "aresample=async=1:min_hard_comp=0.100000:first_pts=0" -f rtsp -rtsp_transport tcp -muxdelay 0.1 rtsp://52.57.81.141:1935/app-xxx/yyyyyy -acodec aac -b:a 192k -ac 2 -ar 44100 -af "aresample=async=1:min_hard_comp=0.100000:first_pts=0" -f mp4 -y out.mp4

I hope that helps to resolve your issue.

Works fine. Thanks.