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 … 182 183 184 185 186 … 433 Next »
Strange problem with PostProcessing and PsExec

Strange problem with PostProcessing and PsExec
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#1
2015-06-09, 07:20 PM
I'm at witt's end here so hopefully someone can help. I have this peace of code in PostProcessing.bat:
Code:
set iFN="\\Sirius\sirius$H%~pnx1"
set oFN="\\Sirius\sirius$H%~pn1.avi"
set SRT="\\Sirius\sirius$H%~pn1.default.srt"
echo C:\ffmpeg\bin\ffmpeg.exe -analyzeduration 2147483647 -probesize 2147483647 -y -i %iFN% -vcodec libx264 -preset fast -acodec copy %oFN%>c:\Users\Public\npvr\scripts\Convert.bat
copy c:\Users\Public\NPVR\Scripts\Convert.bat \\Taurus\Users\Public\NPVR\Scripts\
C:\windows\system32\psexec \\Taurus -d -c -e -h -f -u xxxxxx -p xxxxxx -w C:\Users\Public\NPVR\Scripts C:\Users\Public\NPVR\Scripts\Convert.bat
In short, the code produces a batch file, Convert.bat, which is copied to a remote computer (Taurus), the purpose of this bat is to convert an mpeg2 recording to h.264. The conversion batch is written and works beautifully, the file is copied to the remote computer with no problems. BUT, the PsExec call does nothing when called from PostProcessing when Nrecord starts it.
I can execute PsExec with all the parameters manually in a command prompt and it works great. So I thought, wait a minute, Nrecord is a service, maybe it is not allowed to run PsExec (I should add that Nrecord runs as my user and not the local system account). So I tried to run Nrecord in a command prompt with "Nrecord RUN". No dice, the PostProcessing runs but not PsExec. I tried both with "Run as Administrator" and without.
So, I try to run PostProcessing with all its parameters from a command prompt, and VIOLA, PsExec works.

Sub, does Nrecord run PostProcessing with any limitations with regard to privileges or something like that?? Anyone else have a clue?:confused:

"I'd rather have a bottle in front of me than a frontal lobotomy"
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,677
Threads: 767
Joined: Nov 2003
#2
2015-06-09, 09:46 PM
Reddwarf Wrote:Sub, does Nrecord run PostProcessing with any limitations with regard to privileges or something like that??
No, it's not limited any way. It just runs the batch file as the same user as the recording service. You an do anything from your batch file, which that account would normally be able to do.
vintdiesel
Offline

Member

Posts: 114
Threads: 23
Joined: Jan 2012
#3
2015-06-09, 10:11 PM
If psexec was located in a folder other than under c:\windows and called from the new location, does it work?

I had similar problems in updating my EPG from EPGcollector when NPVR calls it using EPGUpdate.bat. No go under Win8.1 (but the same routine worked under Win7), however if I put EPGUpdate.bat it into the windows task scheduler to run at 11:00pm, it runs fine. Its like some privilage is required or the folder needs a share, but I never got to the bottom of it.
Win Server: ASRock P67 Pro3 B3, i5 2500K 4.0Ghz, 16GB, Nvidia GT430 HDMI, Win 10 Pro 64bit, Win-TV Quad HD, Win-TV Nova-T USB.
UnRaid NAS Server: Gigabyte i7 2600 3.4Ghz, 16GB, S3 Trio VGA PCI Video, DVB LibreElec for DVB-T tuner drivers, Hauppage Win-TV 2210 Dual DVB-T.
Win Client: Intel NUC i3 Broadwell, 4GB Ram, 128GB SSD, Win 10 Pro 64bit.
Linux Client: Raspberry Pi 3+, OSMC + Kodi
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,866
Threads: 954
Joined: May 2006
#4
2015-06-09, 10:20 PM
Try NRecord RUN > file 2>&1 to maybe capture an error message.

Martin
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#5
2015-06-09, 10:57 PM
Thanks guys, I'll try both and report back tomorrow.

"I'd rather have a bottle in front of me than a frontal lobotomy"
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#6
2015-06-10, 01:40 AM (This post was last modified: 2015-06-10, 01:50 AM by JavaWiz.)
I vaguely remember coming across this in an old script.

I believe since you are running in postProcessing.bat, you are running under the serviceID, not your login id. On first execution of psExec, each user running must accept the eula. When running via ServiceID it hangs on the prompt to accept eula. Whereas the first time you ran it interactively, you accepted the prompt. Here is a thread that describes the fix.

see if it works with the command line parm -accepteula as below:

Code:
C:\windows\system32\psexec [B]-accepteula[/B] \\Taurus -d -c -e -h -f -u xxxxxx -p xxxxxx -w C:\Users\Public\NPVR\Scripts C:\Users\Public\NPVR\Scripts\Convert.bat
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#7
2015-06-10, 12:02 PM
Ok, I'v solved the problem. The PsExec.exe came from a downloaded .zip file so when I looked at the properties in windows explorer it said that the file was blocked for security reasons. Unblocking it did not help, so I tried to copy the file to npvr's script directory, but explorer claimed that it did not find the file. Copying it from a command prompt worked and when I execute it with -accepteula from the script firectory everything works. Something is fishy in windows filesystem. Thanks for the help guys Smile

"I'd rather have a bottle in front of me than a frontal lobotomy"
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#8
2015-06-10, 07:34 PM
antiviruses often pickup that executable as a virus...
you only need to run that switch once[accepteula], it will remember for subsequent runs..
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#9
2015-06-10, 07:39 PM
pBS Wrote:antiviruses often pickup that executable as a virus...
you only need to run that switch once[accepteula], it will remember for subsequent runs..
Yeah, I know about the -accepteula, but it doesn't hurt to let it stay there. No if my antivirus (Avira) had reacted to I would have gotten a message, Avira shouts loud and clear when it suspects a virus Big Grin

"I'd rather have a bottle in front of me than a frontal lobotomy"
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  NPVR4 and MPC-HC problem The Solutor 29 7,051 2021-07-27, 03:45 PM
Last Post: The Solutor
  Problem locking on to a tuner? time_lord 7 2,929 2021-01-09, 12:06 PM
Last Post: Graham
  EPG XMLTV problem DBHall 8 3,731 2021-01-01, 12:34 PM
Last Post: Graham
  Problem with Intel 4600 graphics driver pol098 1 1,415 2020-12-01, 12:44 PM
Last Post: romdl
  Problem setting up recording for some programmes LeoL 5 1,994 2020-10-21, 09:34 PM
Last Post: LeoL
  Replayed recording problem Tj.2 25 9,009 2020-09-22, 04:51 PM
Last Post: baj1
  Recurring recording problem Dave48167 18 4,160 2020-09-10, 08:26 PM
Last Post: Dave48167
  Problem with 1 device and 1 frequency lost@c 6 2,019 2020-08-21, 04:11 AM
Last Post: lost@c
  Audio Problem jrockow 11 4,732 2020-04-22, 12:07 PM
Last Post: jrockow
  Audio/video sync problem on playback and program freeze when resuming zer 34 13,022 2019-12-21, 02:49 PM
Last Post: HarryH3

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

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

Linear Mode
Threaded Mode