Category Archives: FFMPEG

RTSP to RTMP using FFMPEG + RED5

Hi Visitor,

In my last project, i was told to search a way to trans-code a live RTSP stream to a live RTMP stream. RTMP the best option for the flash player live streaming display. There is Wowza [Greedy !!!] Media server which can help you to do that in exchange of tons of money.

But using FFMPEG and RED5 media server, you can do it easily. Let me describe you the steps in simple.

1. Install RED5 media server (I am using the latest version ex. red5-1.0.0-RC2)

2. Use the already installed live application of RED5 media server. The URL for the live will be “rtmp://localhost:1935/live”.

3. Now setup FFMPEG

4. As you get finished. call this line from command line

ffmpeg -i "[your rtsp link]" -f flv -r -s -an "[Your rtmp link]"

For example, i will wrote like this

ffmpeg -i "rtsp://localhost/live" -f flv -r 25 -s 640x480 -an "rtmp://localhost:1935/live/livestream1"

The above example will trans-code a RTSP live stream to a RTMP live stream as FLV format with 640 x 480 resolution and 25 frame-rate per second.

 

That’s it. Now try to play the livestream1 stream using flash player

Please remember that RED5 can’t handle Large size trans-coding. So please specify low resolution in ffmpeg trans-coding command.

Let me know your thoughts.

33 Comments

Filed under FFMPEG, Red5