Author |
Message |
rteichman
|
Posted: Tue Oct 25, 2005 7:56 am |
|
Joined: Wed Feb 02, 2005 4:07 pm
Posts: 141
|
wififun wrote: First you must grab ffmpeg and recompile it with a couple of missing items. Very easy to do, so don't worry. Code: cvs -z9 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg co ffmpeg cd ffmpeg ./configure --enable-xvid --enable-gpl --enable-faac make make install
This will install another ffmpeg into /usr/local/bin. ffmpeg aready resides in a few other places on a default Knoppmyth install, but I do not want to replace them with this in case it breaks something.
Cool I can't wait to try it when I get home...but I have one question. What are you logged in as when you did the above and what directory were you in? Since my KnoppMyth box is in the basement without a keyboard or monitor, I do everything by SSH into the box.
|
|
Top |
|
 |
wififun
|
Posted: Tue Oct 25, 2005 8:37 am |
|
Joined: Mon Jun 21, 2004 11:25 am
Posts: 291
Location:
Ontario, CA
|
i do everything via ssh too, I did login as root, but you should be able to use another account then sudo make install. If you plan to use the job que functions, you will need to access the backend to run mythtv-setup. Not sure how to do this remotely. I woke up this morning to 7 items in my video podcast. Pretty cool. I did make a tweak to the encode settings.
Code: -cropleft 10 -cropright 10 -cropbottom 8 -croptop 8
This trims a little more, but keeps the 4:3 proportions the same before scaling. It produces slightly better results.
|
|
Top |
|
 |
rteichman
|
Posted: Tue Oct 25, 2005 1:17 pm |
|
Joined: Wed Feb 02, 2005 4:07 pm
Posts: 141
|
wififun wrote: you will need to access the backend to run mythtv-setup.
Does anyone know how to run this from SSH?
|
|
Top |
|
 |
wififun
|
Posted: Tue Oct 25, 2005 1:54 pm |
|
Joined: Mon Jun 21, 2004 11:25 am
Posts: 291
Location:
Ontario, CA
|
|
Top |
|
 |
wififun
|
Posted: Wed Oct 26, 2005 9:48 am |
|
Joined: Mon Jun 21, 2004 11:25 am
Posts: 291
Location:
Ontario, CA
|
A new version of the script is undergoing testing now it includes:
1. Friendly to non iPod users (Read: other portable devices)
2. Encode only option
3. Rebuild XML file (based on files in the directory, and mythconverge database) This will account for files deleted from the feed directory
4. Sine it now uses the database, we can populate more info like show descriptions, and categories, etc.
I will post directions and the new script to the Wiki when ready. So far it seems to be working.
To Do.
User option to Pan-Scan widescreen content. This would require a second User Job, but it will take letter boxed shows and crop the black tops and bottoms. Although I love widescreen, on a 2" screen, it is just a waste.
|
|
Top |
|
 |
pegli
|
Posted: Wed Oct 26, 2005 5:36 pm |
|
Joined: Wed Oct 26, 2005 1:32 pm
Posts: 3
Location:
Santa Cruz, CA
|
If you are running Myth on Fedora Core 4, you need to install the faac and faac-devel RPMs in order to compile ffmpeg with the --enable-faac option as described above. I got the packages from Dag's site:
http://dag.wieers.com/packages/faac/
I just received my video iPod today and am going through my first test run of the mpg2ipod script. One small suggestion so far: use variables to specify the location of the transcoded files and the mythweb URL. I added the following to the script:
Code: $PUBLISH="/mnt/store/ipod"; $MYTHWEB_URL="http://www.yourwebsitehere.com/mythweb";
then replaced /myth/ipod with $PUBLISH and http://mythweb with $MYTHWEB_URL.
Great work so far!
|
|
Top |
|
 |
