PDA

View Full Version : WizRenameRecording v0.1.0.0



JavaWiz
2008-06-03, 03:26 AM
Since AddEpisode has been kind of flakly for a few users, and it does not seem to be supported anymore, I've taken a stab at creating a utility that performs pretty much the same function.

Here is 1st cut at rename utility. The command line options do not exactly match AddEpisode, so take a look at the readme.

Also, there is an interactive mode, if you simply run the program without any parameters. It allows you to construct and test parameter lines prior to actually renaming the file.

gEd
2008-06-04, 08:53 PM
Default
I don;t know what to say, it seems to be working perfectly so far. Thank you ever so much for doing this JW, this has fixed the biggest problem I was having (with recordings appearing as failed becuase of addepisode)

Feature request:

If episode name exists, use episode name only else use showname.

I prefer to have just the episode name when browsing a number of episodes for one showin the video library. Some file names can get very long and the epsiode name can;t be read easily. e.g.

In Search of Medieval Britain - Episode 6 of 6 - West Country.mpg

thanks again.

JavaWiz
2008-06-05, 05:13 AM
Feature request:

If episode name exists, use episode name only else use showname.


You might try ({episode}{or}{show}) as the pattern. That should resolve to the episode name (if exists) or the show name (if episode does not exist).

Glad you find the utility useful. :)

gEd
2008-06-05, 09:47 AM
perfect , thanks!
from release notes
(xx{or}yy) Conditional expression.

Sorry, i clearly didn;t your notes properly in my excitement to get it running.

radar
2008-06-05, 09:28 PM
Thanks Wiz. Looking forward to trying this out.

yonu
2008-06-10, 09:48 PM
any chancew of some slight help with your utility I am having no luck if i run the GUI it works however when i try to add it to my post processing bat witht he params it doesn't doe anything that i can tell

JavaWiz
2008-06-10, 10:04 PM
any chancew of some slight help with your utility I am having no luck if i run the GUI it works however when i try to add it to my post processing bat witht he params it doesn't doe anything that i can tell
It should create a log file gbpvr/logs/WizRenameRecordings.log. The log file should give you some clue as to what is going wrong. If it looks like the post processing bat is not even running the program, post your bat file and I'll see if I can spot what's wrong.

If you still need help, post the bat and log file and I'll take a look.

yonu
2008-06-10, 11:38 PM
here is the post bat as it doesn't even appear to be running it

JavaWiz
2008-06-11, 01:31 AM
here is the post bat as it doesn't even appear to be running it

Does comclean seem to run?
Is there a EXIT statement in comclean.bat, if so, REM it out.
Do you find any log file under gbpvr/logs? It should be called WizRenameRecording.log.
Does WizRenameRecording.exe exist in the gbpvr directory?
What OS are you running?

yonu
2008-06-11, 01:37 AM
ok i found the problem i had missed the log file lol it seems that folder and file names with spaces are screwing it up what do i need to do to fix this

JavaWiz
2008-06-11, 01:52 AM
ok i found the problem i had missed the log file lol it seems that folder and file names with spaces are screwing it up what do i need to do to fix this
If the filename parameter is in quotes (ie "%1" or "%~f1") it should work. Can you post your logfile so I can see what is happening?

yonu
2008-06-11, 01:59 AM
sure here it is

JavaWiz
2008-06-11, 02:32 AM
Try this version. Copy to the gbpvr directory and re-run.

yonu
2008-06-11, 03:04 AM
I get the same error with the new version

JavaWiz
2008-06-11, 03:05 AM
I get the same error with the new version
can you post the logfile?

yonu
2008-06-11, 03:14 AM
sorry here it is

JavaWiz
2008-06-11, 03:19 AM
It looks like your filename is not quoted. Make sure the command line is in the format:

WizRenameRecording "%1" "pattern"
or
WizRenameRecording "%~f1" "pattern"


[0]: D:\The
[1]: Beverly
[2]: Hillbillies\The
[3]: Beverly
[4]: Hillbillies_20080610_22302300.mpg
[5]: {show} {episode}

yonu
2008-06-11, 03:28 AM
ok here is what i have in the post process bat unless i am crazy this is what you posted
WizRenameRecording.exe "%1" "{show} {episode}"

JavaWiz
2008-06-11, 04:31 AM
ok here is what i have in the post process bat unless i am crazy this is what you posted
WizRenameRecording.exe "%1" "{show} {episode}"
Try:
WizRenameRecording.exe "%~f1" "{show} {episode}"

yonu
2008-06-11, 04:15 PM
thanks that worked great now the hard part I have to tune my comskip lol

JavaWiz
2008-06-11, 07:30 PM
thanks that worked great now the hard part I have to tune my comskip lol
Great! Glad you got it working.

_gl
2008-06-22, 09:26 AM
Hi, just found this after getting a (presumably false positive) virus warning for AddEpsiode with AVG8 today (AutoIT worm?). Looks great so far, especially like the GUI mode.

Just one thing, what does "%~f1" actually represent, and why did it work for Yonu when "%1" didn't? Should everyone be using it instead of "%1"?

