Page 4 of 7
Re: [Windows] Post Processing Scripts
Posted: August 20th, 2010, 3:17 am
by tzortst
Bad news, downloaded something and it returned this error
Any ideas?
This was a 2 CD file
edit: I should also add i did install smplayer but i don't think that is the correct media encoder, got it from this site
http://www.mplayerhq.hu/design7/dload.html i couldn't find mencoder anywhere
Code: Select all
The Union 2009 DOCU DVDRip XviD aAF
Unhandled Exception: System.ComponentModel.Win32Exception: The system cannot find the file specified
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
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)
Re: [Windows] Post Processing Scripts
Posted: August 20th, 2010, 9:44 am
by markus101
Grab the 7z file from here:
http://sourceforge.net/projects/mplayer ... on%2031878
It has mencoder.exe (a whopping 15MB).
You will need to unzip it and move it to either the script directory or another permanent directory and add that location to the PATH variable on your system.
The link the Mplayer with Mencoder is here:
http://oss.netfarm.it/mplayer-win32.php
So many packages with different bits available, I should just include Mencoder going forward, just need to do some testing with that, it is released under the GPLv2, I I see no issues with including it.
Hope this helps.
-Markus
Re: [Windows] Post Processing Scripts
Posted: September 8th, 2010, 12:21 am
by tzortst
markus101 wrote:
Grab the 7z file from here:
http://sourceforge.net/projects/mplayer ... on%2031878
It has mencoder.exe (a whopping 15MB).
You will need to unzip it and move it to either the script directory or another permanent directory and add that location to the PATH variable on your system.
The link the Mplayer with Mencoder is here:
http://oss.netfarm.it/mplayer-win32.php
So many packages with different bits available, I should just include Mencoder going forward, just need to do some testing with that, it is released under the GPLv2, I I see no issues with including it.
Hope this helps.
-Markus
Hey Mate,
Only recently had a chance to try it all out and all seems to be running well.
Thanks very much for you time
Re: [Windows] Post Processing Scripts
Posted: November 9th, 2010, 11:38 pm
by triod
Ive installed NET v4, and the programs you wrote all crash...is that a by product of the update, or is it just not compatible with the newer version...I guess I will have to find an older version and reinstall....
Re: [Windows] Post Processing Scripts
Posted: November 9th, 2010, 11:48 pm
by markus101
SABSync requires 4.0 the other should only require 2.0, do you have 2.0 installed? Do you have an error message that you can supply me or provide more details in how they "crash"?
-Markus
Re: [Windows] Post Processing Scripts
Posted: November 14th, 2010, 7:02 pm
by jeneral
I'm trying to use your Movies.exe script on Windows 7 x64 (.NET 4.0 because it wouldn't let me install 2.0) with no success. Initially, I was using a small sample and after reading this thread I saw it was being discarded. Now, I'm using a larger file but even running the program from the command line, it just deletes the files in the 'Movies' folder and generates no log. Any ideas?
Here is the command I'm using:
movies "d:\videos\movies" 2 "test.avi"
Here is my .config file:
Re: [Windows] Post Processing Scripts
Posted: November 16th, 2010, 12:16 am
by jeneral
markus101 wrote:
Do you have an error message that you can supply me or provide more details in how they "crash"?
I tried your scripts on a Windows 7 x86 PC with similar results. Here is the output from the command window:
C:\Users\jeneral\Documents\SABnzbd>movies E:\Videos\Movies 2 test.avi
Unhandled Exception: System.IO.IOException: The device is not ready.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, DirectorySecurity dirSecurity)
at System.IO.Directory.CreateDirectory(String path, DirectorySecurity directorySecurity)
at Movies.Program.Main(String[] args)
Re: [Windows] Post Processing Scripts
Posted: November 16th, 2010, 10:46 am
by markus101
I see the problem (running the script through SABnzbd would overcome this issue), but here is the explanation.
This script (Movies.exe) is designed to run against a single movie in a folder, not a bunch of movies in a folder, while it would work fine if you only had a test movie in there, anything more would either cause it to fail or to combine a bunch of movies into a single file.
To manually run Movies.exe you could pass it a path to the movie you would like to process.
Code: Select all
Movies.exe "D:\Temp\New Movie (2010)" 2 "New Movie (2010)"
Your config looks good and since you have set "deleteFolder" to false you would end up with your movie like so:
Code: Select all
D:\Videos\Movies\New Movie (2010)\New Movie (2010).ext
(where ext is avi/mkv/wmv or mp4).
If you wish to have all video files under "D:\Videos\Movies\" without subfolders, you would just change deleteFolder to true.
If you have anymore questions, please let me know.
-Markus
Re: [Windows] Post Processing Scripts
Posted: November 16th, 2010, 12:41 pm
by jeneral
markus101 wrote:
This script (Movies.exe) is designed to run against a single movie in a folder, not a bunch of movies in a folder, while it would work fine if you only had a test movie in there, anything more would either cause it to fail or to combine a bunch of movies into a single file.
Thank you for the reply. I only have one movie in the folder I'm running my tests on. I also tried putting the test movie in a subfolder of E:\videos\movies.
Unfortunately, the only other way to test this is to download an NZB that when extracted is named incorrectly yet is larger than 100MB. I uploaded a 10MB file to alt.binaries.test for this purpose before I found out your script ignores small files. Do you know any such test files I could download?
I will try your suggestions when I get home and post the results.
Re: [Windows] Post Processing Scripts
Posted: November 16th, 2010, 4:35 pm
by markus101
You could try a TV episode, set to the movie category (or any non-tv category) and ensure it is assigned to run the Movies.exe script.
A possible cause of the error you posted is permissions, not sure if you have ensured that the account running Movies.exe has permissions to the folder(s) you are working with.
-Markus
Re: [Windows] Post Processing Scripts
Posted: November 16th, 2010, 6:58 pm
by jeneral
OK, I played around a bit with this and I think I figured it out. In the process I may have found a nasty bug.
The reason my Windows 7 x86 install was having issues was due to my not modifying the config file. My x64 uses D: while my x86 use E:. Doh! Once that was out of the way, I managed to figure how to use this program.
New config:
Here was my test scenario. One movie called test.avi in e:\temp\movies\dummy (a.k.a. e:\temp\movies\dummy\test.avi).
The following command renames the 'dummy' folder to "New Movie (2010)" and the avi to "New Movie (2010).avi":
Movies.exe "E:\Temp\Movies\Dummy" 2 "New Movie (2010)"
This command erases EVERYTHING in the folder INCLUDING the Movies folder:
Movies.exe "E:\Temp\Movies" 2 "New Movie (2010)"
Neither of the above commands creates any log file. I'm assuming the second command sees the empty folder as 'empty' and deletes it. Isn't it possible that a nested Movie might be extracted?
Re: [Windows] Post Processing Scripts
Posted: November 19th, 2010, 2:01 am
by markus101
Movies shouldn't delete anything until it processes a proper sized movie (except for small files, such as samples, nfo, sfv etc). It won't delete folders and it will actually look into nested folder for video files.
Your first example is the command that should be run, the second is not supposed to do anything, but it could cause some issues given that the folder is your root movie folder and could contain any number of files, and do to that also being your destination directory for those files, I can see it being problematic. SABnzbd will never run a script on the root of your downloads, it will always point to the sub-folder and the issue will not arise.
What the second command actually told movies.exe to do is (also adjusted further by "useFolderName" being set to true), was get a list of all files, and determine if it is AVI, MKV, WMV or MP4, based on that it would create a sub-folder under Movies, called Movies, act on the proper video file found (move, or combine multiple files) then delete "E:\Temp\Movies" including all files and folder contained within.
If your movieDir/hdMovieDir was set to "E:\Videos\Movies" it would have created the folder there, moved the file and then deleted "E:\Temp\Movies" and your video file would be like so "E:\Videos\Movies\Movies\Movies.avi".
I hope this clears up what you were experiencing, if you need further clarification, please let me know.
-Markus
Transcode
Posted: December 31st, 2010, 11:36 am
by nyquist
First off, love the script. Works great.
I had been using avimerge for years on Linux - it was fast and quality was great because it didn't re-encode. Unfortunately until recently it wasn't available for windows and didn't compile properly for cygwin, until this guy figured it out.
http://binaryinspirations.blogspot.com/ ... n-115.html
It comes with the dlls to run standalone (without installing full cygwin). You just need to add whatever path you unpack it into to your path statement.
How difficult would it be to use this in your script instead?
Re: [Windows] Post Processing Scripts
Posted: December 31st, 2010, 1:35 pm
by markus101
Wow, this is tiny, especially when compared to mplayer. Looks like this should be pretty simple to implement, might even leave support for mplayer in there with a configuration switch, but it'll be easy to package this up as opposed to mplayer and use it by default I think. I'll try to get to it soon, but no promises.
Happy New Year!
-Markus
Re: [Windows] Post Processing Scripts
Posted: January 6th, 2011, 7:51 pm
by markus101
Maybe I'm just doing it wrong, but on a video file I converted only the first half had audio (I combined two episodes of a TV show that both have sound when I play them individually). This is the command I used:
Code: Select all
avimerge.exe -o "C:\Test\avimerge\Test Movie (2011).avi" -i "C:\Test\1.avi" "C:\Test\2.avi"
Trying to skip ahead seemed pretty slow (slower than on the individual files, but I haven't compared that to a video that I combined with mencoder).
Any thoughts? I'd love to implement this since it is so tiny in comparison.
-Markus