TiVo-VideoReDo-AutoProcessor Program

dlflannery

Moderator
I found your program night and wonder why it took me so long to find it! A question I have is when running VRD manually and saving to .tivo file it keeps the metadata info and I can see it from the Tivo. When the processing is done with TVAP, I get an error at the end of the Ad scan process saying "Cant transfer Metadata to "name of file.vprj"
I am using Tivo Desktop 2.5, VRD 2.5.3.500, and TVAP v0.48
Any help would be greatly appreciated
Thanks in advance
That message isn't an error message, just a statement of fact. I agree it is confusing and will change it in a future release. Here is how metadata is handled by TVAP:

First the metadata is read from the .TiVo file as soon as the file is completely transferred and is saved with other file data in the .xml file.

For .TiVo outputs, the metadata is automatically inserted in the output file by VRD so TVAP doesn't have to do anything.

For DVR-MS output files, a small subset of metadata is inserted in the output file by TVAP.

For mpeg2 outputs or .vprj outputs, TVAP generates a separate text file containing metadata in a format useable by pyTiVo transcoding server as described in this post.

The message just states the fact that metadata cannot be inserted by TVAP into the output file except for DVR-MS.
 
Last edited:

jnhahm

New member
Ok, That makes sense since the .tivo file i was processing had already been transfered before i had installed TVAP. Thanks for your quick reply and thanks to all who have supported this program.
 

dlflannery

Moderator
TVAP Ver .49 - User-defined batch post-processing!

From change log:

18 December 2007 Ver. 0.49
- Added "showingBits" field to pyTivo medadata text file
- Killed confusing log message about unable to add metadata.
- Added automatic running of user-furnished post-processing batch file.

TVAP will run a batch file of your creation after processing each .mpg file.

-- For mpeg2 outputs, if you place a batch file named TVAPpostProcess.bat or TVAPpostProcess.cmd in the final destination directory TVAP will run the batch file upon completion of VRD processing of each file output to that folder..

The filename WITHOUT the .mpg extension and without the path is passed as the argument to this batch file. No configuration is necessary -- if the batch file is there it will be run.

Regarding this optional user post-process batch file (TVAPpostProcess.cmd):
a.) TVAP just starts the batch and waits for it to complete.
b.) It runs in the final destination folder where it is located.
c.) TVAP has no way to know whether it completed successfully or what it did.
d.) Thus the user is responsible for making the batch file work and not crash or
hang up. And also for not spawning dangling processes that keep on running
after the batch file has exited (unless you REALLY know what you're doing!).
e.) Here is a sample batch file that shows how to add the .mpg extension to
the passed file name and verify the existence of the .mpg file:
Code:
@echo off
setlocal
set mpgName="%~1.mpg"
echo batch file : mpgName is %mpgName%
if exist %mpgName% echo file exists!
pause
 

linfor

New member
Is there anyway to get the functionality of this application using it just on mpg files. I am looking for just such a program but for mpgs and not tivo files.
 

dlflannery

Moderator
Is there anyway to get the functionality of this application using it just on mpg files. I am looking for just such a program but for mpgs and not tivo files.
This would require a major code mod. I'm curious as to your application. You have a situation where mpg's are being transferred into a folder? If there were a number of OP with the same need, I would consider doing it.
 

linfor

New member
This would require a major code mod. I'm curious as to your application. You have a situation where mpg's are being transferred into a folder? If there were a number of OP with the same need, I would consider doing it.
I have recordings done daily. I run quick stream fix on them and then move the originals to a folder. The fixed should be then moved to another folder and adscan run on them and the vprj file created. I have to manually check the files because they are foreign language shows and they do not always have black screen transitions to commercials or before the show start. Plus the programs always start late.
I want to then if possible auto batch the files and run videoredo to cut out the commercials. At that point I want to batch the files again and send them to a script that works with mencoder to convert them to avi.
I know nothing about this stuff and what I have so far I gleaned from the forum and from testing eternally.
1) Run quickstream fix - done
2) move stream fixed files to folder \scanned - done
3) move originals to folder \raws - done
4)Run adscan on files in \scanned folder - having problems figuring out how to tell it to look in \scanned folder

After that step is done and I check the cuts I would like to have a small batch file that will send all the vprj files in that folder to be edited to remove the commercials without me having to manually batch each file. Then I want to send those mpgs to mencoder to be encoded to avi and all the files sed in processing moved to a directory called \processed
I am sure others would find it useful to have all this automated or semi automated.
 

