Post Processing Script hangs

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
johimself
Newbie
Newbie
Posts: 2
Joined: March 5th, 2014, 3:34 am

Post Processing Script hangs

Post by johimself »

Hi, I am trying to run a post processing script which uses FFMpeg to remux .mkv files into .mp4 files. All it does is copy both the audio and video codecs and put the content in a new container then delete the .mkv version.

The script hangs, the SAB interface shows "Running script", ffmpeg is shown as still running but using no system resources and SAB will no longer process any more scripts on subsequent files. If I click on the Script Log button in the SAB interface it shows as blank.

I was wondering if anyone could show me the error that my script is causing or tell me where the log files for scripts are kept (or if there is a way of seeing script progress while the script is running). The script is as follows:

Code: Select all

set ffmpeg="C:\Program Files\FFMPEG\bin\ffmpeg.exe" 

set name=%3
set name=%name:"=%
set dirname=%1
set dirname=%dirname:"=%

for /R "%dirname%" %%f in (*.mkv) do (
%ffmpeg% -i "%%f" -vcodec copy -acodec copy "%dirname%\%name%.mp4" 
del "%%f")

exit
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: Post Processing Script hangs

Post by sander »

Does the script work when you just run it from the command line (so NOT from SAB)?

I would put an echo before, in and after the for-loop. AFAIK SAB shows the script output.
johimself
Newbie
Newbie
Posts: 2
Joined: March 5th, 2014, 3:34 am

Re: Post Processing Script hangs

Post by johimself »

Hi, thanks for your reply.

Interestingly running the script with variables thrown at it makes it hang on a y/n prompt.

The script runs through the file specified by the script with no problem, then when it tries to start remuxing another mkv file in the directory then it tries to give it the same filename as the first. This is when it asks if I want to overwrite y/n (which obviously isn't an option for SAB)

Looks like I'll have to look at truncating filenames etc to make another variable of the .mkv filename without the .mkv extention which I can then use as the filename of the .mp4

If anyone has any insight into how to do this that would be great.

Thanks for your help.
Post Reply