[FFmpeg-user] Live transcoding to an rtp stream is unreliable.
david at electric-spoon.com
Thu Apr 7 13:14:17 CEST 2011
I am attempting to transcode and re-stream a live TV channel using
ffmpeg under linux. My command line is:
ffmpeg -loglevel verbose \
-pix_fmt yuv422p -s 720x576 -i http://david-laptop:8000/4228 \
-vn -sn -acodec libfaac -ar 48000 -ab 64000 -ac 2 -async 1 -flags
+global_header -f rtp rtp://david-laptop:9022 \
-an -sn -vcodec libx264 -s 320x240 -fpre
-fpre resources/ffpreset/libx264-ipod320.ffpreset -vglobal 1 -f rtp
In the command line above, http://david-laptop:8000/4228 is connected to
a DVB capture card, and streams a raw DVB transport stream of a live TV
The outgoing stream is sent as two seperate elementary streams (audio
and video) over rtp.
My problem is that the streaming process is very unreliable. ffmpeg will
often hang on start-up, (before it emits the SDP file), or it will
start-up normally, but then crash after about a second of transcoding.
The reliablity appears to depend on the uptime of the machine, and the
number of times it has run before. It usually works if it is the first
time that ffmpeg is invoked after a reboot, but becomes less reliable
I have tried varying the network port numbers of the outgoing streams in
case something is not being cleaned up, but it does not make any difference.
Has anyone experienced any symptoms like that. Can anyone suggest what
might be going on, or give me any clues for further investigation.
More information about the ffmpeg-user