[MEncoder-users] Can you slow down mencoder?

Jonathan Lundberg lundbej at rte.ie
Thu Aug 18 16:43:40 CEST 2005


Hi guys,

Only looking at this situation again now after a few months hiatus..

Running the following script:

=================================
#!/bin/sh

cd /root/grabs

DATE=`date`
/bin/echo $DATE >> test.log

/bin/echo "Starting Capture" >> test.log

/usr/local/bin/mencoder  -noodml -tv  driver=v4l:width=352:height=288  
tv://  -o input  -ovc raw -oac pcm  &

/usr/bin/tee output1 < input | /usr/local/bin/mencoder -  -of avi 
-noodml -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1000 -oac lavc -o 
good.avi &

/usr/local/bin/mencoder output1 -of avi -noodml -ovc lavc -lavcopts 
vcodec=mpeg4:vbitrate=250 -oac lavc -o bad.avi  &

sleep 5
# Run Mplayer to monitor output
mplayer bad.avi -nosound &
mplayer good.avi -nosound &

===================================

But every time, after 1079.6 seconds, both of the mencoders working on 
the fifo's die off like so:

Flushing video frames

Writing AVI header...
Fixing AVI header...
ODML: Aspect information not (yet?) available or unspecified, not 
writing vprp header.

Video Stream: 1000.525kbit/s etc etc
Audio Strea: 224.000 kbit/s etc etc
/usr/bin/tee: standard output: Broken pipe
/usr/bin/tee: output1: Broken pipe


and same for the 2nd encoder.. while the primary encoder capturing from 
the card continues on..

Any thoughts? 

Cheers,

Jonathan

D Richard Felker III wrote:

>On Thu, Mar 10, 2005 at 09:24:02PM +0200, Oded Shimon wrote:
>  
>
>>On Thursday 10 March 2005 17:39, Martin Ankerl wrote:
>>    
>>
>>># start capturing
>>>captureprog | tee testfilename.avi | mencoder settings-for-high-quality
>>>cat testfilename.avi | mencoder settings-for-low-quality
>>>      
>>>
>>Whats the cat for?... That's redundant
>>
>>This is very hackish, but it does work and I don't see a better solution.
>>You said your capture program is MEncoder, so:
>>
>>mkfifo input output1
>>mencoder tv:// -endpos 30:00 -o input -ovc raw -oac pcm &
>>cat input | tee output1 | mencoder - -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=100000 -oac pcm -o goodquality.avi &
>>    
>>
>
>Do NOT use cat here. All it will do is increase cpu usage. Instead:
>tee output1 < input | mencoder - -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=100000 -oac pcm -o goodquality.avi &
>
>  
>
>>Change options as necessary obviously.
>>Do NOT use mencoder for capturing directly to stdout and then to tee.
>>MEncoder outputs too much garbage on stdout and on stderr.
>>    
>>
>
>Very true.. :)
>
>Rich
>
>_______________________________________________
>MEncoder-users mailing list
>MEncoder-users at mplayerhq.hu
>http://mplayerhq.hu/mailman/listinfo/mencoder-users
>
>  
>


******************************************************************************
The information in this e-mail is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this e-mail by anyone else
is unauthorised. If you are not the intended recipient, any disclosure,
copying, distribution, or any action taken or omitted to be taken in reliance
on it, is prohibited and may be unlawful.
Please note that emails to, from and within RTÉ may be subject to the Freedom
of Information Act 1997 and may be liable to disclosure.
******************************************************************************



More information about the MEncoder-users mailing list