[MEncoder-users] Freeze with SIGINT/SIGHUP when encoding from http stream

Lee Jackson leej at sowhatresearch.com
Mon Apr 20 22:11:20 CEST 2009


Brief background - in order to produce several simultaneous versions of a live recording (in real time) I am taking input from a capture card and using VLC to serve it via http. 

e.g. cvlc  v4l2:// :v4l2-dev=/dev/video0 :v4l2-adev=\"plughw.UA25\" :v4l2-standard=0 :v4l2-width=720 :v4l2-height=576 :v4l2-fps=25 --sout '#transcode{vcodec=mp2v,vb=6000,deinterlace,acodec=mpga,ab=128,channels=2}:duplicate{dst=std{access=http,mux=ps,url=localhost:8080}}' 

I am then trying to transcode this stream which again works, HOWEVER mencoder will often freeze when I send it a SIGINT/SIGTERM/SIGHUP signal or when I press ctrl-c to terminate the encoding. This happens both with the mpeg and x264 versions that I am creating e.g. 

mencoder http://127.0.0.1:8080 -ofps 30 -v -vf scale=320:-10,harddup -lavfopts format=mp4 -faacopts mpeg=4:object=2:raw:br=96 -oac faac -ovc x264 -sws 9 -x264encopts nocabac:level_idc=13:bframes=0:global_header:threads=auto:subq=7:frameref=3:partitions=all:trellis=2:chroma_me:me=umh:bitrate=300 -of lavf -o test1.mp4

The freezing is intermittent but happens more than 50% of the time. I've tried the latest SVN version of mencoder and this problem is still present. HOWEVER this is only happening when I do the transcode on http stream - if I trancode from an mpeg file theres no problem.

The freeze is a major problem for me since its generating corrupt mp4 files....

Can anyone offer any assistance in suggesting how I might solve this problem?

Tia Lee


More information about the MEncoder-users mailing list