ipodexport.pl File Reference

Go to the source code of this file.

Functions

 if ($num le"2")
 foreach (@ARGV)
$query_handle execute ()||die"Cannot connect to database \n"
$query_handle bind_columns (undef,\$title,\$subtitle)
$query_handle fetch ()
 if ($schemaVer< 1171)
 my ($channame)
 if ($debug)
 if (!$debug)

Variables

use DBI
use MythTV
my $exportdir = '/home/mythtv/'
my $bitrate = '96'
my $aspect = '4:3'
my $size = '320x240'
 $connect = undef
 $debug = 0
 $usage
 $num = $#ARGV + 1
my $myth = new MythTV()
 $query = "SELECT title, subtitle FROM recorded WHERE chanid=$chanid AND starttime='$starttime'"
 $query_handle = $connect->prepare($query)
my $schemaVer = $myth->backend_setting('DBSchemaVer')
my $dir = 'UNKNOWN'
 $channame = ~ s/\s+/-/g
 $title = ~ s/\W+/_/g
 $subtitle = ~ s/\W+/_/g
 $newstarttime = $starttime
 $newfilename = $exportdir."/".$channame."_".$title."_".$subtitle."_".$newstarttime.".mp4"
 $command = "nice -n19 ffmpeg -i $filename -vcodec xvid -b 300 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec aac -ab $bitrate -s $size -aspect $aspect '$newfilename' 2>&1"


Function Documentation

if ( $num le"2"   ) 

Definition at line 54 of file ipodexport.pl.

foreach ( ARGV  ) 

Definition at line 62 of file ipodexport.pl.

$query_handle execute (  ) 

$query_handle bind_columns ( undef  ,
\$  title,
\$  subtitle 
)

$query_handle fetch (  ) 

if (  ) 

Definition at line 111 of file ipodexport.pl.

my ( channame  ) 

if ( debug  ) 

Definition at line 151 of file ipodexport.pl.

if ( !$  debug  ) 

Definition at line 164 of file ipodexport.pl.


Variable Documentation

use DBI

Definition at line 17 of file ipodexport.pl.

use MythTV

Definition at line 19 of file ipodexport.pl.

my $exportdir = '/home/mythtv/'

Definition at line 22 of file ipodexport.pl.

my $bitrate = '96'

Definition at line 23 of file ipodexport.pl.

my $aspect = '4:3'

Definition at line 24 of file ipodexport.pl.

Referenced by foreach().

my $size = '320x240'

Definition at line 25 of file ipodexport.pl.

Referenced by foreach(), and if().

$connect = undef

Definition at line 27 of file ipodexport.pl.

$debug = 0

Definition at line 28 of file ipodexport.pl.

$usage

Initial value:

 "\nHow to use dvbradioexport.pl : \n"
        ."ipodexport.pl exportdir=/foo/bar starttime=%STARTTIME% chanid=%CHANID bitrate=x size=320x240 aspect=4:3 debug\n"
        ."\n%CHANID% = channel ID associated with the recording to export\n"
        ."%STARTTIME% = recording start time in either 'yyyy-mm-dd hh:mm:ss' or 'yyyymmddhhmmss' format\n"
        ."exportdir = dir to export completed MP4 files to (note the user the script runs as must have write permission on that dir\n"
        ."size = frame size of output file.  320x240 is the default value \n"
        ."aspect = aspect ratio of output file.  Valid values are 4:3 (default) and 16:9 \n"
        ."bitrate = audio bitrate in output file in kbps.  Default value is 96 \n"
        ."debug = enable debugging information - outputs which commands would be run etc\n"
        ."\nExample: ipodexport.pl exportdir=/home/juski starttime=20060803205900 chanid=1006 size=320x340 aspect=16:9 bitrate=192 debug \n"

Definition at line 36 of file ipodexport.pl.

$num = $#ARGV + 1

Definition at line 50 of file ipodexport.pl.

my $myth = new MythTV()

Definition at line 88 of file ipodexport.pl.

$query = "SELECT title, subtitle FROM recorded WHERE chanid=$chanid AND starttime='$starttime'"

Definition at line 93 of file ipodexport.pl.

$query_handle = $connect->prepare($query)

Definition at line 95 of file ipodexport.pl.

my $schemaVer = $myth->backend_setting('DBSchemaVer')

Definition at line 107 of file ipodexport.pl.

my $dir = 'UNKNOWN'

Definition at line 110 of file ipodexport.pl.

$channame = ~ s/\s+/-/g

Definition at line 135 of file ipodexport.pl.

$title = ~ s/\W+/_/g

Definition at line 138 of file ipodexport.pl.

$subtitle = ~ s/\W+/_/g

Definition at line 140 of file ipodexport.pl.

$newstarttime = $starttime

Definition at line 146 of file ipodexport.pl.

$newfilename = $exportdir."/".$channame."_".$title."_".$subtitle."_".$newstarttime.".mp4"

Definition at line 149 of file ipodexport.pl.

$command = "nice -n19 ffmpeg -i $filename -vcodec xvid -b 300 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec aac -ab $bitrate -s $size -aspect $aspect '$newfilename' 2>&1"

Definition at line 158 of file ipodexport.pl.


Generated on Sat Dec 18 05:15:53 2010 for MythTV by  doxygen 1.5.5