[mythtv-users] NUVExport slow export solution
Eric A. Cottrell
eac at shore.net
Sat Jan 29 15:25:12 EST 2005
Hello,
I am running a FIC Condor using a Pentium 4 at 2.8 GHz, 1GB of Corsair
DDR-400 CL2 memory, and a Maxtor 300 GB SATA drive. I am using the
PVR-250 card for capture so nuvexport just uses transcode to convert
from mpeg2.
In trying to use NUVExport for export to xvid I found that turning noise
reduction, scaling, etc off made the export faster but I seem to hit a
limit of about 20 Frames per Second (FPS). I decided to try and figure
out any problems.
I am not recording anything today so I turned off Mythbackend and used a
shell logon to get X out of the way. It still peaked at about 20 FPS.
If I ran transcode using the same command line as NUVExport I peaked out
at around 50 FPS! Something was wrong. When I used top to look at the
processes it looked like transcode was breezing along at about 90% or so
when run on it's own but would run at 90% for a few seconds then go down
to 0% for a few seconds when run under nuvexport.
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 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.
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.
Running nuvexport in X with mythbackend running only slowed things down
a few frames per second. I am happier now with the results. A multiple
pass conversion from MPEG2 to XviD now takes around an hour instead of
around two hours.
73 Eric
More information about the mythtv-users
mailing list