[mythtv-users] NUVExport slow export solution

Chris Petersen lists at forevermore.net
Sat Jan 29 20:41:35 EST 2005


> nuvexport gets the output of transcode, parses it, reformats, and prints 
> it on the screen.  It appears if the framerate gets over 20 FPS then 
> nuvexport can not process every status line guickly.  The stdout buffer 
> fills thus stopping transcode until it empties.  Reading the transcode 
> man page I came across the --print_status option in transcode.  I 
> modified the transcode.pm file in nuvexport to add a --print_status 4 
> option in the transcode command line.  This tells transcode to only 
> print a status line for every 4 frames processed.  This fixed the 
> problem and increased the rate back to a peak of around 50 FPS when 
> using nuvexport!

I've added "--print_status 16" to the transcode options -- even 4 frames 
is probably overkill.

And am open to suggestions about how to do something similar with ffmpeg 
(nuvexport will soon be using ffmpeg for just about everything, since 
transcode doesn't seem to work with a bunch of mpeg type files), or even 
just speed up the buffering in nuvexport.  In my tests with the mp3 
encoder, my settings were pulling 80-100fps, which I figured would be 
fast enough; apparently it doesn't carry over to the other encoder types.

> I also noticed nuvexport will still use the -Z option when the output 
> resolution matches the input resolution.  Transcode will still do zoom 
> when the -Z option is specified with no change in resolution thus 
> slowing down the frame rate for nothing.

Yeah.  I apparently gave too much credit to transcode.  You don't happen 
to have a patch for this, do you?

> Since my computer has a HT cpu I uncommented the option to specify the 
> number of CPUs in the transcode.pm file and gained about 1 FPS.  I 
> noticed the first parameter for this option defaults to 10 but the code 
> in transcode.pm set it to 100.  I used 10 and even tried 20 with no 
> change of framerate so I left it at 10.  I assume 100 would be overkill 
> and may even slow it down like the comment indicated.

Interesting.  On my dual athlon, I found the exact opposite -- about 
1.5-3 fps slower (nuvexport has multi-cpu detection included, but 
deactivated).  Since transcode encodes both audio and video in separate 
threads, the kernel sends those to separate CPU's (which is what HT 
works as in this case).  Creating another encoding thread just causes 
them all to fight for resources on the lesser-used cpu.

Wouldn't be hard to add a commandline option to optionally enable this 
(since it would definitely help for something like a dual-xeon box)

-Chris


More information about the mythtv-users mailing list