Wowza Community

Transcode with FFMPEG

My application uses rtmp to record video, transcodes the flv video to mp4 using ffmpeg.

Currently, the transcoding happens after the video is recored to flv. I was informed that ffmpeg can take rtmp stream and encode to mp4. This way the processing time can probably greatly shortened as the transcoding starts with the recording.

Currently I put the ffmpeg transcoding command “ffmpeg -i rtmp://localhost:1939/recorder/1333402852509 -acodec libfaac -ac 2 -b:v 200k -ar 48k -async 1 -bufsize 3M -s 320x240 -r 30 -vcodec libx264 -b:a 64k -y 1333402852509.mp4” in the onPublish event of IMediaStreamActionNotify. But no mp4 is written to the disk.

Can someone tell me what’s the correct way to do this?


I recommend sticking with the workflow you have. You can start with h.264 video and Speex audio if you use Flash 11 and follow this guide to configure your application: