With the recent addition of Plex DVR I have been recording shows and adding them to my media library. I’m still having issues that my Roku3 boxes won’t play the HD content and so I have removed the HD channels from the line up and everything records in SD.
The SD files from Plex DVR are recorded as MPEG-2 TS Video (.ts). This worked ok, the playback is a little slower and puts a bit more work on the server to transcode it. Fast forwarding and rewinding was also a little slow.
For example, an episode of EastEnders (This is for the wife, not me! Surprisingly, I don’t really watch TV, I just enjoy playing with the media server) on SD on Plex DVR, a half hour show is approximately 850MB with a resolution of 704 x 576px, a data rate of 15000kbps and a frame rate of 25 frames/second.
Now, compare this to an episode from iPlayer which is approximately 490MB in size with a resolution of 1280 x 720px, a data rate of 2308lbps and 25 frames/second and in MP4 format which plays without any additional load on the server.
I started playing with get_iplayer and found this to work very well. I still record the other broadcasters soaps OTA using Plex DVR but the BBC content I have now moved to iPlayer downloads.
The get_iplayer install itself is dead easy, I then have some scripts which use this to grab the content and place it in to my media library for Plex to index.
I wrote a very basic script in PowerShell which then runs every hour. In short it grabs the programmes that I have requested and pops them into their correct folder.
First off, I run an update to the programme list and then export this to a text file so I can browse through at my leisure, I can also use the datetime stamp as an indicator that it’s still working, which I monitor with PRTG and get an alert if its more than 4 hours old.
start-process "C:\Program Files (x86)\get_iplayer\get_iplayer" @' --refresh --nopurge '@ -Wait start-process "C:\Program Files (x86)\get_iplayer\get_iplayer" @' > c:\temp\bbctvguide.txt --nopurge '@ -Wait
After this I run a command in the script for each programme that I want, i.e:
start-process "C:\Program Files (x86)\get_iplayer\get_iplayer" @' --get "Postman Pat" --file-prefix="
- S<00seriesnum>E<00episodenum> - " --whitespace --output="D:/TV Shows/Kids/Postman Pat" --refresh-include="CBeebies --nopurge" '@ -Wait
This command finds any shows that are titled “Postman Pat” that are on the channel “CBeebies” and saves it to the directory above with the Filename “Postman Pat – S01E01 – Name of Episode”.
You can get a full list of parameters here.
Get_iplayer has its own database and so it won’t download a show that you have already downloaded, so this script will really only get any new shows. (you can clear the history be removing the file ‘C:\Users\username\.get_iplayer\download_history’, or just edit it in Notepad and remove the entry that you wish to re-download.)
I then have another section at the end of the script to remove old versions of some shows. The kids TV for example I just leave on there, but the soaps I remove after 7 days with:
Get-ChildItem -Path "D:\TV Shows\General\EastEnders" -Recurse -File | Where CreationTime -lt (Get-Date).AddDays(-7) | Remove-Item -Force
Plex automatically indexes the new shows that it finds and the playback is fantastic. I just wish there was an equivalent way to grab other broadcasters shows.
The beauty of having these shows all on Plex is that I can then remotely sync any show to any mobile device, thus making holidays and long trips that little bit less tedious.