NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Windows v
« Previous 1 … 91 92 93 94 95 … 102 Next »
PostProcessing.bat problem

 
  • 0 Vote(s) - 0 Average
PostProcessing.bat problem
4zm4r3d02
Offline

Senior Member

USA
Posts: 356
Threads: 90
Joined: May 2005
#1
2019-09-08, 08:44 PM
I put the following code into a PostProcessing.bat file in C:\Users\Public\NPVR-data\scripts:
Code:
@echo off
echo Finished recording %1 at %time% on %date% >> C:\Users\ron\Desktop\finished.txt
set Icon=Information
powershell -Command "[void] [System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); $objNotifyIcon=New-Object System.Windows.Forms.NotifyIcon; $objNotifyIcon.BalloonTipText='Finished recording %1 at %time% on %date%'; $objNotifyIcon.Icon=[system.drawing.systemicons]::%Icon%; $objNotifyIcon.BalloonTipTitle='NPVR'; $objNotifyIcon.BalloonTipIcon='None'; $objNotifyIcon.Visible=$True; $objNotifyIcon.ShowBalloonTip(60000);"

If I run it manually by double clicking it it appends "Finished recording (space) at (current time) on (current date)" into the specified file and pops-up a balloon notification that says the same thing. When it's run by NPVR after a recording finishes it writes the recorded file's name (with path) and the time and date the recording finished to the file but there is no notification. Any ideas why?
Intel Core i7-4790 / 32GB RAM / Windows 10 Pro 64 bit / HDHomeRun CONNECT DUO Model: HDHR5-2US
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#2
2019-09-08, 09:15 PM
The nrecord.log should contain the output of your script. That powershell command might have output some error message or something that'll help you determine what is right with your batch file.
4zm4r3d02
Offline

Senior Member

USA
Posts: 356
Threads: 90
Joined: May 2005
#3
2019-09-09, 01:54 AM
The only thing in there that looks like it has something to do with it are entries like this:
Code:
2019-09-08 15:32:00.376    [DEBUG][11]    Starting: C:\Users\Public\NPVR-data\scripts\PostProcessing.bat "D:\New Video\Gilligans Island\Season 02\Gilligans Island.S02E12.Dont Bug the Mosquitoes.ts" 11.2 900 21 "Gilligan's Island"
I can't see any error messages anywhere, but the log is attached.
Intel Core i7-4790 / 32GB RAM / Windows 10 Pro 64 bit / HDHomeRun CONNECT DUO Model: HDHR5-2US
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#4
2019-09-09, 02:16 AM
Ah, I think the "@echo off" is causing there to be no output?
4zm4r3d02
Offline

Senior Member

USA
Posts: 356
Threads: 90
Joined: May 2005
#5
2019-09-09, 06:13 PM
Tried it without the @echo off. Log attached.
Intel Core i7-4790 / 32GB RAM / Windows 10 Pro 64 bit / HDHomeRun CONNECT DUO Model: HDHR5-2US
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#6
2019-09-09, 06:19 PM
It looks like it's running your commands, but unfortunately powershell isn't outputting any error.

Sorry, I don't really know anything about powershell, so I couldn't tell you what it is unhappy about. Maybe check the commend line below, to check the parameters to it were as you expected:

