[Windows] Post Processing Scripts

Come up with a useful post-processing script? Share it here!
Locked
markus101
Release Testers
Release Testers
Posts: 406
Joined: August 13th, 2008, 2:51 am

[Windows] Post Processing Scripts

Post by markus101 »

All,

I have created a suite of Post Processing Scripts, so called on Google Code, sabscripts. Currently I have uploaded the Binaries for the Movies and XBox360 script (as linked to from this SAB forum post: http://forums.sabnzbd.org/index.php?topic=1735.0).

Both scripts are available directly from: http://sabscripts.googlecode.com

All scripts will be written in CSharp, using .Net Framework 2.0 (or higher, though none are yet). So .Net Framework 2.0 will need to be installed.

I have plans to also release two scripts designed for Converting TVShows to iPhone/iPod Touch format, the first of the two scripts is working and available for compilation in the SVN, but is currently hard-coded around my TVShow naming convention (Show Name - S01E01 - Episode Name).

The Movie script currently handles Xvid/Divx releases in one or two files, HD MKV or WMV files and mp4 (restricted to a single file).
For Single file releases the script will take the name of the SABnzbd Job and rename the movie to that name and place it in a root folder, for two file AVI releases it will combine them using mencoder and rename them to the SABnzd job name.

The XBox360 script is described in the forum link posted above.

If you have any questions or comments, please let me know, these are my first attempts at Coding in CSharp (previously they were written with AutoHotKey), so there are probably better ways of doing some of the coding and not everything will be handled gracefully.

-Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
markus101
Release Testers
Release Testers
Posts: 406
Joined: August 13th, 2008, 2:51 am

Re: [Windows] Post Processing Scripts

Post by markus101 »

TVShows scripts are available, you will need AtomicParsley and HandBrake (linked on the main page ofsabscripts.googlecode.com).

Shows must be named Show Name - S01E01 - Episode Name.ext for them to work, two scripts are included, one moves the files and the other converts them, this was done to allow use of a faster computer to do the conversion (in my case my main desktop versus my homeserver box).

One limitation is shows with a Dash in the Title, or episode name with cause a bunch of issues, with the conversion, I'll work on it at some point, which should also open the doors for different naming conventions.

If you have any questions, please let me know.

-Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
markus101
Release Testers
Release Testers
Posts: 406
Joined: August 13th, 2008, 2:51 am

Re: [Windows] Post Processing Scripts

Post by markus101 »

Version 0.2 of TVMove and TVConvert have been uploaded in the TVShows package. This will allow support for different naming conventions and in most cases conversion will work fine (but may be lacking detailed iTunes information done by Atomic Parsley).

More info is available at http://code.google.com/p/sabscripts

-Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
digitaluk
Newbie
Newbie
Posts: 1
Joined: January 3rd, 2010, 8:00 pm

Re: [Windows] Post Processing Scripts

Post by digitaluk »

Hi there,

Not being funny, but how exactly do you use the .exe files? I've edited the config file of the 360 package to match my abgx360 directory etc, but how do I integrate the 360.exe with SabNZB?

Thanks :-) (windows user btw)
markus101
Release Testers
Release Testers
Posts: 406
Joined: August 13th, 2008, 2:51 am

Re: [Windows] Post Processing Scripts

Post by markus101 »

You need to set it up as a post processing script in the SABnzbd Web UI, you can either set it to the Console Category or manually set it for each download. There should be a script dropbox where you can select the script - you will first need to place the script (Exe and Config File) in the directory that SAB uses for scripts, which can be verified in the Configuration for SABnzbd.

Hope this helps,

Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
madlan
Release Testers
Release Testers
Posts: 40
Joined: October 8th, 2008, 7:08 am

Re: [Windows] Post Processing Scripts

Post by madlan »

Works great, thanks!
Last edited by madlan on January 16th, 2010, 2:17 pm, edited 1 time in total.
madlan
Release Testers
Release Testers
Posts: 40
Joined: October 8th, 2008, 7:08 am

Re: [Windows] Post Processing Scripts

Post by madlan »

Markus, would it be possible to create a folder for each movie?
eg. C:\Movies\Movie Title (2009)\Movie Title (2009).avi
Rather than dumping it directly in the root folder?