wififun
|
Posted: Wed Oct 26, 2005 6:28 pm |
|
Joined: Mon Jun 21, 2004 11:25 am
Posts: 291
Location:
Ontario, CA
|
UPDATED: THE SCRIPT IS NOW HOSTED AT
http://www.myth2ipod.com
BELLOW THIS IS OLD
SCRIPT Version Beta 0.6
New script: same info applies, but this has the hardcoded paths set as variables at the top. libextractor and perl's Date::Format are NO LONGER needed.
Thanks to pegli's great help and input other new changes will lead to more flexibility and eventually, I hope, to MythWeb integration for managing the portable files.
Each video file has a corresponding XML file that has all the <ITEM> tag information needed by the feed script. Only TWO variables now need to be passed to the script when run from the Job Queue. %DIR% and %FILE%. The the script will do the rest.
The feed file is now by default, "feed.php". If the mpg2ipod script does not see this file in the feed path, it will create it. This php script can also be rebuilt by issuing:
Code: mpg2ipod --rebuild This is also the file you subscribe to in iTunes. Code: http://www.yourhostnamehere.com/ipodfeed/feed.php It generates the feed XML on-the-fly. For now, to delete a feed item, remove the video file, and the corresponding xml file, and it is gone. SCRIPT: Code: #!/usr/bin/perl -w # VERSION: Beta .6 - mpg2ipod # BIG CHANGES since .4 seperate xml item files for each video # No more need to rebuild feed file from datebase each time # Default feed file is now .rss # Author: Chris aka Wififun - email: wififun-at-gmail.com # # Requirements: recompile ffmpeg with --enable-xvid --enable-gpl --enable-faac # mythweb should be accessable to your iTunes machine you can edit your hosts # file to have mythtv point the right IP # create a feedpath like /myth/ipod and make sure to chown mythtv:mythtv # then create a symlink that feedpath "ln -s /myth/ipod /var/www/ipodfeed" # put this script in /usr/local/bin and make sure mythtv can run it # it may need chown root:mythtv # open mythtv-setup and under General set up one of your User Jobs to run it: # /usr/local/bin/mpg2ipod "%DIR%" "%FILE%" # Give the job a name like "Copy for iPod feed" and exit setup # Then edit your recording schedules for each show you want in the feed. # under Post Processing, add the newly created job to the list. # you can also select it after a recording is finished, from the Job Options # item when you get info for a previously recorded program. # In iTunes, select "Subscribe to Podcast" from the Advanced menu # enter the url http://www.yourhostnamehere.com/ipodfeed/feed.php # have fun
# Includes use DBI; use Getopt::Long; use File::Path; # User variables my $portable = "ipod"; my $feedfile = "/myth/ipod/feed.php"; my $feedpath = "/myth/ipod/"; my $wwwloc = "/var/www/"; my $feedurl = "http://www.yourhostnamehere.com/ipodfeed/"; # Ecoder settings, may be modified to support other devices # 5G iPod with Video compatable settings. MPEG4/XVID AAC audio my $encodeopt = "-y -cropleft 10 -cropright 10 -croptop 8 -cropbottom 8 -deinterlace -vcodec xvid -s 320x240 -r 29.97 -b 384 -qmin 2 -qmax 5 -bufsize 4096 -acodec aac -ab 96 -g 300";
# Some variables our ($dest, $format, $usage); our ($db_host, $db_user, $db_name, $db_pass, $video_dir); our ($hostname, $db_handle, $sql, $statement, $row_ref); # our ($chanid, $start, $end, $nuvfile, @nuvarray); my $rebuild = '0'; my $encode = '0'; my $debug = '0'; my $setup = '0'; my( $rightnow ) = `date`;
GetOptions ("rebuild" => \$rebuild, "encode" => \$encode, "debug" => \$debug, "setup" => \$setup);
if ($setup == 1){ system("clear"); print "Setup will do everything needed to run this script.\n"; print "This has only been tested on KnoppMyth R5A22.\n"; print "make sure you have edited the variables for your conguration.\n"; my $cksetup = &promptUser("\nAre you sure you want to procceed?","n"); if ($cksetup =~ "y") { DoSetup(); exit; } print "Setup exited. Nothing done.\n"; exit; } elsif ($rebuild == 1){ GenerateRSSFeed(); print "Rebuilding of RSS feed is complete.\n"; exit; } else { Encode4Portable(); print "$title is ready for your $portable\n"; # Check to see if the feed file exists; if not, create it. if (! -e $feedfile) { print "No feed file found. I will make one for you.\n"; GenerateRSSFeed(); print "All done.\n"; } }
sub Encode4Portable{ if ($#ARGV != 1) { print "Encoding requires options.\nusage: mpg2ipod <options> DIRECTORY FILE\n"; exit; } # Get the show information $directory = $ARGV[0]; $file = $ARGV[1]; @file = split(/_/, $file); $chanid = $file[0]; $start = $file[1]; $end = substr $file[2],0,14; if($debug == 1){ print "$chanid\n$start\n$end\n"}; if (! -e $directory.$file){ print "Opps, the file ".$directory.$file." does not exist.\n"; exit; } # Connect to the database PrepSQLRead(); $db_handle = DBI->connect("dbi:mysql:database=$db_name:host=$db_host", $db_user, $db_pass) or die "Cannot connect to database: $!\n\n"; $sql = "SELECT title, subtitle, description, category, starttime FROM recorded WHERE chanid = $chanid AND DATE_FORMAT(starttime,'%Y%m%d%H%i%s') = $start";
$statement = $db_handle->prepare($sql) or die "Couldn't prepare query '$sql': $DBI::errstr\n"; $statement->execute() or die "Couldn't execute query '$sql': $DBI::errstr\n"; $row_ref = $statement->fetchrow_hashref(); if($debug == 1){ print "$row_ref->{starttime}\n"}; $title = $row_ref->{title}; $subtitle = $row_ref->{subtitle}; $recorddate = $row_ref->{starttime}; $description = $row_ref->{description}; $category = $row_ref->{category}; $filename = $title."-".$subtitle."-".substr $start, 0, 8; $filename =~ s/ /_/g;
printf("Starting pass 1 of 2...\n"); DoPassOne(); printf("Pass 1 competed, starting pass 2 of 2...\n"); DoPassTwo(); printf("Pass 2 competed, building video XML file\n"); CreateItemXML(); printf("XML file created for \"$filename\" : Cleaning up temporary files\n"); $cmd = "mv -f $feedpath'$filename'.pass2 $feedpath'$filename'.$portable.mov"; print $cmd."\n"; if(system($cmd)) { print "Moving pass2 to final .mov failed\n"; } $cmd = "rm -f /tmp/mpg2ipod_log*"; print $cmd."\n"; if(system($cmd)) { print "Removing pass 1 file failed\n"; } $cmd = "rm -f $feedpath'$filename'.pass1"; print $cmd."\n"; if(system($cmd)) { print "Removing pass 1 file failed\n"; } return 0; }
# # Encode for Portable Pass 1 # sub DoPassOne { $cmd = "/usr/local/bin/ffmpeg -i $directory/$file -comment '$file' -title '$title' -author 'MythTV - mpg2ipod' -timestamp '$rightnow' $encodeopt -pass 1 -passlogfile /tmp/mpg2ipod_log -f mov $feedpath'$filename'.pass1"; print $cmd."\n"; if(system($cmd)) { print "Pass one failed\n"; } return 0; }
# # Encode for Portable Pass 2 # sub DoPassTwo { $cmd = "/usr/local/bin/ffmpeg -i $directory/$file -comment '$file' -title '$title' -author 'MythTV - mpg2ipod' -timestamp '$rightnow' $encodeopt -pass 2 -passlogfile /tmp/mpg2ipod_log -f mov $feedpath'$filename'.pass2"; print $cmd."\n"; if(system($cmd)) { print "Pass two failed\n"; } return 0; }
# # Create XML with <ITEM> tag for this video file # sub CreateItemXML { open(ITEM, ">$feedpath$filename.$portable.xml"); print ITEM "<item>\n"; print ITEM "<title>".$title." - ".$subtitle."</title>\n"; print ITEM "<itunes:author>MythTV</itunes:author>\n"; print ITEM "<author>MythTV</author>\n"; print ITEM "<itunes:category text=\"TV Shows\"></itunes:category>\n"; print ITEM "<comments>".$file."</comments>\n"; print ITEM "<description>".$description."</description>\n"; print ITEM "<pubDate>".$recorddate."</pubDate>\n"; print ITEM "<enclosure url=\"".$feedurl.$filename."\.".$portable."\.mov\" type=\"video/quicktime\" />\n"; print ITEM "<itunes:duration></itunes:duration>\n"; print ITEM "<itunes:keywords>".$title." - ".$subtitle." - ".$category."</itunes:keywords>\n"; print ITEM "<category>".$category."</category>\n"; print ITEM "</item>\n"; print "\"$filename\" has been added to the feed.\n"; close(ITEM); return 0; }
# # Generate the RSS feed by combining the ITEM XML Files # sub GenerateRSSFeed{
open(RSS, ">$feedfile"); print RSS "<?php\n"; print RSS "header(\"Content-Type: text/xml\");\n"; print RSS "echo \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\"; ?>\n"; print RSS "<rss xmlns:itunes=\"http://www.itunes.com/DTDs/Podcast-1.0.dtd\" version=\"2.0\">\n"; print RSS "<channel>\n"; print RSS "<title>MythTV Recorded Programs</title>\n"; print RSS "<itunes:author>MythTV - mpg2ipod</itunes:author>\n"; print RSS "<link>$feedurl</link>\n"; print RSS "<itunes:subtitle>Transcoded recording for your iPod Video.</itunes:subtitle>\n"; print RSS "<itunes:summary>Myth TV Recorded Programs for the iPod v.1</itunes:summary>\n"; print RSS "<description>Myth TV Recorded Programs for the iPod v.1</description>\n"; print RSS "<itunes:owner>\n"; print RSS "<itunes:name>MythTV</itunes:name>\n"; print RSS "<itunes:email>mythtv\@localhost</itunes:email>\n"; print RSS "</itunes:owner>\n"; print RSS "<itunes:explicit>No</itunes:explicit>\n"; print RSS "<language>en-us</language>\n"; print RSS "<copyright>Copyright 2005.</copyright>\n"; print RSS "<webMaster>mythtv\@localhost</webMaster>\n"; print RSS "<itunes:image href=\"http://mythtv.org/themes/Myth_bb2/images/mythtv-logo.jpg\" />\n"; print RSS "<itunes:category text=\"TV Shows\"></itunes:category>\n"; print RSS "<category>TV Shows</category>\n"; print RSS "<itunes:image href=\"http://img468.imageshack.us/img468/6038/mythipod3lu.jpg\"/>"; print RSS "<image>"; print RSS "<url>http://img468.imageshack.us/img468/6038/mythipod3lu.jpg</url>\n"; print RSS "<title>MythTV 2 iPod</title>\n"; print RSS "<link>$feedurl</link>\n"; print RSS "<width>300</width>\n"; print RSS "<height>300</height>\n"; print RSS "</image><?foreach (glob(\"*\.$portable\.xml\") as \$file) {include \$file;}?>\n"; print RSS "</channel>\n"; print RSS "</rss>\n"; close(RSS); if($debug == 1){ print "I created a feed file, was I supposed to?\n"};
return 0; }
# # This code taken from one of the mythlink.sh scripts to get MySQL information # sub PrepSQLRead{ # Get the hostname of this machine $hostname = `hostname`; chomp($hostname); # Read the mysql.txt file in use by MythTV. # could be in a couple places, so try the usual suspects my $found = 0; my @mysql = ('/usr/local/share/mythtv/mysql.txt', '/usr/share/mythtv/mysql.txt', '/etc/mythtv/mysql.txt', '/usr/local/etc/mythtv/mysql.txt', "$ENV{HOME}/.mythtv/mysql.txt", 'mysql.txt' ); foreach my $file (@mysql) { next unless (-e $file); $found = 1; open(CONF, $file) or die "Unable to open $file: $!\n\n"; while (my $line = <CONF>) { # Cleanup next if ($line =~ /^\s*#/); $line =~ s/^str //; chomp($line); # Split off the var=val pairs my ($var, $val) = split(/\=/, $line, 2); next unless ($var && $var =~ /\w/); if ($var eq 'DBHostName') { $db_host = $val; } elsif ($var eq 'DBUserName') { $db_user = $val; } elsif ($var eq 'DBName') { $db_name = $val; } elsif ($var eq 'DBPassword') { $db_pass = $val; } # Hostname override elsif ($var eq 'LocalHostName') { $hostname = $val; } } close CONF; } die "Unable to locate mysql.txt: $!\n\n" unless ($found && $db_host); return 0; }
sub promptUser { local($promptString,$defaultValue) = @_; if ($defaultValue) { print $promptString, "[", $defaultValue, "]: "; } else { print $promptString, ": "; }
$| = 1; # force a flush after our print $_ = <STDIN>; # get the input from STDIN (presumably the keyboard) chomp; if ("$defaultValue") { return $_ ? $_ : $defaultValue; # return $_ if it has a value } else { return $_; } }
sub DoSetup { print "\nNot ready yet. How do you send the cd command from perl?\n"; return 0; }
Last edited by wififun on Wed Nov 02, 2005 12:15 am, edited 10 times in total.
|
|
Top |
|
 |
pegli
|
Posted: Thu Oct 27, 2005 11:18 am |
|
Joined: Wed Oct 26, 2005 1:32 pm
Posts: 3
Location:
Santa Cruz, CA
|
I'm testing the new script right now. Again, for FC4 folks, you can get the extractor RPM from Dag's repository (I suppose I should really add him to my apt-get sources...):
http://dag.wieers.com/packages/libextractor/
Also, I needed to install Date::Format:
Code: perl -MCPAN -e 'install Date::Format'
I have a couple of ideas for the script:
Instead of rebuilding the XML file each time, the mpg2ipod script might create XML files containing the <item> tag and contents for each video. We can add a PSP file that puts in the common part of the feed file and assembles all of the fragments in the podcast directory on the fly. This allows you to add and delete the video/XML files at random. Once you can treat the video/XML files as a unit, you could extend mythweb to show a list of podcasted videos and allow deletion of episodes from the podcast.
It might also be nice to do per-show podcasts, so you could subscribe to each show separately.
What do you think?
|
|
Top |
|
 |
wififun
|
Posted: Thu Oct 27, 2005 12:16 pm |
|
Joined: Mon Jun 21, 2004 11:25 am
Posts: 291
Location:
Ontario, CA
|
I commented out use Date::Format, as right now it is not being used. This is one step less for FC4 users. This was something I was testing trying to resolve a problem with the way start and end times are kept in the database. I also added some comments to the SQL query section that describe a situation I am trying to solve related to recording start times, and the actual program scheduled start time.
Quote: Instead of rebuilding the XML file each time, the mpg2ipod script might create XML files containing the <item> tag and contents for each video. We can add a PSP file that puts in the common part of the feed file and assembles all of the fragments in the podcast directory on the fly. This allows you to add and delete the video/XML files at random. Once you can treat the video/XML files as a unit, you could extend mythweb to show a list of podcasted videos and allow deletion of episodes from the podcast. Umm, I ran around a similar idea in trying to deal with the metadata issue. I had not expanded on the idea to thinking about mythweb, but that is perfect. This may also resolve the meta data issue completely, because rather than trying to rebuild the feed off of the video files alone, the data is stored there at the time of the encoding. The feed file does need to be rebuilt each time a new file is added in order to facilitate itunes subscribing to this feed. Building a mythweb interface would be great and allow easy removal of shows. Now if you could just assign User Jobs to recordings and schedules from Myth Web. On-th-fly management for mythweb is great. I have not touched mythweb scripts, so I will need some help with that. Quote: It might also be nice to do per-show podcasts, so you could subscribe to each show separately.
I toyed with this too. But decided on ease of use in iTunes over the need to subscribe to multiple items. However, I think flexibility could be key to this being used by more devices and more people, so this will likely need to come once the initial methods are hammered out.
Thanks for your feed back and testing. Your ideas have been very helpful.
|
|
Top |
|
 |
pegli
|
Posted: Thu Oct 27, 2005 4:31 pm |
|
Joined: Wed Oct 26, 2005 1:32 pm
Posts: 3
Location:
Santa Cruz, CA
|
wififun wrote: Quote: Instead of rebuilding the XML file each time, the mpg2ipod script might create XML files containing the <item> tag and contents for each video. We can add a PSP file that puts in the common part of the feed file and assembles all of the fragments in the podcast directory on the fly. This allows you to add and delete the video/XML files at random. Once you can treat the video/XML files as a unit, you could extend mythweb to show a list of podcasted videos and allow deletion of episodes from the podcast. Umm, I ran around a similar idea in trying to deal with the metadata issue. I had not expanded on the idea to thinking about mythweb, but that is perfect. This may also resolve the meta data issue completely, because rather than trying to rebuild the feed off of the video files alone, the data is stored there at the time of the encoding. The feed file does need to be rebuilt each time a new file is added in order to facilitate itunes subscribing to this feed.
I've put together a change to mpg2ipod which writes a feed fragment file for each video:
Code: sub GenerateRSSFragment { PrepSQLRead();
$db_handle = DBI->connect("dbi:mysql:database=$db_name:host=$db_host", $db_user, $db_pass) or die "Cannot connect to database: $!\n\n";
open(XML, ">${feedpath}${filename}.${portable}.mov.xml") || die "couldn't open XML fragment file";
@nuvarray = split(/_/, $file); $chanid = $nuvarray[0]; $start = $nuvarray[1]; $end = substr $nuvarray[2],0,14; if($debug == 1){ print "$chanid\n$start\n$end\n"}; $sql = "SELECT title, subtitle, description, category, starttime FROM recorded WHERE chanid = $chanid AND DATE_FORMAT(starttime,'%Y%m%d%H%i%s') = $start"; $statement = $db_handle->prepare($sql) or die "Couldn't prepare query '$sql': $DBI::errstr\n"; $statement->execute() or die "Couldn't execute query '$sql': $DBI::errstr\n"; $row_ref = $statement->fetchrow_hashref(); if($debug == 1){ print "$row_ref->{starttime}\n"};
print XML "<item>\n"; print XML "<title>".$row_ref->{title}." - ".$row_ref->{subtitle}."</title>\n"; print XML "<itunes:author>MythTV</itunes:author>\n"; print XML "<author>MythTV</author>\n"; print XML "<itunes:category text="TV Shows"></itunes:category>\n"; print XML "<description>".$row_ref->{description}."</description>\n"; print XML "<pubDate>".$row_ref->{starttime}."</pubDate>\n"; print XML "<enclosure url="${feedurl}${filename}.${portable}.mov" type="video/quicktime" />\n"; print XML "<itunes:duration></itunes:duration>\n"; print XML "<itunes:keywords>".$row_ref->{category}."</itunes:keywords>\n"; print XML "</item>\n";
close(XML); $statement->finish(); $db_handle->disconnect if ($db_handle); return 0;
}
This is called instead of GenerateRSSFeed. Here's the PHP page which assembles the fragment files into a complete RSS feed: Code: <?php $feedurl="http://www.yourhostnamehere.com/mythweb/ipodfeed/"; header("Content-Type: text/xml"); ?> <? echo "<?xml version="1.0" encoding="UTF-8"?>"; ?>
<rss xmlns:itunes="http://www.itunes.com/DTDs/Podcast-1.0.dtd" version="2.0"> <channel> <title>MythTV Recorded Programs</title> <itunes:author>MythTV - mpg2ipod</itunes:author> <link>$feedurl</link> <itunes:subtitle>Transcoded recording for your iPod Video.</itunes:subtitle> <itunes:summary>Myth TV Recorded Programs for the iPod v.1</itunes:summary> <description>Myth TV Recorded Programs for the iPod v.1</description> <itunes:owner> <itunes:name>MythTV</itunes:name> <itunes:email>mythtv\@localhost</itunes:email> </itunes:owner> <itunes:explicit>No</itunes:explicit> <language>en-us</language> <copyright>Copyright 2005.</copyright> <webMaster>mythtv\@localhost</webMaster> <itunes:image href="http://mythtv.org/themes/Myth_bb2/images/mythtv-logo.jpg" /> <itunes:category text="TV Shows"></itunes:category> <category>TV Shows</category> <image> <url>http://mythtv.org/themes/Myth_bb2/images/mythtv-logo.jpg</url> </image>
<? foreach (glob("*.xml") as $file) { include $file; } ?>
</channel> </rss>
This is saved as mythforipod.php, and the full podcast URL becomes http://www.yourhostnamehere.com/mythweb ... oripod.php. This is pretty unpolished, but it appears to be working on my FC4 system.
I'm going to take a look at adding a page to mythweb that lists all of the podcasted files and allows you to delete them.
|
|
Top |
|
 |
wififun
|
Posted: Thu Oct 27, 2005 8:35 pm |
|
Joined: Mon Jun 21, 2004 11:25 am
Posts: 291
Location:
Ontario, CA
|
pegli, it looks like we both did the same thing at the same time. The new script build individual xml files for each video. I will be updating the script post above once I incorporate a few items from yours. Your PHP idea is great. I am testing it more on this end, and I will have the --bulldphp switch generate the base php file in the feed folder. Once that is done, then we just point iTunes to your php script, and that should do it. Very cool.
I have modified the script to do the DB call before the encoding. The way we only need to pass the %DIR% and %FILE% to the script rather than all the other crud. I will post it in a couple of hours. It will be Beta .6. This will also finalize the naming scheme. I changed the video file names in put underscores in for the spaces rather than completely removing them.
If you could work on the beginnings of the mythweb stuff, then I think we could really be on to something.
|
|
Top |
|
 |
cortez
|
Posted: Sun Oct 30, 2005 11:27 am |
|
Joined: Sun Oct 30, 2005 11:18 am
Posts: 5
|
Hey thats pretty neat stuff. Have you tried viewing the resulting file on an ipod yet?
The reason I ask is that i notice you're saving the output as a .mov file, i haven't been able to get anything without a .m4v extention to play on an ipod w/ video. I only have access to one at work, so I can't try it on my setup. I've been using vlc (already included if you have mythstreamtv) to transcode stuff and it works.
you need a command line like Code: vlc --sout-transcode-deinterlace /myth/tv/1061_20051029233000_20051030000000.nuv --sout #transcode{vcodec=mp4v,acodec=mp4a,vb=500,scale=.5,ab=128,channels=2}:standard{access=file,mux=mp4,url=/myth/downloads/ipodvideo/test.m4v}
I have that working, my next step is to adapt your perl/php scripts to make it a RSS feed. I just want to have the newest episode of certain shows though, so I might need to use some more mythweb integration.
|
|
Top |
|
 |
thelynches
|
Posted: Sun Oct 30, 2005 11:29 am |
|
Joined: Sun Oct 30, 2005 11:27 am
Posts: 2
|
wififun wrote: pegli, it looks like we both did the same thing at the same time. The new script build individual xml files for each video. I will be updating the script post above once I incorporate a few items from yours. Your PHP idea is great. I am testing it more on this end, and I will have the --bulldphp switch generate the base php file in the feed folder. Once that is done, then we just point iTunes to your php script, and that should do it. Very cool.
I have modified the script to do the DB call before the encoding. The way we only need to pass the %DIR% and %FILE% to the script rather than all the other crud. I will post it in a couple of hours. It will be Beta .6. This will also finalize the naming scheme. I changed the video file names in put underscores in for the spaces rather than completely removing them.
If you could work on the beginnings of the mythweb stuff, then I think we could really be on to something.
Is there a central place you have put the recent files on? I am working on getting the above going right now, but would love to see any updates either of you have.
Thanks,
Chris
|
|
Top |
|
 |
rteichman
|
Posted: Sun Oct 30, 2005 2:24 pm |
|
Joined: Wed Feb 02, 2005 4:07 pm
Posts: 141
|
Well I am finally back home again and was able to try it. After some initial setbacks I found that it works GREAT (and yes I did view the result on my iPod)!
Some gotchas that I ran into:
1) When I copied/pasted the text from this web page into a text file for my script some weird characters came along and thus stoped the script from working. I work on a Mac and my text editor is uni-code capable. In the end I had to open MS Word, format the page for landscape and paste the text there, then save it as a txt file
2) VNC and mythtv-setup do NOT work together. Have no idea why but after answering "No" to reseting my video cards or channels it always dumped me back into the shell. I finally gave up and had to connect a monitor to my KnoppMyth box to run mythtv-setup locally
3) For some reason I needed to use the parameter "%DIR%/" as opposed to what is stated in the instructions (there it says to use "%DIR%" ...without the slash). I found that my script file required the directory input to be /myth/tv/ as oppsed to the standard directory of /myth/tv (notice the extra slash?). This might have something to do wiht my 1st issue.
Other than that it all works GREAT!!!!
THANKS!!!!!! This now makes my video iPod truly a worthwile purchase
|
|
Top |
|
 |
