NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Legacy (v4.x and earlier) v
« Previous 1 … 17 18 19 20 21 … 433 Next »
PostProcessing.bat not executing

PostProcessing.bat not executing
MiyoshiSaki
Offline

Junior Member

Posts: 9
Threads: 3
Joined: Dec 2014
#1
2019-08-20, 05:06 AM (This post was last modified: 2019-08-20, 05:24 AM by MiyoshiSaki.)
NextPVR v4.2.4 (190307)
Windows 10

In NRecord.log I see PostProcessing.bat script triggering, but nothing happens.

Example:
Code:
2019-08-19 20:00:00.933    [DEBUG][10]    Starting: C:\Users\Public\NPVR\Scripts\PostProcessing.bat "F:\NextPVR_Temp_Recordings\Evening\Evening_20190819_19302000.ts" 5.1 26652 20 "Evening"

My PostProcessing.bat

Code:
cd /d "C:\Program Files (x86)\Plex\Plex Media Server\"
"Plex Media Scanner.exe" --scan --refresh --section 1

Tested putting just this line
Code:
"C:\Windows\System32\notepad.exe"
in the PostProcessing.bat to see if Notepad would launch but it never does after a recording. However, if I manually double click on the script it works fine. PostProcessing.bat was working before for the past few years, not sure what changed in windows or if it has anything to do with updating NextPVR.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,671
Threads: 767
Joined: Nov 2003
#2
2019-08-20, 06:58 AM
If that message is in the log, then it is absolutely running your batch file, and using the parameter listed. (trust me, we've been through this a stack of times in the past, and every single time NextPVR has been running the users bat files, but there is something flaw with what they're trying to do within the batch file)

When the recording service runs this batch file, it's run using the same account the recording service runs as. ie, the default account is the 'localsystem' account. This is run from a service, which is kind of an isolated background session, so you wouldn't see notepad.exe popup on your desktop.

I don't know anything about 'plex media scanner.exe', but it might have some expectation about where its data files lives, or registry settings that are in your account not 'localsystem', and there might be some permission issues around this when run from the 'localsystem' account. Your best bet is probably to redirect the output of that command to a text file somewhere, so you can check it after the fact to see what output this generated. I'm guessing it's giving you some error message about permissions, or not being able to find some files or something.

Because this has been issue for several users in the past, in NextPVR v5 it captures output of these batch files, and logs them, so it's much easier for use to fin errors that come out of users custom batch files.
MiyoshiSaki
Offline

Junior Member

Posts: 9
Threads: 3
Joined: Dec 2014
#3
2019-08-20, 07:06 AM
sub Wrote:Your best bet is probably to redirect the output of that command to a text file somewhere, so you can check it after the fact to see what output this generated. I'm guessing it's giving you some error message about permissions, or not being able to find some files or something.

What commands so I add to the PostProcessing.bat to output to text file?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,671
Threads: 767
Joined: Nov 2003
#4
2019-08-20, 07:14 AM
Probably put something like this:

"Plex Media Scanner.exe" --scan --refresh --section 1 1> c:\temp\scanner.txt 2>&1
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,671
Threads: 767
Joined: Nov 2003
#5
2019-08-20, 07:15 AM
Depending on what error that command is returning, you could look into switching the recording service to run as your user account instead of localsystem.
MiyoshiSaki
Offline

Junior Member

Posts: 9
Threads: 3
Joined: Dec 2014
#6
2019-08-20, 11:18 PM
sub Wrote:Probably put something like this:

"Plex Media Scanner.exe" --scan --refresh --section 1 1> c:\temp\scanner.txt 2>&1

Added 1> c:\temp\scanner.txt 2>&1 to my postprocessing.bat

Found out the "Plex Media Scanner.exe" does start running, seems to terminate prematurely, only 1-2 lines of output to scanner.txt. Plex logs also show it not completing. Weird.

However, if postprocessing.bat is executed manually by me then it completes with many lines of output to scanner.txt and works fine.

Tried switching the "NPVR recording service" to Log On As normal user instead of Local Service. Rebooted. No different. Same issue.

Any other ideas?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,671
Threads: 767
Joined: Nov 2003
#7
2019-08-20, 11:28 PM
Sorry, I really don't know anything about this "Plex Media Scanner.exe". I'm not sure what it might been looking for. Do the Plex logs not give any useful clues? Otherwise you might need to try asking the Plex guys, and let them know what log messages you get before it crashes.
MiyoshiSaki
Offline

Junior Member

Posts: 9
Threads: 3
Joined: Dec 2014
#8
2019-08-21, 12:01 AM
Changed "NPVR recording service" to Log On As a normal user instead of Local Service & rebooted.

Tested adding notepad.exe to postprocesing.bat but it doesn't launch notepad to the desktop environment. Does that mean it isn't running as normal user?
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,851
Threads: 954
Joined: May 2006
#9
2019-08-21, 12:15 AM
No you need to run command line problems in postprocessing not gui apps.

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,671
Threads: 767
Joined: Nov 2003
#10
2019-08-21, 01:12 AM
MiyoshiSaki Wrote:Tested adding notepad.exe to postprocesing.bat but it doesn't launch notepad to the desktop environment. Does that mean it isn't running as normal user?
It's still running as a service, which is in a different background desktop session. You wouldn't see it pop up on your desktop.

As Martin says above, you need to running command line stuff, not GUI apps.

You did get a couple of lines of text in your scanner.txt, so you definitely know NextPVR is running your batch file. Trying to run notepad.exe wont help you any further with that.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  postprocessing batch to escape special characters donbrew 3 1,704 2019-11-06, 11:29 PM
Last Post: JavaWiz
  PostProcessing and PostCancel.bat being triggered but not working antenna 4 1,790 2018-08-05, 07:40 PM
Last Post: antenna
  PostProcessing.bat doesn't run wscrivens 23 7,679 2016-04-08, 06:30 PM
Last Post: Handy.Man
  Show CMD window while executing PostProcessing.bat uspino 6 2,791 2015-12-08, 11:41 PM
Last Post: mvallevand
  Havng trouble using VideoRedo in Batch (Postprocessing.bat) ????? puck64 0 1,468 2015-11-14, 10:39 AM
Last Post: puck64
  PostProcessing failing Quaraxkad 22 7,074 2015-10-19, 10:43 AM
Last Post: puck64
  PostProcessing.bat not run on Recording Cancel arrmo 9 2,588 2015-08-10, 01:31 PM
Last Post: arrmo
  Strange problem with PostProcessing and PsExec Reddwarf 8 2,587 2015-06-10, 07:39 PM
Last Post: Reddwarf
  PostProcessing not running, recording marked as recording service not running Reddwarf 12 3,461 2015-05-24, 11:20 PM
Last Post: sub
  Identifying subchannel for postprocessing wisfalls 3 1,657 2014-11-04, 11:16 PM
Last Post: johnsonx42

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode