NextPVR Forums

Full Version: PostProcessing.bat and VideoReDo TvSuite4
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
SOLVED: http://forums.nextpvr.com/showthread.php...post450831

Attached is Scripts.7z, which has my comskip.ini, ParallelProcessing.bat, PostProcessing.bat, and support tools. I have comskip run in ParallelProcessing.bat, and PostProcessing.bat waits until the .VPrj file is created, fixes it up, then runs VideoReDo to remove commercials and create a cleaned MPG file. I will manually run transcode.bat for files I want to convert the cleaned MPG to MP4 with Handbrake, and I will manually run wipecleanmpg.bat to delete the cleaned MPG files because NextPVR doesn't delete these files (by design). It works out because you can delete the recording from NextPVR, but be left with the cleaned MPG file if you ever want to transcode and save it.


Problem statement
I have this in my PostProcessing.bat (which is also attached):
cscript //nologo "C:\Program Files (x86)\VideoReDoTVSuite4\vp.vbs" "%~dpn1.VPrj" "%~dpn1_clean.mpg" /na /q "/p:MPEG2 Transport Stream"


When PostProcessing.bat is called by NextPVR, it appears that Video ReDo is exiting without doing its work, and thus I can't take the cleaned MPG file and convert it to MP4 with Handbrake at the end of my PostProcessing.bat.

When I open a command window and run PostProcessing.bat, Video ReDo is able to do its work and thus Handbrake can convert the cleaned MPG file to MP4.

Any idea why VideoReDo is behaving differently, even though the same commands are being executed?
Maybe something to do with the scripts being called by a service that runs as a different 'user' from you?

Iain
I remember trying this a couple of years ago and giving up. There's something "odd" about the vbs script I think.
you could try using the short form of "C:\Program Files (x86)\" - "C:\PROGRA~2\"

as Iain said, the environment that the service runs in might be wrong.
let me know if you ever figure it out.
(sorry)
Get SysinternalsSuite for psexec app and other cool apps

This solved my problem. VideoReDo was being run as a service in a different user account. I opened a command window with admin rights, ran "psexec -s -i cmd.exe", then ran VideoReDo.exe. It wanted to prompt me for a bunch of things. I answered the prompts, closed the command window, then set a recording so PostProcessing.bat would be called. I'm watching postprocessing.log be updated, and I can see the timestamps for VideoReDo are now a minute apart which means commercial cutting did occur, my cleaned MPG is present, and now Handbrake is running to convert the cleaned MPG to MP4.
nice job! tx for posting the info.
Several years ago, I ran into the same problem when using GBPVR. I stumbled onto a similar solution, but slightly different. Perhaps this information will be useful if you continue to have problems. I think it describes what is causing the problem, and some registry entries that fixed it for me. I posted this on the VideoRedo Forum several years ago.

[URL="http://www.videoredo.net/msgBoard/showthread.php?26082-vp-vbs-only-works-when-called-from-command-prompt-doesn-t-work-when&p=84749&highlight=kcmcdona#post84749"]http://www.videoredo.net/msgBoard/showthread.php?26082-vp-vbs-only-works-when-called-from-command-prompt-doesn-t-work-when&p=84749&highlight=kcmcdona#post84749
[/URL]

kcmcdona
Thanks! This helped me out a lot. I had a PostProcessing script all worked out and tested out (which I was testing by running it manually from the command line) and it was working fine there but wasn't working when being invoked by nPVR.
I can't remember what I did to get it to work!. Something like logging on as the SYSTEM user and running videoredo and answering the install questions - which I guess went into the registry to that user and were remembered. Iwas going round in circles for a long time trying to get it running.
martint123 Wrote:I can't remember what I did to get it to work!. Something like logging on as the SYSTEM user and running videoredo and answering the install questions - which I guess went into the registry to that user and were remembered. Iwas going round in circles for a long time trying to get it running.

yup, that was it, using psexec to do it got me there.
It is no big deal to let the recording service run as your own account, I do it all the time to avoid permission issues and it works just fine.