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 … 399 400 401 402 403 … 433 Next »
Windows 7 x64 - strange issue with cscript when run from PostProcessing.bat

Windows 7 x64 - strange issue with cscript when run from PostProcessing.bat
acribb
Offline

Junior Member

Posts: 15
Threads: 3
Joined: Nov 2010
#1
2010-11-06, 07:22 AM (This post was last modified: 2010-11-06, 05:24 PM by acribb.)
Issue-

cscript call in PostProcessing.bat works fine when I run PostProcessing.bat from a command prompt.

However, this same cscript call (to clean commercials using VideoRedo) does not work when NPVR calls it.

For instance, I can open up a command prompt and run:

PostProcessing.bat "D:\Recorded TV\Manual Recordings\3 WJXT_20101103171500.ts" 3

And everything works fine. Vprj gets created by comskip, VideoRedoCut.vbs correctly runs videoredo.exe and everything works.

When NPVR executes my PostProcessing.bat file, comskip creates vprj file, and then I can see (through numerous wscript.echo statements) that the VideoRedoCut.vbs script bombs out when it tries to create an object in the script (line of code in that blows up :::: Set VideoReDoSilent = WScript.CreateObject( "VideoReDo.VideoReDoSilent" ).

What could be causing this and are there any solutions?

ALSO, why can I not see a command window when NPVR runs my PostProcessing.bat file? When I try to use PAUSE statements in my PostProcessing.bat to debug, I cannot see what is going on. Is NPVR hiding the command window when it runs PostProcessing.bat?

Thanks for any help....

PostProcessing.bat:
Code:
@echo off
Rem PostProcessing.bat
Rem This script will be run automatically by GBPVR when found after a recording is finished
Rem To enable it put this file inside your GBPVR default program directory (C:\Program Files\devnz\gbpvr\)
Rem together with Comskip.exe, Comskip.ini and Comskip.dictionary
Rem The script is called with two parameters
Rem %1 is the fully qualified name of the recorded mpeg file.
Rem %2 is the channel number of the recording
echo [%date% %time%] Postprocessing.bat invoked on %1 recorded from channel %2 >>postprocessing.log
Rem The part below can be used to not run Comskip on certain channels, please modify for your conveniance.
Rem The channel numbers that should be skipped are the numbers between the double quotes ("").
Rem You can add "if" lines as much as you want
Rem To disable this behaviour use channel numbers outside the normal range, put a "rem" before the "if" or delete the "if" lines

Rem list of channels to not run comskip on
rem if "%2" == "27" goto eof
rem if "%2" == "36" goto eof

Rem this trick also makes it possible to have dedicated comskip.ini file for certain channels.

rem if the filename contains 'Football' go to the sports comskip
rem if not %1:Football == %1 echo [%date% %time%] Starting comskip using sports.ini..... >>postprocessing.log
rem if not %1:Football == %1 goto sports

C:
cd "C:\Users\Public\NPVR\Scripts\comskip"

if %2 == 6 echo [%date% %time%] Starting comskip using cbs.ini..... >>postprocessing.log
if %2 == 6 goto cbs
if %2 == 5  echo [%date% %time%] Starting comskip using abc.ini..... >>postprocessing.log
if %2 == 5 goto abc
if %2 == 11 echo [%date% %time%] Starting comskip using nbc.ini..... >>postprocessing.log
if %2 == 11 goto nbc

Rem use the default comskip.ini for all other channels
goto generic

:sports
comskip --ini=sports.ini %1
goto continue
:cbs
comskip --ini=cbs.ini %1
goto continue
:abc
comskip --ini=abc.ini %1
goto continue
:nbc
comskip --ini=nbc.ini %1
goto continue

rem This is an example of how to reuse a previously learned logo to prevent Comskip from learning the wrong logo
comskip --ini=channel65.ini --logo=channel65.logo.txt %1
goto continue

:generic
Rem The actual run of Comskip. Only one parameter, the name of the mpeg file to process.
Rem Comskip will read its settings from the Comskip.ini found in the same directory as Comskip.exe
Rem Both are supposed to be in the GBPVR default program directory. (C:\Program Files\devnz\gbpvr\)
echo [%date% %time%] Using generic comskip.ini comskip..... >>postprocessing.log
comskip %1

:continue

echo [%date% %time%] Comskip complete..... >>postprocessing.log
echo [%date% %time%] Starting Cutting/Reassembling process..... >>postprocessing.log

cscript //nologo "C:\Users\Public\NPVR\Scripts\VideoRedoCut.vbs" "%~dpn1.VPrj" "%~dpn1_Cleaned.ts" /t1 /q >>postprocessing2.log
echo [%date% %time%] Cutting/Reassembling process complete..... >>postprocessing.log
Rem RENAME the old .ts file and rename the new one to the old name
rem echo "%~dpn1.ts"
rem echo "%~dpn1_cleaned.ts"
rem move "%~dpn1.ts" "%~dpn1_original.ts"
rem move "%~dpn1_cleaned.ts" "%~dpn1.ts"
rem echo [%date% %time%] File renaming complete..... >>postprocessing.log
echo [%date% %time%] Postprocessing.bat complete >>postprocessing.log
echo [%date% %time%]    >>postprocessing.log
echo [%date% %time%]    >>postprocessing.log
rem RenameRecordings %1 > renamerecordings.log
:eof
acribb
Offline

Junior Member

Posts: 15
Threads: 3
Joined: Nov 2010
#2
2010-11-06, 04:07 PM
Are there any other Windows 7 x64 users out there that are using VideoRedo in their PostProcessing.bat commercial cutting process? What combinations of tools are you using to cut commercials?
sub
Online

Administrator

NextPVR HQ, New Zealand
Posts: 106,627
Threads: 767
Joined: Nov 2003
#3
2010-11-06, 05:13 PM
acribb Wrote:ALSO, why can I not see a command window when NPVR runs my PostProcessing.bat file? When I try to use PAUSE statements in my PostProcessing.bat to debug, I cannot see what is going on. Is NPVR hiding the command window when it runs PostProcessing.bat?
The background recording service is what runs PostProcessing.bat, and services dont run in the same desktop session as the logged in user, so you wont see the output running.

I havnt looked at the your batch file, but the two most common reasons for these batch files to behave differently are
1) user assumes the current directory, and when the application runs it, the directory is different than what the author assumed (causing files or executables not to be found)
2) recording service runs as a different user account, and sometimes permissions on files or folders dont allow the activity to occur.

