2008-11-14, 09:19 PM
In my mind I know its something simple I just haven't figured it out yet.
|
2008-11-14, 09:19 PM
In my mind I know its something simple I just haven't figured it out yet.
2008-11-14, 09:34 PM
mrgtstr Wrote:In my mind I know its something simple I just haven't figured it out yet. I write a lot of these batch files. My debug suggestions for bat files: 1) You may need to add a line in your bat file: cd \myupperdirectory\myprogramdirectory that switches to the appropriate program directory before executing the program. Add one of these lines before each program you want to execute. 2) make sure the program works in its own directory 3) Add logging commands. If you are expecting the bat file to have a %1 parameters, then add a line to your bat: echo "The first parameter is: %1">>c:\mylogdirectory\mylogfile.txt and then check that the log shows the parameter you expected. Sometimes it will be missing a pathname when you thought it had one, etc. 4) add pause lines to the batch so you can see the commands it is executing.
2008-11-14, 09:48 PM
dennit Wrote:I write a lot of these batch files. My debug suggestions for bat files: Thanks for the tips....I did verify that the program works in its own directory and started using the pause, but didn't know about the other.
2008-11-16, 01:22 AM
Don't know whether this helps or not, but went into the log file of Videoredo and this is what I found.
2008-11-11 08:45:50 Starting up with silent and batch: 1 0 2008-11-11 08:45:50 COM open error for file: .VPrj, Error: Error opening file 2008-11-11 08:46:18 Decoder support lib: 5.2, ippvca6l.lib 2008-11-11 08:46:19 Image support lib: 5.2, ippvca6l.lib
2008-11-16, 08:42 AM
mrgtstr Wrote:Don't know whether this helps or not, but went into the log file of Videoredo and this is what I found. I always add these two lines before a command to make sure Code: [B]c:[/B]
[B]cd [/B] \the\folder\you\want
myprogram.exe -switch -etcIf you don't explicitly add the drive letter, then a Change Directory (CD) won't traverse drives. Many people are spreading their gear across multiple drives...
Frank Z
[COLOR="Gray"] I used to ask 'why?' Now I just reinstall... [SIZE="1"]______________________________________________ Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE] [/COLOR]
2008-11-16, 03:04 PM
zehd Wrote:I always add these two lines before a command to make sure I do exactly the same thing. I seldom have programs on any other drive, but just to be sure I add the line with the drive letter before the line with cd ...
2008-11-17, 01:41 AM
zehd Wrote:I always add these two lines before a command to make sure Thanks....but that didn't help. I am about to give up on the automatic feature. It seems like its a directory path issue and I can't figure out the culprit.
2008-11-17, 02:36 AM
I don't know whether this gives better insight or not and since I am not extremely familiar creating batch files I found one off of videoredo's forum. I don't know why, but it seems that something is changing the name of the vprj file and therefore it can't find it.
The batch file Code: REM @echo off
REM Set the following line to the recordings and originals directory.
REM These two directories should be on the same partition to avoid actually moving the file.
SET dir1=G:\Recordings\
SET original="G:\Recordings\Originals\"
REM This will step through the recordings and delete any stray .vprj files.
REM Without this VideoRedo will hang on finding a .vprj without a matching .mpg.
FOR /R %dir1% %%F IN (*.vprj) DO IF NOT EXIST %%~dpnF.mpg DEL %%F
REM This will step through the recordings and test to find the .vprj files created by ShowAnalyzer.
REM It will then open each project file in videoredo so that you can verify that the cuts are correct.
FOR /R %dir1% %%F IN (*.vprj) DO "C:\Program Files\VideoReDoTVSuite\VideoReDo3.exe" %%F
REM This calls a routine that will process the recordings using Videoredo
FOR /R %dir1% %%f IN (*.vprj) DO CALL :adprocessing %%f
:adprocessing
Rem This script runs Videoredo to edit the recording using the .vprj project file.
cscript //nologo "C:\Program Files\VideoReDoTVSuite\vp.vbs" "%~dpn1.VPrj" "%~dpn1_cleaned.mpg" /t1 /q
pause
Rem RENAME the old .mpg file to name_original.mpg
move "%~dpn1.mpg" "%~dpn1_original.mpg"
REM Rename the cleaned file to the name of the original recording.
move "%~dpn1_cleaned.mpg" "%~dpn1.mpg"
REM The following lines cleanup the directory.
move "%~dpn1_original.mpg" "%original%"
del "%~dpn1.log"
del "%~dpn1.logo.txt"
del "%~dpn1.edl"
REM Save the VideoReDo file with the original to make a re-edit easier
move "%~dpn1.VPrj" "%original%"
GOTO :eofThe result Code: C:\Documents and Settings\David\Desktop>REM @echo off
C:\Documents and Settings\David\Desktop>REM Set the following line to the recordings and originals directory.
C:\Documents and Settings\David\Desktop>REM These two directories should be on the same partition to avoid actually moving the file.
C:\Documents and Settings\David\Desktop>SET dir1=G:\Recordings\
C:\Documents and Settings\David\Desktop>SET original="G:\Recordings\Originals\"
C:\Documents and Settings\David\Desktop>REM This will step through the recordings and delete any stray .vprj files.
C:\Documents and Settings\David\Desktop>REM Without this VideoRedo will hang on finding a .vprj without a matching .mpg.
C:\Documents and Settings\David\Desktop>FOR /R G:\Recordings\ %F IN (*.vprj) DO IF NOT EXIST %~dpnF.mpg DEL %F
C:\Documents and Settings\David\Desktop>IF NOT EXIST G:\Recordings\CSI Crime Scene Investigation\CSI Crime Scene Investigation_20081009_21002200.mpg
EL G:\Recordings\CSI Crime Scene Investigation\CSI Crime Scene Investigation_20081009_21002200.Vprj
C:\Documents and Settings\David\Desktop>REM This will step through the recordings and test to find the .vprj files created by ShowAnalyzer.
C:\Documents and Settings\David\Desktop>REM It will then open each project file in videoredo so that you can verify that the cuts are correct.
C:\Documents and Settings\David\Desktop>FOR /R G:\Recordings\ %F IN (*.vprj) DO "C:\Program Files\VideoReDoTVSuite\VideoReDo3.exe" %F
C:\Documents and Settings\David\Desktop>"C:\Program Files\VideoReDoTVSuite\VideoReDo3.exe" G:\Recordings\CSI Crime Scene Investigation\CSI Crime Scen
Investigation_20081009_21002200.Vprj
C:\Documents and Settings\David\Desktop>REM This calls a routine that will process the recordings using Videoredo
C:\Documents and Settings\David\Desktop>FOR /R G:\Recordings\ %f IN (*.vprj) DO CALL :adprocessing %f
C:\Documents and Settings\David\Desktop>CALL :adprocessing G:\Recordings\CSI Crime Scene Investigation\CSI Crime Scene Investigation_20081009_2100220
.Vprj
C:\Documents and Settings\David\Desktop>Rem This script runs Videoredo to edit the recording using the .vprj project file.
C:\Documents and Settings\David\Desktop>cscript //nologo "C:\Program Files\VideoReDoTVSuite\vp.vbs" "G:\Recordings\CSI.VPrj" "G:\Recordings\CSI_clean
d.mpg" /t1 /q
? Unable to open file/project: G:\Recordings\CSI.VPrj
C:\Documents and Settings\David\Desktop>pause
Press any key to continue . . .
2008-11-17, 08:01 AM
With the above example, you'll notice there aren't any spaces in either file's name...
so try this and see if we're getting somewhere Code: cscript //nologo "C:\Program Files\VideoReDoTVSuite\vp.vbs" %~dpn1.VPrj %~dpn1_cleaned.mpg /t1 /qI removed the quotes around the last two variables...
Frank Z
[COLOR="Gray"] I used to ask 'why?' Now I just reinstall... [SIZE="1"]______________________________________________ Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE] [/COLOR]
2008-11-18, 01:55 AM
zehd Wrote:With the above example, you'll notice there aren't any spaces in either file's name... Thanks...but still didn't help. I have found out something interesting though. If I put under scores where the spaces are it works. The CSI folder and mpg names are created by gbpvr and don't know if I can change the way it does the naming or not. Also it only works when I have this in the batch file. Apparently this creates a loop and goes back to trying to find more .vprj files and would be nice if I could get it to stop but don't have a clue how to do that. Also don't know how to create the code to where if there are spaces in the folders or file names the batch file still can read them or if possible setup gbpvr not to create spaces. One step closer....I think. :confused:Code: REM This calls a routine that will process the recordings using Videoredo
FOR /R %dir1% %%f IN (*.vprj) DO CALL :adprocessing %%f
:adprocessing |
|
|
| Possibly Related Threads… | |||||
| Thread | Author | Replies | Views | Last Post | |
| file types of recorded TV | paul1 | 3 | 4,560 |
2012-09-30, 05:20 PM Last Post: sub |
|
| tunningAssistant: Failed to find Crossbar | Zack63 | 4 | 3,775 |
2010-10-20, 03:36 PM Last Post: Zack63 |
|
| No Data In the Recorded File | zb1 | 5 | 3,297 |
2010-08-24, 01:08 AM Last Post: zb1 |
|
| Path to file being recorded. | brianj | 5 | 3,290 |
2010-08-08, 10:58 PM Last Post: brianj |
|
| Can't find channels | flodog | 1 | 2,608 |
2010-08-07, 02:28 PM Last Post: mvallevand |
|
| error: failure playing back file | yonu | 4 | 2,808 |
2010-07-12, 12:52 AM Last Post: yonu |
|
| UK Freesat Scan.cache File | jeffers | 3 | 2,887 |
2010-05-25, 10:34 PM Last Post: jeffers |
|
| 3 AC3Filter instances when playing back a still recording TS file? | jksmurf | 3 | 2,719 |
2010-05-17, 12:30 AM Last Post: jksmurf |
|
| Recording stops at 4gb file size | experiencebliss | 5 | 3,387 |
2010-05-04, 02:54 AM Last Post: pBS |
|
| Hauppage HVR-950q, no file created when recording, no pause. | donbrowne | 5 | 2,943 |
2010-04-08, 04:03 PM Last Post: sub |
|