_gl
2008-06-22, 09:31 AM
... and a small bug report. Whilst trying to rename a file in the GUI mode, I got an error "could not find part of the path D:\Program Files\Devnz\Gbpvr\media\Art".

Turns out I didn't have an Art folder, adding it manually worked.

_gl
2008-06-22, 09:42 AM
... and another one. Trying to rename this file in GUI mode

E:\- AV -\Video\- Recordings -\Frasier\Frasier's Edge.mpg

using this pattern

{show}{[ - ]}{episode} ({year}{month}{day},{hour}{minute})

Gives me this error

"ERROR: SQLite Error: near "s": syntax error

It's gotta be the apostrophe right (Frasier's)?

Full log below. Also I would ideally like to surround my date/time in (). Note I've added them, but they're not used for the resulting name. What's the correct way to do this?

Log:

Evalute called.
Source : Frasier
Pattern: {show}{[ - ]}{episode} ({year}{month}{day},{hour}{minute})
Result : Frasier - Frasier's Edge 20060515,0855

Rename called.
Source : E:\- AV -\Video\- Recordings -\Frasier\Frasier's Edge.mpg
Target : E:\- AV -\Video\- Recordings -\Frasier\Frasier - Frasier's Edge 20060515,0855.mpg
Step1: Rename file-successful.
Step2: Rename thumbnails-0 thumbnails renamed.
Step3: Update recording table-ERROR: SQLite error
near "s": syntax error

JavaWiz
2008-06-22, 06:38 PM
Just one thing, what does "%~f1" actually represent, and why did it work for Yonu when "%1" didn't? Should everyone be using it instead of "%1"?
"%~f1" treats the filename as one parameter, whereas "%1" breaks on every space.


... and a small bug report. Whilst trying to rename a file in the GUI mode, I got an error "could not find part of the path D:\Program Files\Devnz\Gbpvr\media\Art".

Turns out I didn't have an Art folder, adding it manually worked.
This will be fixed in the next version.


It's gotta be the apostrophe right (Frasier's)?

Yep, apostrophe is the culprit. I will fix in next version.


Full log below. Also I would ideally like to surround my date/time in (). Note I've added them, but they're not used for the resulting name. What's the correct way to do this?
Actually, looks like you can't. I work on this so you will preface the character with a backslash. Your pattern would be:

{show}{[ - ]}{episode} \({year}{month}{day},{hour}{minute}\)

I'll try to get this in the next version as well.

_gl
2008-06-22, 07:23 PM
"%~f1" treats the filename as one parameter, whereas "%1" breaks on every space.


OK, but what's the most reliable one? Should we just use "%~f1" by default?

As for the rest, look forward to the next version, thanks JW.

BTW while you're fixing the ', are you already filtering out characters that aren't allowed in filenames (eg \ / ? > : etc)? That has tripped similar utilities up in the past.

