[mythtv-users] Re: Re: Transcode to DVD-compatible MPEG-2 without
quality loss?
Mike Frisch
mfrisch at isurfer.ca
Tue Oct 25 22:41:39 EDT 2005
On 25-Oct-05, at 3:46 PM, Steve Adeff wrote:
>>
>> In the meantime, I've written a quick little perl script that
>> dumps the
>> program description, filename, and date so I can see what file is
>> what
>> show.
>>
>
> you mind sending out that perl script? I'd find it very useful!
Here's my script... if anybody makes any useful changes to it, I'd
like to see them. (Disclaimer: I am not a Perl programmer, I am C
programmer :)
#!/usr/bin/perl -w
#
#
# dumprecorded.pl
#
# Display recordings as stored in MythTV
#
# (C) Copyright 2005 Mike Frisch (mfrisch at isurfer.ca)
#
use DBI;
use Date::Manip;
# Adjust these for your system
$user = "mythtv";
$pass = "mythtv";
$server = "server";
$db = "mythconverg";
# This is the path where MythTV stores it's recordings
# Maybe in the future I can read this from the database
$path = "/mnt/storage/mythtv";
my $dbh = DBI->connect("DBI:mysql:database=$db;host=$server", $user,
$pass) or
die "Couldn't connect to database: " . DBI->errstr;
my $sth = $dbh->prepare("SELECT
title,description,starttime,endtime,chanid FROM recorded");
$sth->execute();
while (my $ref = $sth->fetchrow_hashref()) {
$disp_date = UnixDate("$ref->{'starttime'}", "%c");
print "$ref->{'title'} ($disp_date)\n";
if ($ref->{'description'}) {
print "$ref->{'description'}\n";
}
$start_date = UnixDate("$ref->{'starttime'}", "%Y%m%d%H%M%S");
$end_date = UnixDate("$ref->{'endtime'}", "%Y%m%d%H%M%S");
my $filename = "$ref->{'chanid'}" . "_" . $start_date . "_" .
$end_date . ".nuv";
print "$path/$filename\n";
print "\n";
}
$sth->finish();
$dbh->disconnect();
More information about the mythtv-users
mailing list