[mythtv-users] choosing an archive format for recordings

Cory Papenfuss papenfuss at juneau.me.vt.edu
Thu Aug 5 10:22:34 EDT 2004


On Thu, 5 Aug 2004, Leo Weppelman wrote:

> On Tue, Aug 03, 2004 at 09:58:56AM -0400, Cory Papenfuss wrote:
>>> I also noticed a thread about mpeg2->mpeg2 with cutlist support but
>>> without re-encoding in mythtranscode. But this project has stopped as far
>>> as I could tell :-( That would have given an opportunity to save the
>>> resulting nuv&sql and archive them.
>>
>> 	I have a similar request.  I would like to see GOP-based editing for
>> cutting commercials, but also a simple MPEG2->MPEG2 transcode.  Perhaps I
>> don't understand how the transcoding works, but I have been using avidemux2
>
> From what I read from the docs, it should be possibe to use a commandline
> version of avidemux to cut the mpeg2 stream. It is not too difficult to
> retrieve the cut-points from the myth data base. I will see if I could create
> an mpeg2 copy from that. It really would be a quick space saver since I
> usually record about 15 minutes of slack on both ends to catch programming
> 'drift'.
 	I'm already using the command-line version of avidemux to do my 
processing.  I pretty much just use the GUI to find the commercial cutpoints. 
The config files and cutpoint documents are pretty straight-forward, and I 
sorta hacked up a script (attached) to actually process the files.  It goes 
through a list of ".edl" files which contain the cutpoints, etc saved via 
avidemux and has contents similar to:

ADMW0002
01 videos
Name : 
/home/scratch/VID/Modern_Marvels/06_27/1049_20040621170000_20040621180000.nuv.idx
05 segments
Start : 0
Size : 14385
Ref :   0
Start : 21660
Size : 13575
Ref :   0
Start : 42525
Size : 13935
Ref :   0
Start : 63735
Size : 16800
Ref :   0
Start : 87510
Size : 19035
Ref :   0
Audio codec : none
Audio filter : audioNormalizeMode=0 audioResampleMode=0 audioDRC=0 audioShift=0 
audioDelay=0
  audioFreq=48000
Audio conf : audioProcessMode=0 audioMP3mode=0 audioMP3bitrate=128
Video start-end : 0 77729

 	The filters file contains the xml file avidemux uses to define the 
filters.  I think this is a really good idea to try to integrate the two, but I 
think we'd need to seriously look at the code for avidemux and see how it's 
hacking up config files.

>
>> to manually archive shows.  I record at 640x480 at a fairly high bitrate on
>
> What do you call 'fairly high'? (just curious ;-)
 	I have not been overly impressed with the sharpness of the PVR-250 I've 
got (and have resolution test pattern data that proves it's less sharp than TV 
at any capture resolution).  As such, anything over 480x480 is 
indistinguishable by me, but to make the  computer happier and have some 
over-sampling headroom, I capture at 640x480 anything I'm planning to save.  I 
think the bitrate is around 4.5Mbps.

  >
>> a PVR-250.  In post-processing, I denoise, resize to 352x480, and 2-pass
>> encode at a reduced bitrate.  The end result is nearly indistinguishable
>> from the original ivtv encoded file at higher bitrates, but I can fit 42
>> minutes (1-hour show less commercials) in a 700 MB file.  Thus, 6 hour-long
>> shows on a 1/2 D1 (DVD-compatible) format with broadcast-quality (somewhere
>> between VHS and composite 480i SDTV).
>
> I'm going to play with avidemux to see if I can reproduce what you do and
> check the result ;-)
 	The scripties should mostly work, although one caveat is the .vcodec
file avidemux generates when you save the cutlist.  It's rather cryptic, so I 
just make sure I have the basics correct when I load it in the gui (DVD 
encoding options, interlaced)

>
>> 	I would like to use the cutlist and commercial detection of this,
>> 	but I haven't figured out if the transcoder can be set up to have this
>> rigorous quality settings like avidemux.  For non space-concious folks,
>> recording ivtv streams at 704x480 or 720x480 with >4Mbps directly to DVD
>> works well.  I'd rather conserve space with slightly lowered bitrate and
>> resolution, but the IVTV craps out on the quality at lower settings.
>
> Well, even if mythtranscode will not reach the quality of avidemux in
> doing bitrate conversions and denoising, it would still be nice to have
> a tool that performs cutting the mpeg2 stream based on the cut points in
> the database. Setting the cut points while watching the recording is done
> on the fly. I hate to have to scan the show in avidemux just to re-find
> the cutpoints I already entered while watching in myth :-(

 	I'm still thinking that avidemux would be OK, but the 'transcode' 
package is probably a better choice.  It has a seemlingly infinite set of 
options, codecs, etc, and recently (6 mos ago?) added requant capability for 
quick MPEG2 transcoding.  Not sure about cutlists, offsets, etc, but that would 
probably be the best tool to use if you've got another method (e.g. Mythtv) to 
find the cutpoints.  I only used avidemux because I wanted a GUI to manually 
find the commercials to cut.

>
>>>
>>> Are there people using the same setup as me who have an acceptable solution
>>> for the above problems?
>>
>> 	Currently marginally acceptable, but requires hand-cutting of
>> commercials with avidemux2.  Still looking for good GUI-ish DVD authoring
>> software to make XML dvdauthor files less annoying to deal with.
>
> I saw a posting about nuv2disk (http://extras.mythtvtalk.com), it looks to do
> some authoring. I am in the process of compiling eboxy...

 	I looked briefly, but I really need a test box to play with all this 
stuff.  Last time I looked, I was confused about what the built-in 
mythtranscode did.  I don't really need authoring (although it would be 
cool)... I just want mythtv to find the commercials and do the crunching so I 
don't have to manually do it.

>
> Thanks for the info,
>
> Leo.
>
 	Sure... it sounds like a fun addition.

-Cory
-------------- next part --------------
#!/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
-------------- next part --------------
<?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>


More information about the mythtv-users mailing list