The only other reason I'm aware of, which isnt likely to be the case here, is some utilities assume they're running as the logged in user, when they try to share data with other software components using WM_COPYDATA (aka the clipboard).
acribb
Offline

Junior Member

Posts: 15
Threads: 3
Joined: Nov 2010
#4
2010-11-06, 05:23 PM
It's definitely number 2.


I have an echo in my PostProcessing.bat that echos my username.

When I run my PostProcessing.bat from a command prompt that I open, it echos my username which is the admin. Everything works.

When PostProcessing.bat is run by GBPVR, it echos my computer name. Everything works like the comskipping, but then cscript executes the VideoRedoCut.vbs script and that runs, but it blows up when an object is attempted to be created.

I have been working on this for days and would love to resolve this issue!
sub
Online

Administrator

NextPVR HQ, New Zealand
Posts: 106,627
Threads: 767
Joined: Nov 2003
#5
2010-11-06, 05:24 PM
Sorry, I'm not batch file or comskip expert so cant really give you any advice on this one.
johnsonx42
Offline

Posting Freak

Posts: 7,298
Threads: 189
Joined: Sep 2008
#6
2010-11-07, 05:28 PM
Presumably something in the VideoRedoCut.vbs script doesn't like running as Local System. It's probably some sort of permissions issue. You can try running NRecord as your regular user account, assuming your regular user account is an administrator. You'll probably also want to be running with UAC off.
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
acribb
Offline

Junior Member

Posts: 15
Threads: 3
Joined: Nov 2010
#7
2010-11-07, 07:02 PM
johnsonx42 Wrote:Presumably something in the VideoRedoCut.vbs script doesn't like running as Local System. It's probably some sort of permissions issue. You can try running NRecord as your regular user account, assuming your regular user account is an administrator. You'll probably also want to be running with UAC off.

I actually did this and was able to get a LITTLE further. At least now the VideoReDo object gets invoked. However, it blows up when trying to load the .VPrj file.

Is anyone else using VideoReDo in their PostProcessing.bat file on a WINDOWS 7 X64 system successfully?

I even installed a fresh Windows 7 x64 Professional copy on a different partition and tried out NPVR on that using VideoReDo in my PostProcessing.bat and it didn't work their either.

So frustrated......
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  decoder issue? some channels don't play Donsch 10 4,912 2023-12-04, 10:19 PM
Last Post: turkeypets
  Colossus 2 Audio issue artmetz 15 4,173 2021-02-10, 07:02 PM
Last Post: shspvr
  NextPVR V4 Web Issue meccano 3 1,832 2021-01-30, 04:20 AM
Last Post: meccano
  Lights-Out for Windows Home Server 2011? TuckerDean 1 1,287 2021-01-28, 01:52 PM
Last Post: mvallevand
  Screensaver on Windows 10 NumberFive 0 1,036 2020-12-24, 10:21 AM
Last Post: NumberFive
  Flashing in on-screen graphics (Windows 10) (Can post logs if needed) bgtees 39 12,431 2020-08-19, 12:38 PM
Last Post: Stanno
  Lights-Out for Windows Home Server 2011 pvrip 6 3,168 2020-05-21, 04:56 PM
Last Post: Madlec
  win10 E-AC3 decoding issue pascalb 31 7,523 2020-05-08, 06:01 AM
Last Post: pascalb
  Windows 10 Record Issues Captain Jack 11 5,273 2020-02-02, 09:11 PM
Last Post: Captain Jack
  MCE Remote Opens NextPVR Behind Other Windows 1sae 3 2,308 2020-01-13, 06:19 PM
Last Post: Stanno

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

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

Linear Mode
Threaded Mode