Most metadata tools use the movie folder for storing and searching metadata such as artwork and sml files etc.
markus101
Release Testers
Release Testers
Posts: 406
Joined: August 13th, 2008, 2:51 am

Re: [Windows] Post Processing Scripts

Post by markus101 »

It is a possibility, though I probably won't implement it - with XMBC it stores it all on the XBMC box so this way works best for me.

-Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
madlan
Release Testers
Release Testers
Posts: 40
Joined: October 8th, 2008, 7:08 am

Re: [Windows] Post Processing Scripts

Post by madlan »

Would it be possible to run a secondary script etc to create the folder?
markus101
Release Testers
Release Testers
Posts: 406
Joined: August 13th, 2008, 2:51 am

Re: [Windows] Post Processing Scripts

Post by markus101 »

It's not really the need to run a second script, but more that I'm deleting the folder after moving (and renaming) the video folder, or in the case of multiple AVI files I'm combining them in place at the destination.

It would take some work to have both options available since, I'm going to be making some changes to the code anyways, so I'll take a look and see how easy it would be to do. If it's not too bad I'll make it a config option.

-Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
markus101
Release Testers
Release Testers
Posts: 406
Joined: August 13th, 2008, 2:51 am

Re: [Windows] Post Processing Scripts

Post by markus101 »

Madlan,

Movies 0.2.2 now has the option to keep the Final Folder that SAB extracts to. See the deleteFolder boolean value in the config file, set it to false to get the setting you want.

If you notice any bugs with it, please let me know.

-Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
markus101
Release Testers
Release Testers
Posts: 406
Joined: August 13th, 2008, 2:51 am

Re: [Windows] Post Processing Scripts

Post by markus101 »

0.2.3 for Movies released to properly delete the uncombined AVI files after combining them.

-Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
samlaver
Newbie
Newbie
Posts: 1
Joined: March 11th, 2010, 5:21 pm

Re: [Windows] Post Processing Scripts

Post by samlaver »

This is probably a real simple question, but I am flustered not being able to find the answer.  Your documentation for your movie script points to Mencoder "mencoder is required for joining multiple AVI files, it can be downloaded as part of the MPlayer Suite, available here:" I have looked all through the unofficial packages for windows and not found anything close to your description.  I went ahead and download the windows binary package and windows codec and installed them.  As it tried so start process the two files it had an error, and did not work.  Here is the log it created in sabnzbd:

Unhandled Exception: System.ComponentModel.Win32Exception: The system cannot find the file specified at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfostartInfo)
  at System.Diagnostics.Process.Start()
  at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
  at System.Diagnostics.Process.Start(String fileName, String arguments)
  at Movies.Program.Main(String[] args)

I am guessing that I have possible downloaded the wrong mplayer that your script is configured for so if you could point to the right file that may solve the problem.  One side not I am using the movie sorting function in 0.5.0 and renaming my movies to reflect "movie name"\"movie name".avi and then using the multi-part label to add cd1\cd2.  Thanks for your help.
markus101
Release Testers
Release Testers
Posts: 406
Joined: August 13th, 2008, 2:51 am

Re: [Windows] Post Processing Scripts

Post by markus101 »

I believe I downloaded the following from the mplayer site:
MPlayer SVN Windows with SMPlayer  GUI (recommended)

It was some time ago that I installed it, but as long as mencoder is installed and in the path it should work.

The error you posted appears to be due to mencoder.exe missing, renaming the movies should not be an issue as the application looks for all AVI's in the folder not caring about the name.

-Markus
Co-developer of NzbDrone (.Net NNTP PVR) - http://www.nzbdrone.com
vinister
Jr. Member
Jr. Member
Posts: 53
Joined: March 13th, 2010, 1:38 pm

Re: [Windows] Post Processing Scripts

Post by vinister »

I can't get the movie script to work.

SAB says "ran movies.exe", but if I click on the script icon it says "request unsuccessful".

I have all 3 folders set to D:\VIDEO\MOVIES\, as I keep all my movies together regardless of resolution.

I set a logging DIR but it remains empty.

Any idea what's going on?
Locked