View Full Version : WizRenameRecording issues

2009-02-19, 03:49 PM
Ongoing trouble with this.
It renames some files, not others.
Log shows:
[0]: F:\pathname\show name_20090218_20002100.mpg
[1]: {show}{[-]}{episode}

ERROR: Source file (parameter 0) does not exist.
Obviously with the proper path and show names.

My postprocessing.bat is thus:
cscript //nologo "C:\Program Files\VideoReDoPlus\vp.vbs" "%~dpn1.VPrj" "%~dpn1_Cleaned.mpg" /t1 /q
Rem RENAME the old .mpg file and rename the new one to the old name
move "%~dpn1.mpg" "%~dpn1_original.mpg"
move "%~dpn1_Cleaned.mpg" "%~dpn1.mpg"
DEL "%~dpn1.vprj"
DEL "%~dpn1.log"
DEL "%~dpn1.txt"

WizRenameRecording.exe "%~f1" "{show}{[-]}{episode}"
Comskip is run on the file thru gbpvr, creating the .vprj etc.
I just want it to rename things properly and consistently, or find something that does.

2009-02-19, 08:49 PM
The error indicates that the file does not exist. Can you verify? If so, can you provide me with the log file of one that failed and I will try to recreate.

You might try changing

WizRenameRecording.exe "%~f1" "{show}{[-]}{episode}"


WizRenameRecording.exe "%~dpn1.mpg" "{show}{[-]}{episode}"

So it matches the rename logic.

2009-03-03, 10:32 PM
The file DEFINITELY exists, I just recorded it!
Tried the change you suggest above. Seems to work, but only if I don't do any transcoding.
I usually transcode everything to divx for complete show seasons on disk.
Here's a sample log.

================================================== =========
WizRenameRecording - Rename recording files and db entries.
Run on: 3/3/2009 2:23 PM (v0.1.0.6)
================================================== =========

[0]: F:\Franklin\Franklin_20090303_13591422.mpg
[1]: {show}{[-]}{episode}

Retrieving entry from Recordings table...
Evalute called.
Source : Franklin
Pattern: {show}{[-]}{episode}
Result : Franklin-Franklin's Big Game; Franklin's Reading Club

Rename called.
Source : F:\Franklin\Franklin_20090303_13591422.mpg
Target : F:\Franklin\Franklin-Franklin's Big Game; Franklin's Reading Club.mpg
Step1: Rename file- ERROR: The process cannot access the file because it is being used by another process.
***Backout triggered***
1-Set filename back. Failed: Unable to find the specified file.
2-Set comskip files back. Successful.
3-Set thumbnail files back. media/art directory does not exist. Bypass.
Backout complete.
Complete: 3/3/2009 2:23 PM
Return code: 5

2009-03-04, 03:20 AM
Hmmm.. You mentioned you were calling this in post processing, could you post your complete script?

In your transcode step, have you changed the file extension (ie from mpg to avi)? If so, that would explain why the program did not find the file, the .mpg does not exist after transcoding, it is now an .avi.

You most current log output indicates a different error than the first example. The most current indicates that some process still has the file open :

ERROR: The process cannot access the file because it is being used by another process.

If you run it manually (ie interactively) does it successfully rename the file?

2009-03-06, 04:03 PM
OK, here's the process from start to finish, WITHOUT the transcoding process, as the mpg still exists, I don't delete it.
First, comskip is run from gbpvr, to generate the logs, txts, and vprj file.
Second, postprocessing.bat is run and videoredo cleans the file.
The original file is renamed with the _original.mpg tagged onto the filename.
The .txt, .vprj, and .log files are deleted.
This is all supposed to leave two mpgs. The cleaned one with the original gbpvr date and time filename, and the original date and time filename with _original tagged on.
Wizrename recording is then run to rename the cleaned file.
Here's postprocessing.bat
cscript //nologo "C:\Program Files\VideoReDoPlus\vp.vbs" "%~dpn1.VPrj" "%~dpn1_Cleaned.mpg" /t1 /q
Rem RENAME the old .mpg file and rename the new one to the old name
move "%~dpn1.mpg" "%~dpn1_original.mpg"
move "%~dpn1_cleaned.mpg" "%~dpn1.mpg"
DEL "*.vprj"
DEL "*.log"
DEL "*.txt"
WizRenameRecording.exe "%~dpn1.mpg" "{show}{[-]}{episode}"
As it is, the file is supposed to be cleaned and renamed, but the DEL commands are not working and the wizrenamerecording isn't either, but the videoredo cleaning IS.
You say "run it interactively"...exactly how? You mean drop the file on wizrenamerecording.exe and see if it works?
Remember, this seems to be random. I'm using a PVR-500 and very often do back to back recordings, which means that tuner 2 records the second show, because of 1 minute pre and post padding.
The transcoding is done through gbpvr config, but leaving that out of the equation, still doesn't solve the problem.

2009-03-06, 05:58 PM
Seems like somthing is 'holding' onto some of the files. Could you post your C:\Program Files\VideoReDoPlus\vp.vbs file as well?

Two things about your script:
You don't specifiy the directory name on your delete statements. Not sure what the default directory is, but you may not be deleting what you want to with the way the script is written. You may want to change to something like DEL "%~dpn1.prj"
Also, if you are running back-to-back recordings, and they finish at relatively the same time, there could be a problem with your delete command, as it will attempt to delete all .vpj, .log and .txt files. If there are multiple in the same directory that could cause unexpected side-effects.
Since it is sporadic, I think there is a timing issue. You may want to put a delay/sleep in the script right after the VideoRedo step to ensure resources are released. (You can find the sleep command in the MS Resource Kit Tools (http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&DisplayLang=en) - works for xp).

2009-03-24, 10:01 PM
Sorry I haven't got back sooner. Things have gone from bad to disastrous. I can't even get the TV listings to work with my xml grabber any more, so i'm pondering a totally new install (again). I'll work on streamlining the process and see if I can figure out where things fall apart. Thanks for your patience.