sward

New member
I have recordings done daily. I run quick stream fix on them and then move the originals to a folder. The fixed should be then moved to another folder and adscan run on them and the vprj file created. I have to manually check the files because they are foreign language shows and they do not always have black screen transitions to commercials or before the show start. Plus the programs always start late.
I want to then if possible auto batch the files and run videoredo to cut out the commercials. At that point I want to batch the files again and send them to a script that works with mencoder to convert them to avi.
I know nothing about this stuff and what I have so far I gleaned from the forum and from testing eternally.
1) Run quickstream fix - done
2) move stream fixed files to folder \scanned - done
3) move originals to folder \raws - done
4)Run adscan on files in \scanned folder - having problems figuring out how to tell it to look in \scanned folder

After that step is done and I check the cuts I would like to have a small batch file that will send all the vprj files in that folder to be edited to remove the commercials without me having to manually batch each file. Then I want to send those mpgs to mencoder to be encoded to avi and all the files sed in processing moved to a directory called \processed
I am sure others would find it useful to have all this automated or semi automated.
I don't use Tivo, but I have similar needs and it looks like TVAP could address them all if (1) it didn't require Tivo Desktop, and (2) you could input *.mpg or *.tp files.
 

dlflannery

Moderator
I have recordings done daily. I run quick stream fix on them and then move the originals to a folder. The fixed should be then moved to another folder and adscan run on them and the vprj file created. I have to manually check the files because they are foreign language shows and they do not always have black screen transitions to commercials or before the show start. Plus the programs always start late.
I want to then if possible auto batch the files and run videoredo to cut out the commercials. At that point I want to batch the files again and send them to a script that works with mencoder to convert them to avi.
I know nothing about this stuff and what I have so far I gleaned from the forum and from testing eternally.
1) Run quickstream fix - done
2) move stream fixed files to folder \scanned - done
3) move originals to folder \raws - done
4)Run adscan on files in \scanned folder - having problems figuring out how to tell it to look in \scanned folder

After that step is done and I check the cuts I would like to have a small batch file that will send all the vprj files in that folder to be edited to remove the commercials without me having to manually batch each file. Then I want to send those mpgs to mencoder to be encoded to avi and all the files sed in processing moved to a directory called \processed
I am sure others would find it useful to have all this automated or semi automated.
I have an idea for a mod to TVAP that I think would do this for you:

Use TVAP as currently to automatically QSF and AdScan (without autocuts), thus creating a .vprj file in your scanned folder.

TVAP would remember the .vprj file name and time/date stamp (via data in its xml file).

Then you manually review the edit cuts and save the .vprj file (with the same name).

TVAP will be looking for a change in the time/date stamp (to later) of that .vprj file and when it sees it, will perform the autocut (using your modified edits) creating a final .mpg file.

Then TVAP would run the "user supplied" batch file (the feature just added in Ver. 0.49), which could be your mencoder AVI creation file. TVAP would give priority to "finishing" files this way compared to processing newly transferred file, i.e., only one VRD or mencoder process would be running at one time.
(I believe this is advisable rather than sharing the processor over multiple encoding processes.)

This would entirely automate your process (and mine too!), and you just do the manual edit reviews whenever you want.

How does that sound?
 

msmart

New member
Oooh, I like where you're going with this.

1. I use TVAP to QSF the TiVo file to a new folder.
2. I use DirMon2 to run comskip producing a .vprj file
3. I review/edit cuts saving .vprj with same name

If you could get TVAP to do as you say:
TVAP will be looking for a change in the time/date stamp (to later) of that .vprj file and when it sees it, will perform the autocut (using your modified edits) creating a final .mpg file.
that would be sweet.

Right now I repeat step 3 until finished with files, then add the .vprj files to VRD's Batch Manager and let it go. But having TVAP look for the updated .vprj file would be a nice addition.
 

linfor

New member
I have an idea for a mod to TVAP that I think would do this for you:

Use TVAP as currently to automatically QSF and AdScan (without autocuts), thus creating a .vprj file in your scanned folder.

TVAP would remember the .vprj file name and time/date stamp (via data in its xml file).

Then you manually review the edit cuts and save the .vprj file (with the same name).

TVAP will be looking for a change in the time/date stamp (to later) of that .vprj file and when it sees it, will perform the autocut (using your modified edits) creating a final .mpg file.

