On Mon, Jun 21, 2004 at 03:25:54PM -0400, Brian J. Murrell wrote:
> Right but since then I have simplified the test to just lav2wav sucking.
> See my previous e-mail:
> 
>         $ time lav2wav file.eli > file.wav
>            INFO: [lav2wav] WAV done
>         0.58user 12.01system 1:49.86elapsed 11%CPU (0avgtext+0avgdata 0maxresident)k
>         0inputs+0outputs (204major+938minor)pagefaults 0swaps
>         
> > That shouldn't be a time consumer, but as a quick check, switch to
> > writing to a read file on disk instead.  Does that change anything?
> 
> As above, the lav2wav alone takes almost 2 minutes.

That's not at all surprising.  Time how long this one would take:

dd if=/your/video/file/location of=/dev/null bs=64k

Run it against the full capture file, all multiple gigabytes of
capture.  I'd bet it takes about 2 minutes just to read the capture
data off your disk.

I've seen this effect all too many times in the past when encoding
lavrec recordings to mpeg.  Lav2wav will saturate your disk read
bandwidth, but maybe only 1/10 to 1/20 the disk read bandwidth will
trickle out the other end as wav data.  I suspect it's an internal
difficulty in lav2wav, something to do with the way it reads the wav
data from the avi container.  I suspect it's reading every byte of
the file, demuxing it internally, and then throwing away the video
data and outputting the audio, but I've never dug deep enough into
it's code to divine exactly how it works.

Try running a vmstat on a one or two second delay in another window
while you run your lav2wav test.  I'll bet you see pretty close to
your 40MB/s of read bandwidth being consumed for the entire 2 minutes
of time lav2wav takes to create the wav file.

> > Also, you might want to try running a buffer between the two
> > processes, that might help as well.
> 
> Right, once lav2wav is taking all of the CPU I can throw at it and
> the pipeline to sox still sucks, I will.  But right now, lav2rec
> seems to be the bottleneck.

And without some code changes inside lav2wav it's likely to always be
the bottleneck.  I never bothered reporting it as a problem myself,
figuring that 5-20 minutes to encode up an mp2 was paltry compared to
several hours or more to code up the mpeg video.  Often I'd run the
audio encode after I'd started video coding, so with the overlap, the
time loss to a slow lav2wav was essentially zero.



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to