NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) Old Stuff (Legacy) v
« Previous 1 … 85 86 87 88 89 … 125 Next »
How to get the new name after renamerecordings

 
  • 0 Vote(s) - 0 Average
How to get the new name after renamerecordings
tpgbpvr
Offline

Member

Posts: 58
Threads: 6
Joined: Jun 2005
#11
2005-12-15, 04:46 PM
erik Wrote:When I look at these lines in the log file its seems comskip was activated



and



Remember to delete the postprocessing.log file if you run new tests because the output is always appended to the end of the file.
unfortunately comskip is activated but there is no file for comskip to run on since the original %1 name no longer exists. So the renamed file gets created and that is it. The %newname% that comskip and comclean look for does not get created. Again I am not a programmer. But I can watch the file get renamed and that is it. Where previously (or if I manually launch comskip from the cmd) the text files would appear and the cut points would be created then comclean would run and take care of the new cut file.

thanks for the help.
erik
Offline

Posting Freak

Posts: 1,138
Threads: 123
Joined: Apr 2005
#12
2005-12-15, 05:31 PM
Seems I made a wrong assumption in using data from renamerecording.log
Could you post the log file of renamerecording where it actually renamed a file so I can check if the content of the log file is as I expected it to be?
P4 3GHz 1GB, 250GB, nVidia dualTV, GBPVR 1.3.11, XP
Support Comskip, visit the forum and donate at http://www.comskip.org/
erik
Offline

Posting Freak

Posts: 1,138
Threads: 123
Joined: Apr 2005
#13
2005-12-15, 10:15 PM
This should work for renamerecordins (with the s)

Code:
rem Process all the lines from the Renamerecording log file
rem This will read each line in the log and creates the transocder queue
for all lines that have an mpeg file name
for /F "usebackq delims=' tokens=1,2,3,4,5" %%i in ("renamerecordings.log") do call :processline "%%j"  "%%l"
Rem all lines are processed so nothing more to do except starting the transcode batch

REM This is the transcoding portion
cd "C:\Program Files\devnz\gbpvr\Transcoder\"
start /min /low mtranscode.vbs
REM end mencoder test section ------------------


goto :eof

:processline
This is called for each line in the log file
rem Only do something for lines where an mpeg file is renamed, otherwise do nothing
if NOT "%~x2" == ".mpg" goto :eof
set oldname=%~1
set newname=%~2
Rem Here you have to do all the processing because only here its guaranteed to have the old and the new name.
Rem If the renamerecodings.log file contains the log of renaming multiple mpegs this will be executed for each mpeg file

echo %newname% >> transcode_queue.txt

:eof
P4 3GHz 1GB, 250GB, nVidia dualTV, GBPVR 1.3.11, XP
Support Comskip, visit the forum and donate at http://www.comskip.org/
uries
Offline

Junior Member

Posts: 9
Threads: 1
Joined: Dec 2005
#14
2005-12-15, 10:18 PM
Got the batch file to work with a little modification. Had a problem as I was accessing the files off another drive which was creating problems with the parsing scheme. Comskip and Comclean2 are getting called, however now I have a problem with Comskip failing before completion of processing and therefore not making a CPF file.

Here it goes:
Code:
@echo off
Renamerecording %1 >renamerecording.log

rem Process all the lines from the Renamerecording log file
set oldname=%1
for /F "usebackq  delims=: tokens=1,2,3" %%i in ("renamerecording.log") do call :processline "%%i" "%%j" "%%k"
goto :afternewname

:processline
rem Remove
set arg=%~1
rem Skip useless lines
echo %1 : %2 >>postprocessing.log
if NOT "%arg:~0,3%"=="New" goto :eof
set newname="%~2:%~3"

Rem Skip the space at the start
set newname=%newname:~2,100%

Rem Add quote to beginning of name
set newname="%newname%

goto :eof

:afternewname
echo old name = %oldname% >> postprocessing.log
echo New name = %newname% >>postprocessing.log

Comskip %newname% >>postprocessing.log

Call Comclean2 %newname%

:eof
tpgbpvr
Offline

Member

Posts: 58
Threads: 6
Joined: Jun 2005
#15
2005-12-16, 02:12 AM
uries Wrote:Got the batch file to work with a little modification. Had a problem as I was accessing the files off another drive which was creating problems with the parsing scheme. Comskip and Comclean2 are getting called, however now I have a problem with Comskip failing before completion of processing and therefore not making a CPF file.

Here it goes:
CODE

Yes!Big Grin Worked for me! (Erik I have not tried yours yet, will do)

Now can someone help me rename the new file to include the Name of the show and the episode?
currently the show is renamed to "Episode.mpg"
I would love to see "ShowName - Episode.mpg"

That would be perfect!!

Thanks.
reboot
Offline

Posting Freak

Posts: 1,426
Threads: 89
Joined: Mar 2005
#16
2005-12-16, 05:57 PM
I could get neither to work with renamerecordings.
I run everything in parallelprocessing.bat, which may make a difference, I'm not sure.
I am also accessing files and folders on a different drive.

jam_zhou has kindly written a beautiful bit of .vbs script that does it perfectly, by using the renamerecordings.log file, parsing the file to dig out the renamed .mpg, then passing it to a .txt file.

Using this, one could then run comskip/comclean, using the right filename.