Then TVAP would run the "user supplied" batch file (the feature just added in Ver. 0.49), which could be your mencoder AVI creation file. TVAP would give priority to "finishing" files this way compared to processing newly transferred file, i.e., only one VRD or mencoder process would be running at one time.
(I believe this is advisable rather than sharing the processor over multiple encoding processes.)

This would entirely automate your process (and mine too!), and you just do the manual edit reviews whenever you want.

How does that sound?
That sounds great. I would be only too happy to be a guinea pig for this. I know nothing about scripts and all that and I spend so many hours experimenting that I end up confusing myself.
It would be good if we can have mencoder and videoredo use low amount of cpu so that it does not take away proicessing power when a show is being recorded. I use gbpvr for recording and if mencoder runs while recording is going on the recorded show is jumpy and has lots of problems
 

dlflannery

Moderator
TVAP Ver. 0.50 - Automated around manual cuts

Use TVAP as before to automatically QSF and AdScan (without autocuts), thus creating a .vprj file in your AdScan destination folder.

TVAP remembers the .vprj file name and time/date stamp (via data in its xml file).

Then you manually review the edit cuts and save the .vprj file (with the same name in the same place).

TVAP detects the change in the time/date stamp (to later) of that .vprj file and then commands VRD to perform the autocut (using your modified edits) creating the final output file (in the AdScan destination folder).

Then TVAP will run the "user supplied" batch file (the feature just added in Ver. 0.49), if it ("TVAPpostProcess.cmd") is present in the AdScan destination folder AND if the file extension of the final-edited file is .mpg.

If desired you can do all this from within TVAP. After creating the .vprj file(s), stop processing and run GUI VRD to load and review the cuts. Then when you restart processing the auto-generation of the output file with your modified edits will occur.

If you don't want to use the post-batch file for re-encoding to MPEG4 you could just use it to transfer completed files to another folder and/or delete the .vprj files.

This will entirely automate your process (and mine too!), and you just do the manual edit reviews whenever you want.

This was a complicated mod so there may be bugs. Please let me know. I've left the previous version on the download site so you can revert to it if necessary.
 

linfor

New member
Several things
1)If the original file is not a .tivo the program will not see it to start the process
2) Can you put an option in the settings that would allow the user to preset the program to stop any processing after the adscan and another button to start the cutting - like "continue processing". This would help to automate further so that the user would not have to monitor to see when the processing has reached the adscan stage. If you select the stop after VRD it stops after the QSF stage and then has problems locating the file if you want to continue from there.
3) How do I tell it that after it has done the auto cuts to go and do the batch file for the encoding by mencoder. I have that batch file in the adscan directory along with the TVAPpostProcess.cmd
 

dlflannery

Moderator
TVAP Ver. 0.51

26 December 2007 Ver. 0.51
- Removed "_QSF" from .vprj file names.
- Tightened logic determining when user post-process batch is run.
 

dlflannery

Moderator
Several things
1)If the original file is not a .tivo the program will not see it to start the process
Having it look for other file types than .tivo would really complicate the program logic. I will have to ponder that.
2) Can you put an option in the settings that would allow the user to preset the program to stop any processing after the adscan and another button to start the cutting - like "continue processing". This would help to automate further so that the user would not have to monitor to see when the processing has reached the adscan stage. If you select the stop after VRD it stops after the QSF stage and then has problems locating the file if you want to continue from there.
If you configure to do QSF then AdScan w/o cuts (or just AdScan w/o cuts), the program will stop doing anything when it completes generating all the .vprj files. It will not run the user batch file or create the final edited file at that point.

Then if you run VRD to manually verify/modifiy the cuts (by loading the .vprj file then saving to the same location and name when done), TVAP will see the new time stamp on the .vrpj files and willl automatically apply your cuts to generate the final output file. At that point it will run the TVAPpostProcess.cmd with the video file name (without path or extension) as the single argument.
3) How do I tell it that after it has done the auto cuts to go and do the batch file for the encoding by mencoder. I have that batch file in the adscan directory along with the TVAPpostProcess.cmd
You have to use TVAPpostProcess.cmd (or .bat) to do this, either by having it "call" your batch file or by incorporating your batch file into one called TVAPpostProcess.cmd. If you need help creating the batch file(s), could you post or attach your mencoder batch file?
 

