[mythtv] transcoding with cutlist

Chris Petersen lists at forevermore.net
Mon Aug 18 21:05:11 EDT 2003

> In this case, I was thinking about using the single-file interface (provide
> input and output arguments, etc) as a wrapper around the new transcode
> approach.  Although, I've been considering how to add multiple output targets
> to it (dvd, svcd, move to videos directory, leave in place, etc), and I think
> it might be best to split it into a set of modules anyway.  This would cater
> to your pluggable interface idea rather nicely.

yeah, sounds pretty good.

> In my mind, the advantage of mythtranscode will be an easier conversion to
> dvd/svcd, since I have yet to figure out how to do it from mpegs...

nah.  if you have an mpeg source, I have everything you'd need to encode
to svcd in my nuvexport script.  Even supports cutlist through mplayer's
edl function - though I always had audio sync issues when dealign with
my mpeg4 source files.

Anyway, I'm upgrading my script here and there - the latest addition is
a nuv file header parser (included below for anyone who wants it). 
Hopefully someone will help me figure out the audio and video header
info as well, since I'll need that to get the script working properly
with the new mythtranscode.


sub nuv_info {
    my $file = shift;
    my(%info, $buffer);
# open the file
    open(DATA, $file) or die "Can't open $file:  $!\n\n";
# Read the file info header
    print read(DATA, $buffer, 56), "\n";
# Close the file
    close DATA;
# Unpack the data structure
    ($info{finfo},			# "NuppelVideo" + \0
     $info{version},        # "0.05" + \0
     $info{desiredheight},  # 0 .. as it is
     $info{desiredwidth},   # 0 .. as it is
     $info{pimode},         # P .. progressive, I .. interlaced  (2 half pics) [NI]
     $info{aspect},         # 1.0 .. square pixel (1.5 .. e.g. width=480: width*1.5=720 for capturing for svcd material
     $info{videoblocks},	# count of video-blocks -1 .. unknown   0 .. no video
     $info{audioblocks},	# count of audio-blocks -1 .. unknown   0 .. no audio
     $info{textsblocks},	# count of text-blocks  -1 .. unknown   0 .. no text
        ) = unpack('Z12 Z5 xxx i i i i  a xxx d d i i i i', $buffer);
# Return
    return %info;

More information about the mythtv-dev mailing list