RTSP with ffmpeg and wowza

Hi guru,

this is my experiment: let’s wowza working with ffmpeg RTSP.

that is the ffmpeg command:

ffmpeg -re -i /usr/local/WowzaMediaServer/content/sample.mp4 -acodec copy -vcodec copy -f rtsp -muxdelay 0.1 rtsp://myuser:mypassword@127.0.0.1:1935/live/myStream.sdp

Wowza live app is the standard as in tutorial:

https://www.wowza.com/docs/how-to-set-up-live-streaming-using-an-rtsp-rtp-based-encoder

In this enviroment, i get this:

ffmpeg origin: seems to works perfectly

Output #0, rtsp, to ‘rtsp://myuser:mypassword@127.0.0.1:1935/live/myStream.sdp’:

Metadata:

major_brand : qt

minor_version : 512

compatible_brands: qt

creation_time : 1970-01-01 00:00:00

encoder : Lavf53.3.0

Stream #0.0(eng): Video: avc1 / 0x31637661, yuv420p, 424x240, q=2-31, 420 kb/s, 90k tbn, 24 tbc

Metadata:

creation_time : 1970-01-01 00:00:00

Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, 99 kb/s

Metadata:

creation_time : 1970-01-01 00:00:00

Stream mapping:

Stream #0.0 -> #0.0

Stream #0.1 -> #0.1

Press ctrl-c to stop encoding

frame= 457 fps= 24 q=-1.0 Lsize= -0kB time=19.01 bitrate= -0.0kbits/s

wowza server: on this side i get a WARNING

INFO server comment - LiveStreamPacketizerCupertino.handlePacket[live/definst/myStream.sdp]: Video codec:H264 isCompatible:true

INFO server comment - LiveStreamPacketizerCupertino.handlePacket[live/definst/myStream.sdp]: Audio codec:AAC isCompatible:true

WARN server comment - RTPDePacketizerRFC3984H264.handleRTPPacket: Unsupported packet type: FU-B

WARN server comment - RTPDePacketizerRFC3984H264.handleRTPPacket: Unsupported packet type: MTAP-24

WARN server comment - RTPDePacketizerRFC3984H264.handleRTPPacket: Unsupported packet type: MTAP-16

Client: on this side sound is OK but video doesn’t start

Any idea?

Here is a better way to use ffmpeg with Wowza:

https://www.wowza.com/docs/how-to-use-ffmpeg-with-wowza-media-server-mpeg-ts

Richard

RTMP and RTSP output from ffmpeg also work with Wowza, but we recommend the mpegts method. It is the most stable.

Richard

Hi richard,

the way you suggest, i have to go to the stream manager and then get the stream in the remote encoder is right ?

Because the first method is to push the video, that i some situation is better is right ?

Thanks

Alessandro

RTMP and RTSP output from ffmpeg also work with Wowza, but we recommend the mpegts method. It is the most stable.

Richard … Is any publish authentication method available with mpegts ?

pierluigi,

I got the same errors as you, and no video, audio only, in Debian and Windows with ffmpeg. I removed and recompiled ffmpeg from source using the following instructions: http://ubuntuforums.org/showthread.php?t=786095

Now your command works without errors and plays video/audio in VLC through Wowza with RTSP.

Yes the mpegts method requires use of the stream manager to get the stream from the encoder.

The push method will start the stream when you start encoding, if that’s what is meant by better?

You can start the pulled type of streams automatically by specifying them in startupstreams.xml:

https://www.wowza.com/docs/how-to-start-streams-at-server-startup

Daren

Many thanks for your answer guys!

Rrlanham … I would like to test a general purpose encoding configuration of woowza because I’m going to develop my one encoder based on ffmpeg or gstreamer. Do you suggest to use MPEG-TS because it is the only supported integration solution with ffmpeg?

Randall … I will test your solution shortly and I will post details … for others to save time :slight_smile: