[mythtv-users] Myth to Ipod...

Brad DerManouelian myth at dermanouelian.com
Mon Dec 8 04:12:26 UTC 2008


On Dec 7, 2008, at 5:26 PM, A JM wrote:

> I'm thinking that the libmyth-perl is not compatible with an SVN  
> install??? just a guess.
>
> So, Brad I'd be interested in how you have yours setup. I'm new to  
> the iPod world so I would be interested in how your using RSS to  
> sync with your iPod and how you have Myth setup to use the process.

I modified the video2ipod script to fit my specific needs, to work  
with a newer version of ffmpeg and to work with my hd-pvr h.264 video  
since for some reason some settings aren't automatically detected with  
my version of midentify. (See diff at the bottom of this post)
Then I made a user job that looks like this:
video2ipod.pl -myth -CHANID %CHANID% -STARTTIME %STARTTIME% -output / 
var/www/ipod -type h264 -force16 -width 420 -threads 2

When it's run, it takes the recording, transcodes it and puts it in / 
var/www/ipod. Then it writes an xml file in /var/www/ipod/xml that  
contains information about the recording. Then it updates all.xml in / 
var/www/ipod (which I access with http://www.mydomain.com/ipod/).

In iTunes, I subscribe to the podcast at http://www.mydomain.com/ipod/all.xml 
. I have my phone set to automatically copy podcast content so I just  
plug in my iPhone and the new videos are copied onto it.

all.xml contains every video, but you can look through the  
instructions if you want to create additional .xml files based on  
metadata about the programs then subscribe to the one(s) you want.

-Brad


--- video2ipod_0.11	2008-04-14 11:26:25.000000000 -0700
+++ /usr/local/bin/video2ipod.pl	2008-10-21 07:43:17.000000000 -0700
@@ -89,7 +89,7 @@
  $video2ipod::input_video_length=0;

  # RSS Podcast Base URL
-$video2ipod::base_url="http://ipod.jeffornot.com/";
+$video2ipod::base_url="http://mythweb.mydomain.com/ipod/";

  # RSS Filename
  $video2ipod::rss_feed_title="MythTV Recordings";
@@ -115,10 +115,10 @@
  $video2ipod::rss_feed_image="$ 
{video2ipod::base_url}MythTV_logo_square.png";

  # Directory to publish feed to
-$video2ipod::rss_dir="/var/www/localhost/htdocs/ipod/";
+$video2ipod::rss_dir="/var/www/ipod/";

  # Directory to store working files to
-$video2ipod::xml_dir="/mnt/store/recordings/xml/";
+$video2ipod::xml_dir="/var/www/ipod/xml/";

  # Default filename template function. Can be replaced in rc file
  $video2ipod::FilenameTemplate = sub { return "$video2ipod::chanid- 
$video2ipod::starttime.mp4"; };
@@ -513,8 +513,8 @@
  {
    $audio_bitrate="128k";   # reasonable audio
    $video_bitrate=15*$video2ipod::quality . "k";  # maximum video  
bitrate for h264
-  $audio_codec="libfaac";  # aac audio
-  $video_codec="libx264";  # h264 video
+  $audio_codec="aac";  # aac audio
+  $video_codec="h264";  # h264 video

    if ($width > 720)
    {
@@ -530,8 +530,12 @@
      if ($height%16) { $height+=(16 - $height%16); }
      print "Resizing for div16: ${width}x${height}\n" if  
$video2ipod::debug;
    }
+  ### HACK RESOLUTION SINCE I ONLY WANT ONE
+$width = 420;
+$height = 240;
+$video_bitrate = "800k";

-  $extra_options="-flags +loop -cmp +chroma -partitions  
+parti4x4+partp8x8+partb8x8 -me umh -subq 5 -trellis 1 -refs 1 -coder  
0 -me_range 16 -g 300 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 - 
bt $video_bitrate -maxrate 10M -bufsize 10M -rc_eq 'blurCplx^(1- 
qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect $width: 
$height";
+  $extra_options="-flags +loop -cmp +chroma -partitions  
+parti4x4+partp8x8+partb8x8 -me umh -subq 5 -trellis 1 -refs 1 -coder  
0 -me_range 16 -g 300 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 - 
bt $video_bitrate -maxrate 10M -bufsize 10M -rc_eq 'blurCplx^(1- 
qComp)' -qcomp 0.6 -qmin 10 -qmax 41 -qdiff 4 -level 30 -aspect 16:9";
  }
  elsif ("$video2ipod::type" eq "xvid")
  {





More information about the mythtv-users mailing list