thelynches
|
Posted: Sun Oct 30, 2005 2:28 pm |
|
Joined: Sun Oct 30, 2005 11:27 am
Posts: 2
|
rteichman wrote: Well I am finally back home again and was able to try it. After some initial setbacks I found that it works GREAT (and yes I did view the result on my iPod)!
Some gotchas that I ran into: 1) When I copied/pasted the text from this web page into a text file for my script some weird characters came along and thus stoped the script from working. I work on a Mac and my text editor is uni-code capable. In the end I had to open MS Word, format the page for landscape and paste the text there, then save it as a txt file
2) VNC and mythtv-setup do NOT work together. Have no idea why but after answering "No" to reseting my video cards or channels it always dumped me back into the shell. I finally gave up and had to connect a monitor to my KnoppMyth box to run mythtv-setup locally
3) For some reason I needed to use the parameter "%DIR%/" as opposed to what is stated in the instructions (there it says to use "%DIR%" ...without the slash). I found that my script file required the directory input to be /myth/tv/ as oppsed to the standard directory of /myth/tv (notice the extra slash?). This might have something to do wiht my 1st issue.
Other than that it all works GREAT!!!!
THANKS!!!!!! This now makes my video iPod truly a worthwile purchase
Success here as well though I didn't experience your problems you list. The only problem I had was getting ffmpeg to compile correctly, but once I did I had no issues. I have a few old episodes of the Daily Show transcoding as we speak  How sweet! Many kudos to everyone who put this together for us!
The only thing I'd like to see is per show feeds in iTunes. That way I can make sure certain shows expire from my podcasts at different rates. Either way, this is slick and it works!
|
|
Top |
|
 |