Dpg export
From MythTV Official Wiki
Revision as of 19:25, 7 June 2008 by Vangorra (talk | contribs) (Nds export moved to Dpg export: Wrong name)
This script utilizes the dpgexport.py script which can be found at http://theli.is-a-geek.org/blog/static/dpgconv. The dpgconv script uses an application called mpeg_stat whose source can be donwloaded from the dpgconv website. I found that compiling mpeg_stat from source works best.
NOTE: dpgconv.py cannot convert rjpeg files. It is best to have your recordings in mpeg2/4 format. This can be achieved by modifying your transcode profiles.
Place dpgconv.py, mpeg_stat and mpeg_stat.1 in /usr/local/bin
Use as a user job
dpgexport %DIR% %FILE% %TITLE% %SUBTITLE% /mnt/mythtv/recordings/mobile
This will place a dpg of your recording in /mnt/mythtv/recordings/mobile/TITLE-SUBTITLE.dpg
The Code
#!/bin/bash source_dir="$1" source_file="$2" title="$3" subtitle="$4" dest_dir="$5" source_path="$source_dir/$source_file" dest_path1=$(echo "$dest_dir/$source_file" | sed -r 's/\..*$/.dpg/') dest_path2="$dest_dir/$title - $subtitle.dpg" cd "$dest_dir" dpgconv.py "$source_path" mv "$dest_path1" "$dest_path2"