JavaWiz
2008-06-22, 08:02 PM
New version (v0.1.0.2 (http://gbpvr.com/pmwiki/pmwiki.php/Utility/WizUtilities)) posted on the wiki.

Jams6502
2008-06-22, 09:54 PM
Thanks JavaWiz

This is very neat.

On little thing that isn't working for me: {hour} doesn't seem to be returning a 24 hour clock time - See original filename and log extracts below.

Filename : Cula 4Go, Diego, Go!_20080602_08400905.mpg
Evalute called.
Source : Cula 4:Go, Diego, Go!
Pattern: {show}{[ - ]}({episode}{or}{year}{month}{day}_{hour}{minute})
Result : Cula 4 Go, Diego, Go! - 20080620_0840

Filename : On the Limit Sports_20080619_22000000.mpg
Evalute called.
Source : On the Limit Sports
Pattern: {show}{[ - ]}({episode}{or}{year}{month}{day}_{hour}{minute})
Result : On the Limit Sports - 20080619_1000

Thanks again !!

Jimmy

JavaWiz
2008-06-22, 10:29 PM
Thanks JavaWiz

This is very neat.

On little thing that isn't working for me: {hour} doesn't seem to be returning a 24 hour clock time - See original filename and log extracts below.

Filename : Cula 4Go, Diego, Go!_20080602_08400905.mpg
Evalute called.
Source : Cula 4:Go, Diego, Go!
Pattern: {show}{[ - ]}({episode}{or}{year}{month}{day}_{hour}{minute})
Result : Cula 4 Go, Diego, Go! - 20080620_0840

Filename : On the Limit Sports_20080619_22000000.mpg
Evalute called.
Source : On the Limit Sports
Pattern: {show}{[ - ]}({episode}{or}{year}{month}{day}_{hour}{minute})
Result : On the Limit Sports - 20080619_1000

Thanks again !!

Jimmy
Try this version. Unzip and copy to the gbpvr directory.

_gl
2008-06-22, 10:33 PM
JavaWiz hasn't said this yet, but in the new version's ReadMe the filename param is now "%~f1", so it looks like "%1" shouldn't be used.

_gl
2008-06-22, 10:44 PM
Try this version. Unzip and copy to the gbpvr directory.

That fixed it for me, thanks JW.

One last request, would it be possible to add a 'Rename All' button?

JavaWiz
2008-06-23, 05:26 PM
One last request, would it be possible to add a 'Rename All' button?
Look for this feature in the next version.

radar
2008-06-26, 08:47 AM
3 cheers for JavaWiz
I love this tool!

4zm4r3d02
2008-07-12, 07:10 AM
I just got a new computer, and am in the process of installing GB_PVR. I saw your utility replaces the now apparently unsupported addepisode, so I decided to give it a try. However, when I run the installer, I get this error:

17660

I'm running Vista Home Premium, and I can't even figure out how to delete the file manually!:confused:

ps Vista won't even let me create postprocessing.bat! It says I don't have permission, and tells me to contact the administrator! What am I, chopped liver?
(don't tell me I'm gonna' hafta read Vista's help files!):rolleyes:

gEd
2008-07-12, 10:13 AM
Stop the recording service first and then try again.

The vista problem sounds like you have the wonderfull User Access Control (UAC) enabled which makes your computer secure but largely unusable and is preventing you from updating the program files folder. I'm not sure what the recommend advise here is for this problem so search the forum for vista and or UAC.

4zm4r3d02
2008-07-12, 05:25 PM
Stop the recording service first and then try again.

The vista problem sounds like you have the wonderfull User Access Control (UAC) enabled which makes your computer secure but largely unusable and is preventing you from updating the program files folder. I'm not sure what the recommend advise here is for this problem so search the forum for vista and or UAC.

I got around that problem by creating the postprocessing.bat file in another folder, then dragging it to the GBPVR folder. Vista then asked me if it was ok to do that, and it moved it there.

However, some test recordings I made last night were not renamed. I tried running postprocessing.bat from a command prompt as administrator, and got this error:
17666
I searched this thread and the readme for "xml", but didn't find anything.:(

Also,there was no 'gbpvr/logs/WizRenameRecordings.log' file, and I didn't see anything about postprocessing.bat in any of the GBPVR logs.

JavaWiz
2008-07-12, 06:14 PM
Looks like you are running into Vista security (UAC) problems. I don't have Vista, so will not be much help.

You might check out this post: http://forums.gbpvr.com/showthread.php?t=36268&highlight=Vista+UAC


WizRenameRecording.xml is the config file for the program. It holds the default pattern. I suspect your security settings are stopping it from being created. Try double-clicking on WizRenameRecording.exe, creating a default pattern, and clicking save. The .xml file should be created in the same directory as the executable.

Similarly, I think UAC is preventing the log file from being created as well.

4zm4r3d02
2008-07-13, 03:40 AM
Looks like you are running into Vista security (UAC) problems. I don't have Vista, so will not be much help.

You might check out this post: http://forums.gbpvr.com/showthread.php?t=36268&highlight=Vista+UAC

All the script in that post does is run the program as administrator, which can also be done from the right click context menu. Either way, WizRenameRecording does not work on my Vista machine. I also tried XP compatibility mode, and that didn't work.



WizRenameRecording.xml is the config file for the program. It holds the default pattern. I suspect your security settings are stopping it from being created. Try double-clicking on WizRenameRecording.exe, creating a default pattern, and clicking save. The .xml file should be created in the same directory as the executable.

Similarly, I think UAC is preventing the log file from being created as well.

Can you post a copy of a WizRenameRecording.xml file, that I can try?

JavaWiz
2008-07-13, 05:24 AM
Can you post a copy of a WizRenameRecording.xml file, that I can try?
Here you go.

4zm4r3d02
2008-07-14, 02:20 PM
Thanks for the file, but it didn't help. Neither did disabling UAC. I guess WizRename just doesn't work on Vista.:(

The good news, for me, is that it turns out that addepisode does work on Vista...so far!:)

linfor
2008-07-14, 08:46 PM
When I open the exe there are no recordings showing for me to use for the test. How do I tell it where to look for the database?

JavaWiz
2008-07-15, 03:05 AM
When I open the exe there are no recordings showing for me to use for the test. How do I tell it where to look for the database?
It determines the name by querying the registry as to the location of GBPVR, then constructing the connection string. It should find your gbpvr.db3 database in the gbpvr directory.

JavaWiz
2008-07-15, 03:34 AM
Thanks for the file, but it didn't help. Neither did disabling UAC. I guess WizRename just doesn't work on Vista.:(

The good news, for me, is that it turns out that addepisode does work on Vista...so far!:)
I recompiled with an option that may allow it to run under Vista. If you have some time, could you download and try this version?

4zm4r3d02
2008-07-17, 12:13 AM
I recompiled with an option that may allow it to run under Vista. If you have some time, could you download and try this version?
Sorry, this version doesn't work, either. Just get this message box
17725
Followed by this one
17726
So far, Windows hasn't notified me about any solutions.:rolleyes:

lstepnio
2008-08-10, 09:42 PM
I have a bit of loss of functionality over addepisode. I was hoping I could add this as feature request.



addepisode %1 "{show}-{yearshort}{month}{day}{[-]}{episode}">tmp/addepisode_%2_%RPPID%.tmp

for /f "tokens=*" %%i in (tmp/addepisode_%2_%RPPID%.tmp) do set new=%%i
"C:\Program Files\UnxUtils\usr\local\wbin\sleep.exe" "30s"
REM del /Q /F tmp\addepisode_%2_%RPPID%.tmp


This allows me to set the renamed recording full path to the "%new%" variable to use in the remainder of the script. This isn't working with WizRenameRecording unless I'm missing something. Thanks.

JavaWiz
2008-08-11, 05:23 AM
I have a bit of loss of functionality over addepisode. I was hoping I could add this as feature request.



addepisode %1 "{show}-{yearshort}{month}{day}{[-]}{episode}">tmp/addepisode_%2_%RPPID%.tmp

for /f "tokens=*" %%i in (tmp/addepisode_%2_%RPPID%.tmp) do set new=%%i
"C:\Program Files\UnxUtils\usr\local\wbin\sleep.exe" "30s"
REM del /Q /F tmp\addepisode_%2_%RPPID%.tmp


This allows me to set the renamed recording full path to the "%new%" variable to use in the remainder of the script. This isn't working with WizRenameRecording unless I'm missing something. Thanks.
Ok, you're going to have to help me out here, so I understand your script.



addepisode %1 "{show}-{yearshort}{month}{day}{[-]}{episode}">tmp/addepisode_%2_%RPPID%.tmp

That redirects the console output of the program to a file in the tmp directory called addepisode_(something)_(something else).tmp


for /f "tokens=*" %%i in (tmp/addepisode_%2_%RPPID%.tmp) do set new=%%i

This one I'm not so sure about. It reads the file just created, and sets the variable %new% to the LAST line in the file.
It then sleeps 30 seconds before continuing.

I guess for the FOR statement to work, the last line in the tmp file needs to be the full filename (drive:directory/file.ext).

Is this correct?

If so, I guess what you are asking is to have WizRenameRecording list the renamed file as the last console output line?

cato
2008-08-23, 02:06 AM
I recompiled with an option that may allow it to run under Vista. If you have some time, could you download and try this version?

I'm having the same problem, but under XP SP3 (just did a fresh install last week). The recompiled version doesn't help.

JavaWiz
2008-08-23, 05:17 AM
I'm having the same problem, but under XP SP3 (just did a fresh install last week). The recompiled version doesn't help.
Ok, now that I know this occurs not only on Vista, but also on XP, then that rules out the problem I was trying to solve with the prior version. I've actually tried running on a W2K machine and it also aborts.

I don't have access to my development machine for a couple weeks, so will be unable to work on this, but I have a few ideas. Could you check your evenvwr and see if you have a message similar to the following?



EventType clr20r3, P1 wizrenamerecording.exe, P2 0.1.0.3, P3 48630c7f,
P4 wizrenamerecording, P5 0.1.0.3, P6 48630c7f, P7 23, P8 1,
P9 system.typeinitialization, P10 NIL.

lstepnio
2008-09-03, 02:29 PM
I'm sorry for the delayed reply. I forgot to subscribe to the thread.

You are correct that what I'm asking for is for WizRename to output to console the renamed file as you desribed. This was the only way I could figure out to get the renamed filename back into a running ParallelProcessing.bat.

Just to clarify which I should of done in the first place the %RPPID% is just a random value to assist in making the .tmp file with the renamed file unique (set RPPID=%RANDOM%).

Thanks! Let me know if you have any other questions and I appreciate the tool you have written.



Ok, you're going to have to help me out here, so I understand your script.



addepisode %1 "{show}-{yearshort}{month}{day}{[-]}{episode}">tmp/addepisode_%2_%RPPID%.tmp

That redirects the console output of the program to a file in the tmp directory called addepisode_(something)_(something else).tmp


for /f "tokens=*" %%i in (tmp/addepisode_%2_%RPPID%.tmp) do set new=%%i

This one I'm not so sure about. It reads the file just created, and sets the variable %new% to the LAST line in the file.
It then sleeps 30 seconds before continuing.

I guess for the FOR statement to work, the last line in the tmp file needs to be the full filename (drive:directory/file.ext).

Is this correct?

If so, I guess what you are asking is to have WizRenameRecording list the renamed file as the last console output line?

JavaWiz
2008-09-04, 12:55 AM
You are correct that what I'm asking for is for WizRename to output to console the renamed file as you desribed. This was the only way I could figure out to get the renamed filename back into a running ParallelProcessing.bat.

WizRenameRecording v1.0.5.0 now outputs the renamed filename as the last line in the log. I think this should allow your batch file to work as before.

lstepnio
2008-09-17, 02:19 AM
I'll give it a try this week and report back. Thanks for making the requested update.

I've been seeing a good number of crashes with RenameRecording now that the new shows have started up and there is a greater number of recordings occuring. It seems that last few times it has occurred it has been with multiple recordings touching the rename portion of scripts right at the same time and one of the rename jobs crashes. I don't really have enough data to say this is true but that has been the pattern so far. Is there a good way to capture debug information in windows for a process?

JavaWiz
2008-09-19, 06:59 PM
I'll give it a try this week and report back. Thanks for making the requested update.

I've been seeing a good number of crashes with RenameRecording now that the new shows have started up and there is a greater number of recordings occuring. It seems that last few times it has occurred it has been with multiple recordings touching the rename portion of scripts right at the same time and one of the rename jobs crashes. I don't really have enough data to say this is true but that has been the pattern so far. Is there a good way to capture debug information in windows for a process?
Something may show up in the Event Viewer.

reboot
2008-09-23, 12:15 AM
New error, not quite sure what to do.
Full error is:
================================================== ========
WizRenameRecording - Rename recording filenames
Run on: 9/22/2008 5:12 PM (v0.1.0.3)
================================================== ========

Parameters:
[0]: F:\The Simpsons\The Simpsons_20080922_17001730.mpg
[1]: {show}{[-]}{episode}

Retrieving entry from Recordings table...
ERROR: Source file not found in Recording table.
Complete: 9/22/2008 5:12 PM
Return code: 3
================================================== ========

Any ideas? It records with no problem, but comskip won't run on it, nor anything else because wizrenamerecording can't seem to find it...or...is this a comskip issue?

JavaWiz
2008-09-23, 03:52 AM
Retrieving entry from Recordings table...
ERROR: Source file not found in Recording table.
Complete: 9/22/2008 5:12 PM
Return code: 3
================================================== ========

Any ideas? It records with no problem, but comskip won't run on it, nor anything else because wizrenamerecording can't seem to find it...or...is this a comskip issue?
It states that the filename does not exist in the GBVR.db3 recording table. Does the recording show up in the Recordings plugin? If it does, select and play it for 10 seconds, then zip and post your pvrx2.exe.log file and I take a look.

Additionally, you state comskip won't run on it, do you mean from your postprocessing.bat file, or interactively? If it is in your post process, post the bat file and I'll take a look.

reboot
2008-09-23, 02:26 PM
To clarify, I run comskip in parallelprocessing.bat so it runs as the recording is being recorded. The full .bat runs perfectly on the first selected recording, but generates the error on the second one, thus the second tuner of the pvr-500.
Both show up in the recordings section, and both play with no issues.
Attached is the log as requested.

JavaWiz
2008-09-23, 03:49 PM
In the log I see 2 attempts to play files:

1) Canada AM, F:\Canada AM\Canada AM.mpg
2) The Early Show, F:\The Early Show\The Early Show_20080923_07000900.mpg

