[mythtv-users] MythTV -> RSS -> PSP automation
greg at nodecam.com
greg at nodecam.com
Fri Jun 15 20:17:56 UTC 2007
As mentioned in a previous thread, I had a goal of being able to watch
"The Daily Show" and "SportsCentre" on the bus ride to work every morning
without requiring any manual intervention.
I have accomplished the goal! Woo Hoo!
What is does:
- Automatically commercial flag, cut and reencode to a PSP compatible format
- Publish those files as an RSS feed which the PSP can subscribe to
Here's how it's done:
1) I created a script based heavily on the RemoveCommercial script found
on the wiki:
See the attached file (psprssencode.sh) for what I came up with.
I then linked that in as UserJob1 with the following command:
/usr/local/bin/psprssencode.sh %DIR% %FILE% %CHANID% %STARTTIME% '%TITLE%'
There's one piece of config in the script - where you want the files to be
dropped. That directory has to be web accessible.
Also in that directory, I dropped the tds.php file attached and an SVN
copy of feedcreator.class.php (available at
) into the same directory as the MP4 files.
I pointed the PSP at the "tds.php" file on my webserver, and subscribed.
There are a couple of config items in "tds.php" - specifically the show
name and a path to an icon for the feed. I could have put them as
parameters, but I'm not PHP security guy, and I didn't want to chance
screwing it up and providing a big potential security problem. If you put
"MP4" in as $ShowName, it'll expose all MP4 files in the directory via
RSS. Use as you see fit.
End result - it works, but I haven't been able to take advantage of it
yet. First night, I screwed up and left the PSP inside the RSS feeds
area, so it didn't run the scheduled download. Then last night, I'd
played with the time to see if the auto-download would trigger, and I
forgot to change it back to 6AM. I have every confidence that it'll work
for me in the future though.
The ffmpeg commandline that is in psprssencode.sh requires a fairly new
version of ffmpeg with aac and h264 support. If it doesn't work for you,
try changing "-vlevel 13" to "-level 13" Also, it requires a fairly
current firmware revision on your PSP. I'm running 3.40 OE-A, but I think
that the official firmwares >=3.30 should all work just fine too.
If anyone has any questions about what I did, or how to get it working,
fire away, and I'll do what I can to answer them.
More information about the mythtv-users