Here's an example which I think might work...NOT tested!
Code:
RenameRecordings %1 > renamerecordings.log
start /min /low getnewname.vbs
Comskip %newname% >>transcode_queue.txt
Call Comclean %newname%
Here's the .vbs
Just extract it to your gbpvr folder.
You can never have enough tuners!
Pentium Quad / 4Gb Dual Channel RAM / XPSP3 / 2 x PVR-500, PVR-250 / GB-PVR
jam_zhou
Offline

Senior Member

Posts: 632
Threads: 179
Joined: Sep 2005
#17
2005-12-16, 06:10 PM
this will not work...the script passes the new name into a text file called transcode_queue.txt...give me a bit and I'll try to modifity it so that it will return a value to a batch variable
jam_zhou
Offline

Senior Member

Posts: 632
Threads: 179
Joined: Sep 2005
#18
2005-12-17, 05:37 PM
OK, I've made a kludge...

put the vbs script into your gbpvr directory, then copy the test.bat line into your postprocessing.bat.

The idea in the batch file is to do the following:
run renamerecordingS and show a log
run getnewname.vbs to get the new name - it's important to have /wait
- this will make a temp file that will have the new name
extract the new name from the temp file and set it to a batch variable
delete the temp file

run comskip and comclean and stuff like that.

There is no need to include the double quotes like in previous batch scripts because the vbs script keeps the double quotes.

Feel free to look into the scripts and modify or ask questions if I haven't explained myself.

Cheers
tpgbpvr
Offline

Member

Posts: 58
Threads: 6
Joined: Jun 2005
#19
2005-12-19, 12:31 AM
jam_zhou Wrote:OK, I've made a kludge...

put the vbs script into your gbpvr directory, then copy the test.bat line into your postprocessing.bat.

The idea in the batch file is to do the following:
run renamerecordingS and show a log
run getnewname.vbs to get the new name - it's important to have /wait
- this will make a temp file that will have the new name
extract the new name from the temp file and set it to a batch variable
delete the temp file

run comskip and comclean and stuff like that.

There is no need to include the double quotes like in previous batch scripts because the vbs script keeps the double quotes.

Feel free to look into the scripts and modify or ask questions if I haven't explained myself.

Cheers


Any way to get this to incorporate kingargyle's new renamerecording that renames the program to include "title - episode.mpg"?

see his post http://forums.gbpvr.com/showpost.php?p=7...stcount=23

that would be ideal!
uries
Offline

Junior Member

Posts: 9
Threads: 1
Joined: Dec 2005
#20
2005-12-19, 08:35 AM
With this script placed in my Postprocessing.bat, its running comskip and comclean2 twice each time finished recording. Anyone see the reason? I imagine its with the placement of the For switch, but I dont know enough about the language to figure it out.

Code:
set channel=%2

Rem list of channels to not run anything on
if "%channel%" == "5" goto eof:
if "%channel%" == "21" goto eof:

:rename
rectracker %1 >rectracker.log
Renamerecording %1 >renamerecording.log

rem Process all the lines from the Renamerecording log file
set oldname=%1
for /F "usebackq  delims=: tokens=1,2,3" %%i in ("renamerecording.log") do call :processline "%%i" "%%j" "%%k"
goto :afternewname

:processline
REM Remove
set arg=%~1
REM Skip useless lines
REM echo %1 : %2 >>postprocessing.log
if NOT "%arg:~0,3%"=="New" goto :eof
set newname="%~2:%~3"
REM Skip the space at the start
set newname=%newname:~2,100%
REM add " at beginning since cut off in previous line
set newname="%newname%

:afternewname
echo old name = %oldname% >> postprocessing.log
echo New name = %newname% >>postprocessing.log

Rem Special Comskip INI on these channels
if "%channel%" == "4" goto :channelCBS
if "%channel%" == "15" goto :channelFOX
if "%channel%" == "56" goto :channelSCIFI
Rem use the default comskip.ini for all other channels
goto :comercial

:channelFOX
comskip --ini=comskip-fox.ini %newname% >>commercial.log
goto :clean

:channelSCIFI
comskip --ini=comskip-scifi.ini %newname% >>commercial.log
goto :clean

:channelCBS
comskip --ini=comskip-cbs.ini %newname% >>commercial.log
goto :clean

:comercial
Comskip %newname% >>postprocessing.log

:clean
Call Comclean2.bat %newname%

:transcode
echo %newname% >>  transcode_queue.txt
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (4): « Previous 1 2 3 4 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  renamerecordingS the..sleeper 1 1,642 2009-04-21, 08:36 PM
Last Post: David
  Episode Numbers - RenameRecordings or MyVideos? humpty 16 5,477 2006-08-18, 01:56 PM
Last Post: humpty
  Renamerecordings - any way to specify naming convention? linfor 1 1,103 2005-08-22, 04:05 PM
Last Post: reboot
  SA, Comclean, RenameRecordings... reboot 53 12,988 2005-08-20, 08:50 PM
Last Post: jam292
  RenameRecordings Problem BigT 3 1,875 2005-07-23, 02:57 PM
Last Post: afriend1
  Convert2wme and renamerecordings erik 0 1,720 2005-07-09, 12:52 PM
Last Post: erik

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

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

Linear Mode
Threaded Mode