I don't see the Simpson's file being played here. I was hoping to see what the filename was in the db associated with the simpson program that you indicated wouldn't work.

reboot
2008-09-23, 09:07 PM
sorry. Because of the time difference, different shows. Error message is the same, except the filename.
I can recreate the error with two different recordings if that will help, but the first show recorded runs the full .bat perfectly. The second show (doesn't matter what it is) generates the error. A dos window pops up briefly, then disappears too quickly for me to copy it, but it appears to be the same information as appears in the WizRenameRecording.log
At the end of the FIRST recording, a dos window also opens briefly, the system speaker beeps (not through the sound card), then disappears. Seems the info is all correct with no error code that I can see.
The first file is run through the complete .bat and wizrename does rename it properly. The second is not, and I can't find where the process breaks down, because comskip is supposed to be run, then the commercials edited, and THEN wizrenamerecording does it's thing...

JavaWiz
2008-09-23, 09:30 PM
Ok, I wasn't fully understanding the problem. I will try to trap error better in the program and log it. Expect a new version within a few days.

Also, could you post your .bat file that runs WizRenameRecording.exe? I'd like to try and recreate error on my machine.

JavaWiz
2008-09-24, 03:25 AM
Made a couple changes to logging, could you try this attached version.

reboot
2008-09-24, 02:35 PM
OK, did 2 recordings with the new wizrenamerecording.exe
Errors are here:
================================================== =========
WizRenameRecording - Rename recording files and db entries.
Run on: 9/24/2008 7:26 AM (v0.1.0.5)
================================================== =========

Parameters:
[0]: F:\Canada AM\Canada AM_20080924_06000900.mpg
[1]: {show}{[-]}{episode}

Retrieving entry from Recordings table...
ERROR: Invalid status on recording - (1): Recording in Progress
Evalute called.
Source : Canada AM
Pattern: {show}{[-]}{episode}
Result : Canada AM

Rename called.
Source : F:\Canada AM\Canada AM_20080924_06000900.mpg
Target : F:\Canada AM\Canada AM.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: 9/24/2008 7:26 AM
Return code: 5


================================================== =========
WizRenameRecording - Rename recording files and db entries.
Run on: 9/24/2008 7:26 AM (v0.1.0.5)
================================================== =========

Parameters:
[0]: F:\Good Morning America\Good Morning America_20080924_07000900.mpg
[1]: {show}{[-]}{episode}

Retrieving entry from Recordings table...
Evalute called.
Source : Good Morning America
Pattern: {show}{[-]}{episode}
Result : Good Morning America

Rename called.
Source : F:\Good Morning America\Good Morning America_20080924_07000900.mpg
Target : F:\Good Morning America\Good Morning America.mpg
Step1: Rename file- Successful.
Step2: Comskip/support files- 0 comskip/support files renamed.
Step3: Rename thumbnails- media\art directory does not exist. Bypass.
Step4: Update recording table- Successful.
Complete: 9/24/2008 7:26 AM
Return code: 0
F:\Good Morning America\Good Morning America.mpg
Attached is my parallelprocessing.bat, wizrenamerecording.log, and pvrx2.exe.log after playing both files.

JavaWiz
2008-09-24, 03:11 PM
Ok, for some reason, the gbpvr.db3 entry for Canada AM shows that the recording is still in progress (status code 1). Since another process (ie PVRX2 recording service) still has the file open, it cannot be renamed.

This could be a timing issue, and might be solved by putting a delay in the script before WizRename recording, or perhaps better yet, before VideoRedo script is called.

The windows server 2003 resource kit (http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&DisplayLang=en) has a sleep command. This should work if you are running XP.

reboot
2008-09-24, 03:17 PM
OK, I get what you're trying to say, but what confuses me, is that comskip won't even run, and it comes BEFORE anything else in the .bat
I'll try a delay, the problem is how long? Show length, or 10 seconds, or ???
I tried it with a 60 second sleep. It's like the command isn't even there. The error is generated in the first 10 seconds of recording.
How can the recording NOT be in progress. I just started the recording, and the error says it's already recording...leads me to think that it's not seeing the second recording as a separate one. It thinks the first recording is the one already in progress, then generates the error when I start the second one. Clear as mud?

JavaWiz
2008-09-24, 03:51 PM
I don't use ParallelProcessing.bat, which runs at the same time as the recording is being made. Instead, I use PostProcessing.bat that runs AFTER the recording completes.

It seems that on one of the recordings, comskip either does not run, or it terminates prior to the recording being complete. Therefore when VideoRedo and WizRenameRecording kicks in, the recording is still in process.

Not sure if the problem isn't that comskip is unable to run two copies (recording 1 and recording 2) at the same time.

You might try moving VideoRedo and WizRename recording into PostProcessing.bat. You are then insured that the recording is complete, before the script is called.

I can work on some batch scripts to accomplish the above if you need some assistance.

reboot
2008-09-24, 06:15 PM
Makes sense. I'll give it a shot and see if there's any difference. Thanks :)
Nope. Postprocessing.bat doesn't even run. Comskip runs on the first file, not the second, then when ended, nothing...
I put the whole process into postprocessing.bat (just renamed parallelprocessing.bat) and it all works, so go figure?
I was using parallelprocessing.bat because of the CPU consumption that comskip requires when running 2, or more, at once, so in parallel significantly reduced the processing time.
I'd really like to get this working in parallel again. Any clues?