msmart

New member
I have a question about where files end up when using QSF and Ad Scan together (without Auto Cut) and using the Delete TiVos option.

When selecting the Do QSF, Do Ad Scan and Delete TiVos options, I think the QSF process runs first and places the mpeg2 file in the QSF Destination folder and deletes the file from the TiVo Transfers folder. Then Ad Scan (without Auto Cut) is run placing a .vprj file in the Ad Scan Destination folder. Am I correct so far?

Then if I update the .vprj file manually and save it, TVAP will run VRD to create a new mpeg2 file without commercials. Where does this file end up? In the Ad Scan Destination folder?

I would also need to manually delete the QSF file from the QSF Destination folder, correct? If so, I think I want it to be this way, just in case something happens, I still have a file to fall back to.
 
Last edited:

msmart

New member
Well, I guess I should have just tried it rather than asking the questions above.

I have to say, this new feature of starting auto cuts after manually editing the .vprj file is VERY COOL!!!!! THANK YOU!!!

Here's what I found how it works:

1) TiVo Desktop transfer completes
2) TVAP starts QSF saving file to QSF Destination folder
3) TVAP deletes file from TiVo Transfers folder
4) TVAP starts Ad Scan saving .vprj file in Ad Scan Destination Folder
5) [When you are ready,] launch VideoReDo to review/edit .vprj project file
6) Save project (Ctrl+P)
7) TVAP starts auto cuts saving file without commercials in Ad Scan Destination folder
8) File in QSF Destination folder remains (manually delete when you are ready)

This is beautiful. Did I say thank you already? If not Thank You!!! ;)

This was a complicated mod so there may be bugs. Please let me know.
I've only done two 30 min files so far, it worked as advertised, I didn't find any bugs. I'd say TVAP is ready for "prime time" as they say. Well done.
 

dlflannery

Moderator
I have a question about where files end up when using QSF and Ad Scan together (without Auto Cut) and using the Delete TiVos option.

When selecting the Do QSF, Do Ad Scan and Delete TiVos options, I think the QSF process runs first and places the mpeg2 file in the QSF Destination folder and deletes the file from the TiVo Transfers folder. Then Ad Scan (without Auto Cut) is run placing a .vprj file in the Ad Scan Destination folder. Am I correct so far?

Then if I update the .vprj file manually and save it, TVAP will run VRD to create a new mpeg2 file without commercials. Where does this file end up? In the Ad Scan Destination folder?

I would also need to manually delete the QSF file from the QSF Destination folder, correct? If so, I think I want it to be this way, just in case something happens, I still have a file to fall back to.
All your assumptions are correct. The TVAPpostProcess.cmd batch file could be used to move and/or delete files if desired.
 

linfor

New member
You have to use TVAPpostProcess.cmd (or .bat) to do this, either by having it "call" your batch file or by incorporating your batch file into one called TVAPpostProcess.cmd. If you need help creating the batch file(s), could you post or attach your mencoder batch file?
Here it is
 

Attachments

dlflannery

Moderator
linfor:
I assume this is a .bat or .cmd and you changed the extension in order to attach it, correct?

Try creating a TVAPpostProcess.cmd file (in your adscan output folder along with the transcode.bat or transcode.cmd file) containing the following:

Code:
@echo off
setlocal

REM Insert the folder path where this batch is running.
REM Be sure to include the final backslash ('\')
REM Do NOT enclose in quotes.

set localDir=C:\my adscan folder path\

REM May need to subsitute extension .cmd for .bat in next line.
call transcode.bat "%localDir%%~1.mpg"
Be sure to use your adscan folder path and set the proper extension for transcode.xxx batch.
 
Last edited:

TivoTodd

New member
dlflannery:
Well done! Nice little app.
Following msmart's 8 simple steps to auto-processing heaven (a few posts back) works great.

I do have a question though. What are the proper setttings in TVAP if you just want to take newly transferred TiVo files, pass it through VideoReDo with no QSF, no Ad-Scan, so we simply have a .mpg file in a new location instead of the .tivo file in the "my recordings" location.

I tried simply setting the "Delete TiVos" in Default settings. I got an error indicating "Error deleting .TiVo file: <program name>"

I tried stopping the processing, resetting the status, and then starting the process, and it deleted the file immediately. But it never to process it through VideoRedo.

Are there proper setttings in TVAP to do this?
 
Top Bottom