[mythtv-users] avidemux2 command line? nuv -->> DVD
Cory Papenfuss
papenfuss at juneau.me.vt.edu
Tue Jul 13 14:51:27 EDT 2004
Sure, but some comments are in order. Here's the (extremely ugly)
script that probably got line-wrapped in the paste:
#!/bin/sh
set -x
FILTFILE=filters
#FILTFILE=filters_resize
#VIDCONF="2pass=9"
#VIDCONF="2pass=329"
VIDCONF="2pass=658"
#VIDCONF="2pass=987"
#VIDCONF="2pass=1316"
#VIDCONF="cbr=2000"
#VIDCONF="cq=2"
#VIDOPTS="--filters $FILTFILE --video-process --halfd1-res --video-codec DVD
--video-conf cbr=2000"
#VIDOPTS="--filters $FILTFILE --video-process --halfd1-res --video-codec DVD
--video-conf cbr=2000"
VIDOPTS="--filters $FILTFILE --video-process --halfd1-res --video-codec DVD
--video-conf $VIDCONF"
#VIDOPTS="--filters $FILTFILE --video-process --video-codec DVD --video-conf
$VIDCONF"
#for i in *.edl; do
for i in $*; do
base=`echo $i | sed -e 's/^\(.*\).edl/\1/g'`
if [ ! -s $base.m2v ] ; then
echo "Processing $i"
# avidemux2 --load-workbench $i --audio-process --save $base.m2a --quit
# avidemux2 --load-workbench $i --save-raw-audio $base.m2a --save $base.m2v
--quit &> /dev/null
# avidemux2 --load $i $VIDOPTS --save $base.m2v --quit
avidemux2 --load $i $VIDOPTS --save-raw-audio $base.m2a --save $base.m2v
--quit
else
echo "Already have $base.m2v"
fi
if [ ! -s $base.mpg ] ; then
echo "Muxing $base.mpg"
# avidemux2 --load-workbench $i --audio-process --save $base.m2a --quit
# avidemux2 --load-workbench $i --save-raw-audio $base.m2a --save $base.m2v
--quit &> /dev/null
mplex -O 3003mpt -o $base.mpg -f 8 $base.m2v $base.m2a
else
echo "Already have $base.mpg"
fi
done
I load up the raw .nuv in avidemux2, find and editlist out the commercials, and
use a 'DVD' style codec. I save the edit list as 'Whatever_Name.edl' The
'filters' file contains an avidemux-generated xml file with the options that I
use for all of the dvd parts I create and has the contents:
<?xml version="1.0"?>
<filters FilterNumber="1">
<Filter Tag="39" Conf=" MPlayer HQ Denoise 3D (4.0 - 3.0 - 6.0)'">
<Parameters Number="3">
<param1>4.000000</param1>
<param2>3.000000</param2>
<param3>6.000000</param3>
</Parameters>
</Filter>
</filters>
I don't deinterlace, since it's going on a DVD for playing anyway. A few other
notes are:
I try to fit video and audio for a 1 hour (43 minute w/o commercials) show in
700 MB at 352x480. That amounts to about 2.2 Mb/s combined video and audio
(128 kbps mp2 audio). It's a fairly low bitrate, but it's better than VHS, and
it'll fit 6 shows on a DVD. Also, since the video compatible witn a single
CVD, I could make single show disks on CD later without reencoding. I've got a
number of (seldom-used) options commented out in the file too, of course.
All this uses avidemux2, which I believe is just a gui-overlaid and
enhanced avidemux. Many of the command line options I think are throwbacks to
the orginal program. I also get the 66ms (sometimes 33ms), but I'm not sure if
avidemux2 takes them out or not. mplex seems to recognise that it's there, so
I try to remove it with the -O 3003mpt (=33ms). It's small enough that I'm
never sure if it's right or not... except when mplex's bug manifests itself
with a 15 minute sync error.
Hope that helps some folks... I spent way too much time making all this
slightly broken crap go. I've actually cued up a bunch of processed, muxed,
.mpg files to author to DVD that I haven't burned yet. Although I managed to
make one with menues, it was very painful. I'm hoping some better frontends to
dvdauthor will show up in a few months.
-Cory
*************************************************************************
* The prime directive of Linux: *
* - learn what you don't know, *
* - teach what you do. *
* (Just my 20 USm$) *
*************************************************************************
On Tue, 13 Jul 2004, James Pifer wrote:
> On Tue, 2004-07-13 at 12:02, Cory Papenfuss wrote:
>> I do basically the same thing, but I have figured out how to coerce
>> avidemux2 into doing some things via the command line. I run the gui manually
>> to cut out commercials and then save the edit list. After that, running the
>> appropriate command line flags (check with avidemux --help) I can get it to
>> demux.
>>
>> I actually capture at a non-DVD resolution (640x480) and then 2pass
>> encode at 352x480. I'd like to run it from the card directly, but I can get
>> better quality per disk space with offline MPEG2 encoding can do a better job
>> than the PVR250 at low resolutions. I can actually get all that done via a
>> script that calls avidemux manually.
>>
>> Be careful with the mplex. My .nuv's from the PVR250 have a
>> video/audio offset (usually mplex -O 3003mpt). There also appears to be a bug
>> in mplex that does some integer overflow around 66ms specified offset. I
>> haven't ferreted that out yet.
>>
>> -Cory
>>
>
> I've been using avidemux2, which doesn't seem to have any command line
> options. I'll take a look at avidemux. Couldn't really tell you why I'm
> using one and not the other.
>
> When I mess with a nuv file with avidemux2 it always says there is a
> 66ms offset and saves the files accordingly (i guess). So maybe that's
> why I haven't noticed an issue with mplex. The again, I've only done it
> a handful of times.
>
> I will take a look at nuvexport and see if that works for me. I would
> definitely be interested in what Chris wrote about automatically
> creating a DVD with menus of several shows.
>
> James
>
>
More information about the mythtv-users
mailing list