I think I may have solved my problem. If I run comskip from gb-pvr's config, and then run videoredo/wizrenamerecording from postprocessing.bat it may all work. Testing now, back in 25 minutes to let you know how it turned out :D

reboot
2008-09-24, 07:46 PM
Yup, success at last. :D

JavaWiz
2008-09-24, 10:26 PM
Excellent. Glad you got it to work.

So, if I understand, you have GBPVR parallel processing with comskip via the config setting, and VideoRedo and WizRenameRecording running in the PostProcessing.bat. Right?

reboot
2008-09-25, 02:23 PM
Exactly. For some reason, it was working perfectly until a clean install of the latest gb-pvr, then one tuner wouldn't record at all, sorted that out, then started the problems of the second (and third) tuner's errors in parallelprocessing. I purposely didn't mention the third tuner in our previous posts to avoid confusion, and was concentrating on the pvr-500 only, with 2 recordings.
The pvr-250 fell prey to the same errors, if both tuners on the pvr-500 were recording, and I started a third.
By taking comskip out of the parallel and running it from within config, then allowing the remainder (wizrename and videoredo) to run in postprocessing, I keep the memory/CPU usage to a minimum during recording, and everything runs just as it did in parallelprocessing before the changes.
Same end result, just a different way of getting it.
Maybe if Sub peeks in here, he can shed a bit of light on what happened.
Cheers for checking the logs and such, and helping me solve this :D

