2008-02-10, 07:51 PM
So, I've been a long time user of GBPVR as my primary recording device, I thought I'd share a write up on how I have GBPVR setup to allow me to subscribe to my recordings and have them sync automatically to my iPhone for viewing on my daily commute.
I didn't want to use the EWA RSS feeds with enclosures because I only wanted certain shows, not all completed recordings (I have no particular need to watch my wifes episodes of Coronation Street each morning).
I borrowed heavily from this post but used HFS to serve up the files (feeds and recordings).
The software required:
1. HFS
2. XMLerator
3. Script to delete transcoded files when mpeg is deleted (see below)
The configuration:
1. I have GBPVR configured to automatically transcode everything using the iPod video configuration. (This is left over from my first attempt at getting video to my iPod, I could probably use a batch file to transcode only the programs that I would like transcoded, but at this point I haven't bothered, this also has the benefit that if there is a movie or something that I recorded that I want to manually add to iTunes, it's always there the next day.)
2. Since I didn't want to delete the original recordings from my haddrive because of the quality difference, I needed a way to remove the mp4 recordings when the mpegs were deleted either automatically by GBPVR or manualy. So I wrote this script that runs after the EPG update (run from the PostUpdateEPG.bat). It searches through all the folders in my recordings directory and if there is an mp4 file that doesn't have a matching mpg file it deletes it.
4. Also in PostUpdateEPG.bat I have a line to run XMLerator for each show that I want a podcast generated:
cd E:\Recordings\The Daily Show With Jon Stewart
"c:\Program Files\XMLerator\XMLerator.exe" TheDailyShowWithJonStewart.txt
The contents of TheDailyShowWithJonStewart.txt:
5. I use HFS to serve up my recordings directory so I can allow iTunes to access the XML file generated in step 4.
6. In iTunes in the menu, select Advanced > Subscribe to Podcast and paste in the URL of the XML file (should be something like http://GBPVRMachine:7650/Recordings/The Daily Show With Jon Stewart/TheDailyShowWithJonStewart.xml).
Where I have GBPVRMachine:7650 you would have to replace with either your GBPVR machines IP address or localhost if you are running everything off one computer and replace 7650 with the port that HFS is using.
Because this will serve up all the mp4 files in the folder and the podcast will contain all of them, I have iTunes set up to keep only the most recent episode so that it will only keep copies of the recordings in the recordings folder.
So using this, each morning when I grab my iPhone, it has the latest episodes of each show that I have a line in PostUpdateEPG.bat for. And I have something to do on my morning commute when I finish the news paper.
I should note that I only have this configured to work within my local network, I don't open the HFS port, but theoretically opening/forwarding that port on your router should allow you to access this out side your local network.
I didn't want to use the EWA RSS feeds with enclosures because I only wanted certain shows, not all completed recordings (I have no particular need to watch my wifes episodes of Coronation Street each morning).
I borrowed heavily from this post but used HFS to serve up the files (feeds and recordings).
The software required:
1. HFS
2. XMLerator
3. Script to delete transcoded files when mpeg is deleted (see below)
The configuration:
1. I have GBPVR configured to automatically transcode everything using the iPod video configuration. (This is left over from my first attempt at getting video to my iPod, I could probably use a batch file to transcode only the programs that I would like transcoded, but at this point I haven't bothered, this also has the benefit that if there is a movie or something that I recorded that I want to manually add to iTunes, it's always there the next day.)
2. Since I didn't want to delete the original recordings from my haddrive because of the quality difference, I needed a way to remove the mp4 recordings when the mpegs were deleted either automatically by GBPVR or manualy. So I wrote this script that runs after the EPG update (run from the PostUpdateEPG.bat). It searches through all the folders in my recordings directory and if there is an mp4 file that doesn't have a matching mpg file it deletes it.
Code:
Option Explicit
Dim oFSO
Dim sDirectoryPath
Dim oFolder
Dim subFolders
Dim showFolder
Dim showFile
Dim oFileCollection
Dim oFile
Dim showFullName
Dim showName
Dim showExt
'14
'Customize values here to fit your needs
Set oFSO = CreateObject("Scripting.FileSystemObject")
sDirectoryPath = "e:\recordings"
set oFolder = oFSO.GetFolder(sDirectoryPath)
set subFolders = oFolder.SubFolders
set oFileCollection = oFolder.Files
For each showFolder in subFolders
set oFileCollection = showFolder.Files
For each showFile in oFileCollection
showFullName = showFile.Path
showName = Mid(showFullName,1,len(showFullName)-3)
showExt = Mid(showFullName,len(showFullName)-2,3)
If showExt = "mp4" Then
If Not oFSO.fileExists(showName & "mpg") Then
showFile.delete
End If
End If
Next
Next
'Clean up
Set oFSO = Nothing
Set oFolder = Nothing
Set oFileCollection = Nothing
Set oFile = Nothing
Set sDirectoryPath = Nothing
Set subFolders = Nothing
Set showFolder = Nothing
Set showFile = Nothing
Set showFullName = Nothing
Set showName = Nothing
Set showExt = Nothing
4. Also in PostUpdateEPG.bat I have a line to run XMLerator for each show that I want a podcast generated:
cd E:\Recordings\The Daily Show With Jon Stewart
"c:\Program Files\XMLerator\XMLerator.exe" TheDailyShowWithJonStewart.txt
The contents of TheDailyShowWithJonStewart.txt:
Code:
[GENERAL]
basedirectory=E:\Recordings\The Daily Show With Jon Stewart
rssfilename=TheDailyShowWithJonStewart.xml
linkbasedirectory=E:\
aggregatefiles=true
includesubdirectories=true
[RSS]
Title=The Daily Show With Jon Stewart
Link=http://GBPVRMachine:7650/<DirectoryOffset><RssFileName>
Description=Daily Show Podcast
Category=TV
ItemTitle=
ItemLink=http://GBPVRMachine:7650/<DirectoryOffset><FileNameFull>
[FILEEXT]
mp4=video/mpeg
5. I use HFS to serve up my recordings directory so I can allow iTunes to access the XML file generated in step 4.
6. In iTunes in the menu, select Advanced > Subscribe to Podcast and paste in the URL of the XML file (should be something like http://GBPVRMachine:7650/Recordings/The Daily Show With Jon Stewart/TheDailyShowWithJonStewart.xml).
Where I have GBPVRMachine:7650 you would have to replace with either your GBPVR machines IP address or localhost if you are running everything off one computer and replace 7650 with the port that HFS is using.
Because this will serve up all the mp4 files in the folder and the podcast will contain all of them, I have iTunes set up to keep only the most recent episode so that it will only keep copies of the recordings in the recordings folder.
So using this, each morning when I grab my iPhone, it has the latest episodes of each show that I have a line in PostUpdateEPG.bat for. And I have something to do on my morning commute when I finish the news paper.
I should note that I only have this configured to work within my local network, I don't open the HFS port, but theoretically opening/forwarding that port on your router should allow you to access this out side your local network.
Using GB-PVR since December 2005