[mythtv-users] iPod export and more with mythShellJob.pl

Dave Pearson lists at netsalve.com
Sun Jul 8 05:12:43 UTC 2007


Benton Roberts wrote:
> Hi, Mythterians.
>
> I've seen quite a few questions on the list about iPod export, so I
> thought I'd share what I use to do this, and other generic,
> shell-script-like stuff. This solution is easy to tweak for your own
> settings, and has never failed to produce an iPod-compatible MP4 video
> for my wife's video iPod. It also can do a lot more than iPod export.
> The script is named mythShellJob.pl, and this is from its README:
>
> ===========================
> This program is designed to assist in the process of creating and
> testing a sequence of shell commands for processing MythTV recordings.
> The sequence becomes a repeatable "job", which can be easily invoked as
> a MythTV user job, or from the command-line. The individual shell
> commands for each job are written into a "job description file", like this:
>
> command = ffmpeg -i {infile} -s {width}x{height} ...{outfile}
> command = MP4Box -add {infile} {outfile}
> command = makeIPodXML.pl -i {infile} -subtitle {subtitle} -out
>           {title}-{starttime}.xml
> command = echo "Added program '{title}' to podcast."
>           >>podcast_creation.log
> 	
> When this job is run on a recorded program, mythShellJob.pl executes
> each of these four shell commands in sequence, filling in the values of
> {infile} and {outfile} such that the output file of each command becomes
> the input file for the next command. Make sense? So you don't have to
> deal with the details of all those intermediate files, which are removed
> automatically as each command completes successfully.
>
> The program-specific fields, like {title}, {subtitle} and {starttime},
> are filled in from the MythTV database. And job-specific fields, like
> {width} and {height}, can be defined in the job description file,
> alongside the commands. So the above sequence is actually incomplete
> without the additional two lines:
> width = 320
> height = 240
> 	
> These numeric values will then be substituted into that first "ffmpeg"
> command before it is executed. Listing them on separate lines is
> completely optional, but in practice, transcoding commands often have
> many parameters to experiment with, so doing so can help with
> experimentation and debugging.
>
> The name of the final output file is determined by an additional parameter:
> filename_format = {title:14}-{month}_{day}_{year}-{subtitle:14}.mp4
>
> The ":14" indicates that this field should be truncated to 14 characters
> before substitution into this parameter. There's a default
> $filename_format defined in mythShellJob.pl, but most job descriptions
> will define a $filename_format particular to their actual output.
> ===========================
>
> As you can see, there's nothing particular to the iPod about this
> process that's not defined in a very simple job description file. So
> this framework for "pipelining" shell commands together to process
> recordings is quite flexible.
>
> So I invite all users interested in a newly-developed, flexible iPod
> export solution to download it, and give it a try. And please share with
> this list any interesting new job description files you create.
>
> mythShellJob.pl can be downloaded from
> http://bentonroberts.com/personal/media-server/code/mythshelljob
>
> Enjoy,
> -benton
> -------------
> benton at panix.com
> PGP Key ID 0x133E098F
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>   
Having just taken delivery of a shiny new Video iPod, I've been trying 
this script out. I've got two problems, one quite minor and one that is 
a bit of a show-stopper.

The minor problem is that if a TV show has no subtitle, then the xml 
file for the podcast doesn't get created. I can probably get around this 
by adding a default subtitle to the script.

The showstopper is that the resulting mp4 file does not have any audio 
once it is transferred to my iPod. It sounds fine on the PC, so I'm 
guessing that I have an incorrect setting somewhere - either in iTunes 
or on my iPod. does anyone have any ideas?

Regards,
Dave.


More information about the mythtv-users mailing list