[mythtv-users] RE: PVR-350 mpeg2 --> DVD burning. No commercial
cutting or fancy stuff.
david.blevins at visi.com
david.blevins at visi.com
Sun Mar 14 03:09:40 EST 2004
On Fri, Mar 12, 2004 at 01:08:13PM -0500, Volckaert, Jeff wrote:
> It would be nice if extension was a setup option in Mythtv
> so I wouldn't have to the symbolic link (or automatic mpg
> extension when using a hardware encoder). I also wish the
> program title and/or description was somewhere in the
> filename. Those two changes would make burning DVDs under
> windows a piece of cake for me.
>
Here is a perl script I coked up that makes a directory for each title. It's kind of a hack, but does the trick.
----
#!/usr/bin/perl -w
# Where your recordings sit
$RECDIR='/var/lib/mythtv/';
$LINKDIR='/media/tv/';
# Command to return the sql rows. Must have -N !!A
$MYSQL="mysql -N -u root mythconverg";
$SQL="select chanid, starttime, endtime, title, subtitle from recorded order by starttime";
$data=`echo $SQL | $MYSQL`;
@rows = split('\n',$data);
foreach (@rows){
s/[:;]/ -/g;
s/[\'\`,.]//g;
($chanid, $starttime, $endtime, $title, $subtitle)=split('\t',$_);
$subtitle='unknown' unless ($subtitle);
$REALFILE="${RECDIR}${chanid}_${starttime}_${endtime}.nuv";
$FAKEFILE="${LINKDIR}${title}/${subtitle}_${starttime}.mpg";
print $FAKEFILE . "\n";
`mkdir '${LINKDIR}${title}' 2>/dev/null`;
`ln -s '$REALFILE' '$FAKEFILE'`;
}
-----
More information about the mythtv-users
mailing list