Diff for "MythExport"


Differences between revisions 2 and 3
Revision 2 as of 2008-01-26 07:24:34
Size: 4305
Editor: c-69-242-102-85
Comment:
Revision 3 as of 2008-02-12 22:54:28
Size: 4304
Editor: 90-227-39-164-no61
Comment:
Deletions are marked like this. Additions are marked like this.
Line 30: Line 30:
$ cd AtomicParsley-debian-0.9.9 $ cd AtomicParsley-debian-0.9.0
Line 42: Line 42:
$ cd /user/local/bin $ cd /usr/local/bin

Include(MythTV/Header)

Introduction

MythExport is a script that can be added to MythTV as a User Job and used to export recordings into a format playable on portable devices such as iPod Video, iPod Touch, and PSP. Besides converting your recordings, this script also grabs data from the MythTV MySQL database and injects it as iTunes data into the exported video so that it will show up correctly on your iPod.

Installation

Get the MythExport script and AtomicParsley:

$ wget http://www.baablogic.net/mythexport.pl
$ wget http://downloads.sourceforge.net/atomicparsley/AtomicParsley-debian-0.9.0.zip?modtime=1159292337&big_mirror=0

Unpack AtomicParsley:

$ unzip AtomicParsley-debian-0.9.0.zip

If the above fails then you need to install unzip:

$ sudo apt-get install unzip

Move the scripts to /usr/local/bin:

$ sudo mv mythexport.pl /usr/local/bin/.
$ cd AtomicParsley-debian-0.9.0
$ sudo mv AtomicParsley /usr/local/bin/.

Optional: Clean up AtomicParsley files:

$ cd ..
$ rm -rf AtomicParsley-debian-0.9.0

Give the scripts permission to execute:

$ cd /usr/local/bin
$ sudo chmod +x mythexport.pl
$ sudo chmod +x AtomicParsley

Script Configuration

Use the script usage below to choose your settings. You can reference this when you need them later.

john@ultramagnus:~$ mythexport.pl

How to use mythexport.pl :

chanid = Channel ID associated with the recording to export.
starttime = Recording start time in either 'yyyy-mm-dd hh:mm:ss' or 'yyyymmddhhmmss' format.
exportdir = Directory to export completed MP4 files to (note the user the script runs as must have write permission on that directory).
size = Frame size of output file.  320x240 is the default value.
aspect = Aspect ratio of output file.  Valid values are 4:3 (default) and 16:9.
audio_bitrate = Audio bitrate in output file in kbps.  Default value is 96kb.
video_bitrate = Video bitrate in output file in kbps.  Default value is 300kb.
export_codec = Acceptable export codecs: mpeg4, xvid, h264.
export_device = Acceptable export devices: ipod, psp.
debug = Enable debugging information - outputs which commands would be run.

Example: mythexport.pl exportdir=/mythtv/ipod starttime=20060803205900 chanid=1006 size=320x240 aspect=4:3 audio_bitrate=192kb video_bitrate=300kb export_device=ipod export_codec=mpeg4 debug

Compatability

Device

Encoding

5g iPod

mpeg4/xvid

5.5g iPod

mpeg4/xvid/h264

iPhone

mpeg4/xvid/h264

PSP

mpeg4/xvid

Additional Devices

Email john.baab@gmail.com with a working ffmpeg line

MythTV Configuration

Enable a User Job to be used:

attachment:user_job_1.png

If you have multiple backends, check this box so that you don't get errors with a backend trying to export a file it doesn't have:

attachment:user_job_2.png

Fill in a name for your User Job. Then add the command you want the custom job to run: Here is my command for medium quality:

mythexport.pl exportdir=/mythtv/ipod starttime=%STARTTIME% chanid=%CHANID% size=320x240 aspect=4:3 audio_bitrate=192kb video_bitrate=600kb export_device=ipod export_codec=mpeg4

attachment:user_job_3.png

The User Job name and command can also be modifies in MythWeb (by clicking on the MythTV Settings button):

attachment:mythweb_user_job_0.png attachment:mythweb_user_job_1.png

Exporting a Recording

Execute your user job in MythTv:

Media Library -> Watch Recordings

attachment:user_job_4.png

attachment:user_job_5.png

You can check that your job is running in the Info Center (Information Center -> System Status -> Job Queue):

attachment:user_job_7.png

The User Job can be configured to run on recordings after they are created (Post Recording Processing Menu on the Recording Options screen):

attachment:user_job_8.png

Troubleshooting

Verify that the user which runs the script has permissions to create files in the directory you are exporting to.


CategoryDocumentation

MythExport (last edited 2011-05-19 01:07:11 by c-68-38-204-119)