Quote:2019-09-09 13:31:00.554 [DEBUG][9] Starting: C:\Users\Public\NPVR-data\scripts\PostProcessing.bat "D:\New Video\Night Court\Season 08\Night Court.S08E16.Attachments Included.ts" 11.3 912 21 "Night Court"
2019-09-09 13:31:00.832 [DEBUG][75]
2019-09-09 13:31:00.843 [DEBUG][75] C:\Users\Public\NPVR-data\scripts>echo Finished recording "D:\New Video\Night Court\Season 08\Night Court.S08E16.Attachments Included.ts" at 13:31:00.82 on 2019-09-09 1>>C:\Users\ron\Desktop\finished.txt
2019-09-09 13:31:00.920 [DEBUG][75]
2019-09-09 13:31:00.921 [DEBUG][75] C:\Users\Public\NPVR-data\scripts>set Icon=Information
2019-09-09 13:31:00.923 [DEBUG][75]
2019-09-09 13:31:00.923 [DEBUG][75] C:\Users\Public\NPVR-data\scripts>powershell -Command "[void] [System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); $objNotifyIcon=New-Object System.Windows.Forms.NotifyIcon; $objNotifyIcon.BalloonTipText='Finished recording "D:\New Video\Night Court\Season 08\Night Court.S08E16.Attachments Included.ts" at 13:31:00.92 on 2019-09-09'; $objNotifyIcon.Icon=[system.drawing.systemicons]::Information; $objNotifyIcon.BalloonTipTitle='NPVR'; $objNotifyIcon.BalloonTipIcon='None'; $objNotifyIcon.Visible=$True; $objNotifyIcon.ShowBalloonTip(60000);"
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,118
Threads: 957
Joined: May 2006
#7
2019-09-09, 06:29 PM
I think since it uses 'System.Windows.Forms' it won't load in the nextpvr shell. It probably is the same issue as trying to run notepad as test.

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#8
2019-09-09, 07:23 PM
mvallevand Wrote:I think since it uses 'System.Windows.Forms' it won't load in the nextpvr shell. It probably is the same issue as trying to run notepad as test.

Martin
That definitely applies with NextPVR v4, where it's running from a service. I would then it'd be possible from v5, which is just running as a standard desktop process at this stage.

However, soon NextPVR v5 will also be running from a service, so it doesn't show message isn't going to be useful for long.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,118
Threads: 957
Joined: May 2006
#9
2019-09-09, 07:35 PM
Ah, before I posted I tried to run both notepad and that powershell command and neither loaded, but now I see that probably is because I run NextPVRServer as a hidden scheduled task. Running in user space I do get his powershell and notepad so for now it is likely his configuration. Since it is going to break probably not worth too much effort fixing.

Martin
4zm4r3d02
Offline

Senior Member

USA
Posts: 356
Threads: 90
Joined: May 2005
#10
2019-09-09, 09:13 PM
mvallevand Wrote:Ah, before I posted I tried to run both notepad and that powershell command and neither loaded, but now I see that probably is because I run NextPVRServer as a hidden scheduled task. Running in user space I do get his powershell and notepad so for now it is likely his configuration. Since it is going to break probably not worth too much effort fixing.

Martin

I'm running NextPVRServer as a hidden scheduled task, too. I don't really understand Powershell, I'm just trying out code I found by Googling. ¯\_(ツWink_/¯

Thanks for your efforts.
Intel Core i7-4790 / 32GB RAM / Windows 10 Pro 64 bit / HDHomeRun CONNECT DUO Model: HDHR5-2US
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (3): 1 2 3 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Issues watching one channel, new problem Ricknextpvr 21 374 2025-07-04, 02:32 AM
Last Post: mvallevand
  "Recording interrupted" problem started happening sharkbite 8 640 2025-06-02, 08:08 AM
Last Post: sharkbite
  Problem with encrypted channels achim_m 0 189 2025-05-03, 03:34 PM
Last Post: achim_m
  ffmpeg in postprocessing fails on spaces in filename Druhl 3 479 2025-03-29, 06:25 PM
Last Post: mvallevand
  postprocessing tsduck on recordings Druhl 3 440 2025-03-07, 02:24 AM
Last Post: mvallevand
  Transcoding Problem Version: 7.0.1.241229 Metroid 1 362 2025-01-25, 12:44 AM
Last Post: mvallevand
  Strange blastcfg.exe & blast.exe repeated digits problem fla 4 405 2025-01-18, 08:02 PM
Last Post: fla
  Audio connection problem at TV jamesefrye 1 295 2025-01-18, 02:07 AM
Last Post: sub
  Recording Auto Transcode Problem and HDHR Viewing Problems in v7 Metroid 8 1,211 2024-12-06, 04:42 AM
Last Post: mvallevand
  Problem losing thumbnail display. Bobins 4 422 2024-11-09, 12:07 PM
Last Post: Bobins

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

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

Linear Mode
Threaded Mode