[mythtv] Why nuppelvideo mpeg4?

Robert Johnston anaerin at gmail.com
Mon Aug 8 17:21:22 EDT 2005


On 08/08/05, J. Donavan Stanley <jdonavan at jdonavan.net> wrote:
> >My personal goals are to :
> >       - remove the DB dependance for generated files
> 
> There isn't a DB dependence for generated files.  You can playback
> Myth's recordings just fine without the seek table (both in Myth and
> other players).  You just can't seek/jump around them quickly without
> that index.  You could probably tack the seek table on to the end of the
> file in some sort of id3 tag if you *really* wanted that data out of the
> table..

I think he means to decode the "File Name". That, however, has already
been done with the MythLink script (Shown below) which I've got set to
run as a cron job on :05 and :35 of each hour.


------8<---------------------------------------
#!/bin/sh

# mythlink.sh - Symlinks mythtv files from /myth/tv to more readable
versions in /myth/pretty
# by Dale Gass, modified by Robert Johnston

rm -f /myth/pretty/*
echo "Done RM"
mysql -uroot  mythconverg -B --exec "select
chanid,starttime,endtime,title,subtitle from recorded;"
>/tmp/mythlink.$$
perl -w -e '
        my $mythpath= "/myth/tv";
        my $altpath= "/myth/pretty";
        if (!-d $altpath) {
                mkdir $altpath or die "Failed to make directory: $altpath\n";
        }
        <>;
        while (<>) {
                chomp;
                my ($chanid,$start,$end,$title,$subtitle) = split /\t/;
                $start =~ s/[^0-9]//g;
                $end =~ s/[^0-9]//g;
                $subtitle = "" if(!defined $subtitle);
                my $ofn = "${chanid}_${start}_${end}.nuv";
                do { print "Skipping $mythpath/$ofn\n"; next } unless
-e "$mythpath/$ofn";
                $start =~ /^....(........)/;
                my $nfn = "$1 - ${title} - ${subtitle}";
                $nfn =~ s/:/ /g;
                $nfn =~ s/&/+/g;
                $nfn =~ s/[^+0-9 \x27a-zA-Z_-]+/_/g;
                $nfn =~ s/ - $//g;
                $nfn =~ s/  / /g;
                print "Creating $nfn\n";
                unlink "$altpath/$nfn" if(-e "$altpath/$nfn");
                symlink "$mythpath/$ofn", "$altpath/$nfn" or die
"Failed to create symlink $altpath/$nfn: $!";
        }
' /tmp/mythlink.$$
rm /tmp/mythlink.$$
------8<---------------------------------------

All you need do is customise $mythpath and $altpath, and put it in your crontab.
-- 
Robert "Anaerin" Johnston


More information about the mythtv-dev mailing list