NextPVR Forums

Full Version: PostProcessing failing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
I've just finished setting up a fresh install of Windows and all my HTPC software, I have one new problem that didn't occur before. I'm not sure if it's my configuration or the new version of NPVR (I was using 3.3.8, now 3.4.8). Roughly 50% of my recordings do not make it to PostProcessing.bat. NRecord.log *does* show "Starting: C:\Users\Public\NPVR\Scripts\PostProcessing.bat" for all of the episodes it did not run for. It appears that NRecord.log is just saying it's *going* to run it or *tried* to run it, but there's no indication of whether or not it actually ran or what the exit code was so it doesn't seem to be monitored in any way. Ideally, it'd be nice if NPVR itself logged the output of the bat files or at the very least an exit code so there would be no question of whether the issue was with the batch file contents or NPVR failing to launch it. To "debug" this, I changed my PostProcessing.bat file to a single line that simply runs the "real" batch and saves the output to a log file. Both batch files do work. But it's consistently every other recording that finishes does not get processed, I'm keeping an eye on the logs to see if it really is exactly every-other completed recording that fails to run PostProcess.
Quaraxkad Wrote:NRecord.log *does* show "Starting: C:\Users\Public\NPVR\Scripts\PostProcessing.bat" for all of the episodes it did not run for. It appears that NRecord.log is just saying it's *going* to run it or *tried* to run it, but there's no indication of whether or not it actually ran or what the exit code was so it doesn't seem to be monitored in any way.
If you've got this, then I'm absolutely sure it has run it. You must be missing something in the logic you're running, or limitations of the utilities you're using in there. If it had encountered a problem starting the process, it would have logged an error. (anything that happens in that batch file is up to you)

I'm also doubly sure because I'm not aware of any issues with NextPVR not calling PostProcessing.bat, and this logic very simple, and hasn't changed in years.
I got caught by something similar when I changed over to a new server.
I had videoredo running in the batch file and forgot that everything runs as the SYSTEM user and VRD needs special treatment to work under this userid.
One solution is to run the recording service as your own user, I'v done that for years and it works just perfect.
What, exactly, is not being accomplished by your PostProcessing.bat file? I have had a few shows that launch ComSkip, but ComSkip NEVER finishes scanning the file. It just runs and runs until the nightly reboot that I have scheduled on the server. I only allow one instance of ComSkip to run at a time, so once ComSkip gets stuck on a recording, then ALL of the other recordings waiting in the queue get dropped when the system reboots. Sad This can make it look like PostProcessing.bat didn't run, until I look in the recordings directory of the show that ComSkip couldn't process properly and see that it never created a .edl file.
HarryH3 Wrote:What, exactly, is not being accomplished by your PostProcessing.bat file? I have had a few shows that launch ComSkip, but ComSkip NEVER finishes scanning the file. It just runs and runs until the nightly reboot that I have scheduled on the server. I only allow one instance of ComSkip to run at a time, so once ComSkip gets stuck on a recording, then ALL of the other recordings waiting in the queue get dropped when the system reboots. Sad This can make it look like PostProcessing.bat didn't run, until I look in the recordings directory of the show that ComSkip couldn't process properly and see that it never created a .edl file.
That's strange, can you post the output from your failing Comskip?
Since the original post last night, 8 batch files have failed to run and 10 succeeded. The batch file is as simple as it could possibly be to avoid any other potential issues while debugging this.

PostProcessing.bat:
C:\Users\Public\NPVR\Scripts\RenameIt.bat "%~1" >> "C:\Users\Public\NPVR\Scripts\PP.log" 2>&1

RenameIt.bat:
echo %1
@nircmdc wait 30000
"C:\Programs\Renamer\renamer.exe" /rename RenamePVR "%~1"

If this were a logic error, I would expect every recording to not be renamed. If it were a ReNamer.exe error, PP.log would still show the echo of %1 and the command line that executed ReNamer. ReNamer is not a command line program so it never returns any output anyway. Just does its thing and exits. But PP.log would still show the execution. Anybody else see a potential for logic error that I'm not seeing? I'm going to add an echo line to PostProcessing.bat that will write to another log file *before* it calls RenameIt.bat. Maybe PostProcessing.bat is running but RenameIt.bat isn't. I'm 99% sure that isn't the issue because I had the same problem prior to splitting this up into two batch files which was done entirely for logging/debug purposes.

martint123 Wrote:I got caught by something similar when I changed over to a new server.
I had videoredo running in the batch file and forgot that everything runs as the SYSTEM user and VRD needs special treatment to work under this userid.

I have had that issue with VRD in the past as well, and was able to solve it the same way. However I am no longer using VRD on the HTPC. I did also try switching the account of nrecord but I haven't restarted the service. I don't imagine that to be the issue because it'd likely cause all attempts to fail.
Quaraxkad Wrote:PostProcessing.bat:
C:\Users\Public\NPVR\Scripts\RenameIt.bat "%~1" >> "C:\Users\Public\NPVR\Scripts\PP.log" 2>&1

I could see a potenial pp.log file lock failing from another postprocessing.bat because of that 30 second wait you use.

Martin
Reddwarf Wrote:That's strange, can you post the output from your failing Comskip?
There's one in the first post of this thread: http://forums.nextpvr.com/showthread.php...e-to-3-4-8
mvallevand Wrote:I could see a potenial pp.log file lock failing from another postprocessing.bat because of that 30 second wait you use.

I *think* multiple cmd processes can write to the same log file at once... Even if not, that wouldn't have explained what was happening in the beginning before I wasn't doing any logging at all. If that is in fact the current issue though, I may have already solved the original issue by changing the user account that the NRecord service runs under.

In any case, sub, any chance of getting NRecord to log the output of the batch files itself? That would make writing and debugging scripts infinitely easier.
Pages: 1 2 3