superflysocal
2008-10-11, 02:42 PM
How do I integrate this into PostProcessing.bat that is right now Stattik's transcode script? His new script also updates the databse to point to the avi file instead of mpg file.

so what i want is:
originalname.mpg to newfilename.mpg
newfilename.mpg converted to newfilename.avi (stattik's script)
library point to newfilename.avi (stattik's script)

or
originalname.mpg to originalname.avi (stattik's script)
originalname.avi to newfilename.avi
library point to newfilename.avi (stattik's script)

This is the part of the stattik's script I'm not sure what to do about:


:: BEGIN MAIN SCRIPT
SET name=%1
SET short_name="%~nx1"
SET title="%~n1"
SET source_size=%~z1
SET start_opt="%short_name:"=% - stattik_transcode" /low /wait /min
here is my Postprecessing.bat

JimF
2008-11-07, 04:37 PM
I have been trying to run WizRenameRecording 1.0.5 from the PostProcessing.bat file under Vista x64 without any luck. If I use the GUI (without administrator privileges for WizRenameRecording.exe), I get the following error in the log:

Evalute called.
Source : Modern Marvels
Pattern: {episode}
Result : Axes

Rename called.
Source : F:\Modern Marvels\Modern Marvels_20081107_12001300.dvr-ms
Target : F:\Modern Marvels\Axes.dvr-ms
Step1: Rename file- Successful.
Step2: Comskip/support files- 0 comskip/support files renamed.
Step3: Rename thumbnails- media\art directory does not exist. Bypass.
Step4: Update recording table- ERROR: Unable to open the database file
unable to open database file
***Backout triggered***
1-Set filename back. Successful.
2-Set comskip files back. Successful.
3-Set thumbnail files back. media/art directory does not exist. Bypass.
Backout complete.

But if I run the GUI with Administrator privileges, it works fine. So the problem with running it from PostProcessing.bat seems to be that it can't run with Administrator privileges. I don't even get a log file generated then. Any suggestions?

EDIT: Even if I run the PostProcessing.bat with UAC disabled on Vista x64, it still won't start WizRenameRecording, and I still don't get a log file either.
All I have in the PostProcessing.bat file is:
@echo
WizRenameRecordings "%~f1" "{episode}"

JavaWiz
2008-11-07, 05:57 PM
How do I integrate this into PostProcessing.bat that is right now Stattik's transcode script? His new script also updates the databse to point to the avi file instead of mpg file.

so what i want is:
originalname.mpg to newfilename.mpg
newfilename.mpg converted to newfilename.avi (stattik's script)
library point to newfilename.avi (stattik's script)

or
originalname.mpg to originalname.avi (stattik's script)
originalname.avi to newfilename.avi
library point to newfilename.avi (stattik's script)

This is the part of the stattik's script I'm not sure what to do about:


:: BEGIN MAIN SCRIPT
SET name=%1
SET short_name="%~nx1"
SET title="%~n1"
SET source_size=%~z1
SET start_opt="%short_name:"=% - stattik_transcode" /low /wait /min
here is my Postprecessing.bat
Sorry, I missed this post. I'll take a look at the bat and try to figure out how this may be acheived, it may be a few days before I respond...

JavaWiz
2008-11-07, 06:52 PM
I have been trying to run WizRenameRecording 1.0.5 from the PostProcessing.bat file under Vista x64 without any luck. If I use the GUI (without administrator privileges for WizRenameRecording.exe), I get the following error in the log:

Evalute called.
Source : Modern Marvels
Pattern: {episode}
Result : Axes

Rename called.
Source : F:\Modern Marvels\Modern Marvels_20081107_12001300.dvr-ms
Target : F:\Modern Marvels\Axes.dvr-ms
Step1: Rename file- Successful.
Step2: Comskip/support files- 0 comskip/support files renamed.
Step3: Rename thumbnails- media\art directory does not exist. Bypass.
Step4: Update recording table- ERROR: Unable to open the database file
unable to open database file
***Backout triggered***
1-Set filename back. Successful.
2-Set comskip files back. Successful.
3-Set thumbnail files back. media/art directory does not exist. Bypass.
Backout complete.

But if I run the GUI with Administrator privileges, it works fine. So the problem with running it from PostProcessing.bat seems to be that it can't run with Administrator privileges. I don't even get a log file generated then. Any suggestions?

EDIT: Even if I run the PostProcessing.bat with UAC disabled on Vista x64, it still won't start WizRenameRecording, and I still don't get a log file either.
All I have in the PostProcessing.bat file is:
@echo
WizRenameRecordings "%~f1" "{episode}"
I don't run Vista, so cannot recreate the problem you're having. It seems though, that the admin account has write privledges to the gbpvr.db3, but your user account does not.

I think maybe if you enable full control to the gbpvr.db3 for your user account, the rename will succeed. The following url gives instructions on how to enable the permissions: http://paulstamatiou.com/2007/02/09/how-to-quickie-vista-permissions

Also, do you know what userid the postprocessing.bat file runs under? That ID must have access to the gbpvr.db3 database.

JimF
2008-11-07, 10:24 PM
Also, do you know what userid the postprocessing.bat file runs under? That ID must have access to the gbpvr.db3 database.

Now you have me stumped. Would it not be the same as the account from which I installed GB-PVR? If so, then I am in good shape. Otherwise, how do I determine it?

And thanks for the excellent link for setting permissions. I am familiar with permissions for XP, but am still very new to Vista. Unfortunately, it did not help. I am already running in an Administer account in Vista (both with and without UAC enabled), but I granted permissions anyway to my User account, and it did not help.

I also can't get RenameRecording to work in Vista, and that runs only under the PostProcessing.bat file without any GUI. I am beginning to think that there is some underlying problem with .bat files and Vista that is not a problem with XP, and it seems to go beyond permissions.

JavaWiz
2008-11-08, 03:54 AM
Now you have me stumped. Would it not be the same as the account from which I installed GB-PVR? If so, then I am in good shape. Otherwise, how do I determine it?

I believe the services run under a special account "Local System Account", but not sure if a batch file shelled from that process inherits the same privileges.

You might try the following (hacked from another post):


Right mouse click the WizRenameRecording.exe.
Select "Properties".
"Compatibility" tab.
Under "Privilege Level", check "Run this program as administrator".
You can click "Show settings for all users" and do the same for a global setting.
If that does not work, I think you should post your question in the General Support forum for some Vista information as to how to get this working. I'm sure others running Vista may have run into similar issues and have resolved them.

Sorry I'm not much help, but security has changed quite a bit in Vista and not being a Vista user, I don't have the background to trouble shoot this problem.

JimF
2008-11-08, 12:08 PM
OK, I will look into it. But I have found one solution: I can get WizRenameRecording to run properly using DirMon2, which runs as a service and has whatever permissions are needed. I have to use DirMon2 to run Comskip anyway, so that may be the answer. But I have not tried running both, so that may trip up; we will see.

Thanks for all the help. You have given me leads that I would not have found otherwise.

smajor
2008-11-10, 05:07 PM
With the new Metadata grabber, can you give us some hints for getting the best results?

As I mentioned in the other thread, I organize my series in directories such as:

\SciFi\Babylon 5\Season 1\01. The Gathering

and so on. If I'm understanding the options, I can specify that the series title is Babylon 5 and it's supposed to sort out descriptions on the episode title?

If so, when doing this search, would putting the 01. inside of parenthesis work better since those are supposed to be excluded (at least in the last version)?

JavaWiz
2008-11-10, 05:23 PM
With the new Metadata grabber, can you give us some hints for getting the best results?

As I mentioned in the other thread, I organize my series in directories such as:

\SciFi\Babylon 5\Season 1\01. The Gathering

and so on. If I'm understanding the options, I can specify that the series title is Babylon 5 and it's supposed to sort out descriptions on the episode title?

If so, when doing this search, would putting the 01. inside of parenthesis work better since those are supposed to be excluded (at least in the last version)?
Yes either (xx) or [xx] would probably work better, so you get the closest match to the real episode name.

JimF
2008-11-15, 02:40 PM
If that does not work, I think you should post your question in the General Support forum for some Vista information as to how to get this working. I'm sure others running Vista may have run into similar issues and have resolved them.

OK, I found it. I just misspelled it as "WizRenameRecordings.exe" in the PostProcessing.bat file. No special permissions are needed for Vista x64 that I can see now, though I changed a lot of things checking it out, but I think they are all back to their defaults now. Thanks again for helping out with this.

JavaWiz
2008-11-15, 02:43 PM
Excellent. Glad you got it working!

smajor
2008-11-16, 04:51 PM
Hello, I have question about the cover art for the MetaData Grabber. Since 90% of what I'm using this for are movies, I assume the cover art is coming from imdb.

The cover art looks okay on a standard def 4x3 TV, but not so hot on a HD TV.

If I look up a title on imdb, say here:

http://www.imdb.com/title/tt0113198/

The thumbnail seems to be what the program is grabbing which is smaller than what GB-PVR is using, so it scales it up (I think). However, if you click that tiny cover art, you get a MUCH nicer resolution of it:

http://www.imdb.com/media/rm2634587136/tt0113198

Is it possible to have Metadata Grabber pull down these instead?

JavaWiz
2008-11-16, 05:41 PM
Hello, I have question about the cover art for the MetaData Grabber. Since 90% of what I'm using this for are movies, I assume the cover art is coming from imdb.

The cover art looks okay on a standard def 4x3 TV, but not so hot on a HD TV.

If I look up a title on imdb, say here:

http://www.imdb.com/title/tt0113198/

The thumbnail seems to be what the program is grabbing which is smaller than what GB-PVR is using, so it scales it up (I think). However, if you click that tiny cover art, you get a MUCH nicer resolution of it:

http://www.imdb.com/media/rm2634587136/tt0113198

Is it possible to have Metadata Grabber pull down these instead?
Yes, I can take a look at adding that in the next version of the WizWebHelper.DLL. This will also improve thumbnails in MovieWiz and SearchWizX2.

smajor
2008-11-16, 11:22 PM
Yes, I can take a look at adding that in the next version of the WizWebHelper.DLL. This will also improve thumbnails in MovieWiz and SearchWizX2.

Thanks again for this. The meta data is pretty neat, it's allowed my kids, who can't read yet, to browse the "Kids" library and find their own shows to watch.

motteroy
2008-11-23, 04:56 PM
WizMetadataGrabber is a nice little utility, and works well with Sub's new Slick skin.

Would it be possible to incorprate some post processing of the retrieved text when you generate the XML ... e.g. convert "&" to "&", ">" to "<" etc. (I know ... I'm just being lazy, but hey, isn't that what these whizzy little utilities are for?)

:)

JavaWiz
2008-11-23, 06:04 PM
WizMetadataGrabber is a nice little utility, and works well with Sub's new Slick skin.

Would it be possible to incorprate some post processing of the retrieved text when you generate the XML ... e.g. convert "&" to "&", ">" to "<" etc. (I know ... I'm just being lazy, but hey, isn't that what these whizzy little utilities are for?)

:)
Absoulutely, I'll add to next version.

JavaWiz
2008-11-24, 03:17 AM
WizMetadataGrabber is a nice little utility, and works well with Sub's new Slick skin.

Would it be possible to incorprate some post processing of the retrieved text when you generate the XML ... e.g. convert "&" to "&", ">" to "<" etc. (I know ... I'm just being lazy, but hey, isn't that what these whizzy little utilities are for?)

:)

Check version found in this (http://forums.gbpvr.com/showthread.php?p=309117#post309117) thread.