Post-processing

Al Feersum al.feersum at gmail.com
Thu Jan 8 07:29:23 PST 2015


Ta.

I prefer my 'doze VM, dedicated to GiP.  Don't want to overtax my Pi.

... and Bash - well, it's been a long time since I've written 'nix shell scripts (using Korn, Awk & Sed), and I much prefer PowerShell now, especially with its built in XML handling and embedded .NET support making using assemblies like taglib really easy.

The generic XML metadata contains a lot more information than the xbmc .nfo files generated with GiP, (<duration/> and <modesizes/> elements) allowing for much better automated sanity checking, plus, the files contain all the info needed to generate a .nfo file (for series and one-offs - though a bit of logic will be required to determine what are one-offs - more recently, the generic xml is including the <brand/> element making it easier).

Some of this info gives the option to sanity check the file:

Get the <modesizes/> data and the <mode/> value, compare the file size with the expected size.  If it's valid, process it, if not, read in the download history and remove the relevant entry, save the file and delete the invalid download.  Next PVR pass, program will download again.

With the other data, generate (or update) the tvshow.nfo and episode.nfo files - the data is all there.  For movies, a bit of cleverness might be required to generate the .nfo file (parse <categories/>, and if 'film' is an entry, then assume 'movie' - other checks can also be performed)

Then the script can copy the file to \\share\tvshows\series\episode.mp4, \\share\tvshows\oneoffs\name\name.mp4, \\share\tvmovies\moviename\movie.mp4 etc.

Anything that can't be dealt with, send out an email alert - then write handling logic to cover it when time permits.

But I'll certainly investigate the various options that have been suggested.  Much appreciated all.

BTW, when I get the script running to my satisfaction, I may make it available (with a config file - allowing others to easily change source/target data locations etc).

-----Original Message-----
From: Jon Davies [mailto:jon at hedgerows.org.uk] 
Sent: 07 January 2015 22:41
To: Al Feersum
Cc: get_iplayer
Subject: Re: Post-processing

On 6 January 2015 at 14:53, Al Feersum <al.feersum at gmail.com> wrote:
>
> Apologies if this has been asked before, but is there a method for 
> adding a post-processing command to the download sequence?

Yes, it's the --command option

> Running on 'doze 8.1 x64 with no issues (even AtomicParsley works great).
>
> I currently use the WebPVR for scheduling and this works fine, and 
> manually copy the dumps to a Win2k12R2 Essentials server.  I've now 
> got a RaspBMC device which I use to access the library
You could always consider using the raspberry pi to run get-iplayer - I find it easier to write bash scripts than windows powershell or command scripts...  but that might be a matter of taste.
(https://github.com/get-iplayer/get_iplayer/wiki/raspbian ought to work with raspbmc, but I haven't tried.)


> So what I want to do is to get GiP to generate a 'doze event log entry 
> after the download process (incl. conversion, tagging and metadata 
> file gen) has completed, so I can trigger a task scheduler process to 
> post-process the data and move it to the right location.
another message mentioned creating an xbmc metadata file - get-iplayer can already do this:
--metadata xbmc
works well enough with xbmc for me.
get-iplayer can also create folder structures to put things in the right place (though I concede that might not work for you, because as you note it doesn't seem to like downloading to network drives)

a few options that work for tv programmes with xbmc for me include:
--subdirformat <nameshort>/Series_<seriesnum> --subdir --fileprefix s<seriesnum>e<episodenum>_<episode>
--metadata xbmc

Regards
Jon




More information about the get_iplayer mailing list