TiVo-VideoReDo-AutoProcessor Program

tannebil

New member
The program is running as administrator so it seems unlikely that the UAC prompt is related to accessing the VRD COM objects. It seems more likely that the more immediate problems are that the program is unsigned (so UAC can't confirm that malware hasn't changed it) and/or because the program is immediately trying to write into the program directory (which is Win 7 non-no) or a secured part of the registry (another non-no).

I started to read the MS documentation about UAC and, as usual, I only understood the first couple of paragraphs. When they started talking about manifests, tokens, and registry virtualization, I was quickly reminded why I wouldn't want to be a serious developer. I did notice that the MSDN moderators were posting the hack about using Task Scheduler but I could not get it to work. When I ran the task scheduler shortcut, TVAP started but immediately terminated and I never could find the task in Regedit.

http://social.technet.microsoft.com/Forums/en/w7itprosecurity/thread/81c3c1f2-0169-493a-8f87-d300ea708ecf

But I'm in way over my head here.
 

dlflannery

Moderator
..............
I started to read the MS documentation about UAC and, as usual, I only understood the first couple of paragraphs. When they started talking about manifests, tokens, and registry virtualization, I was quickly reminded why I wouldn't want to be a serious developer. I did notice that the MSDN moderators were posting the hack about using Task Scheduler but I could not get it to work. When I ran the task scheduler shortcut, TVAP started but immediately terminated and I never could find the task in Regedit.

http://social.technet.microsoft.com/Forums/en/w7itprosecurity/thread/81c3c1f2-0169-493a-8f87-d300ea708ecf

But I'm in way over my head here.
Yeah, that's the same link I put in post #219, and I had the same experience. I couldn't get it to work and actually don't understand what they are doing with the shortcut and modifying the registry.

I decided to just see if I could get a TVAP (or VAP) task to run as a scheduled task, initially once at a designated time then later at startup or login.

I wasted hours trying to get it to run once at a designated time (i.e., a couple of minutes after setting up the task). It would either start up and immediatey throw an error message with Windows shutting it down, or do nothing with the result in task manager showing "invalid directory" or something like that. I finally got it to work but only by pure luck and holding my nose right -- hours of googling didn't help at all.

Here are what seem to be the key points to make it work (in addition to what is in the link -- but ignoring the shortcut stuff):

1. TVAP and VAP need the "start in" entry and it must be formatted exactly correctly. It cannot be in quotes (even if it includes spaces), and it cannot include the final '\', or at least doesn't need it.

2. This is the weird one: In the General tab at the bottom, the "Configure as" pull down, you have to select the default one that comes up rather than the (seemingly logical) choice that includes Windows 7 in the name. I could find no help on this anywhere and discovered it just by pure luck.

You can use the -hotStart or other arguments if desired by putting them in the logical place.

So then I experimented with scheduling for "At Startup" and "At Logon", triggers including a 30 sec delay in each case. The At-Logon case worked fine.

The At-Startup case didn't seem to work but in Task Manager I found the program actaully was running with SYSTEM as the owner. AFAIK there is no way to see the program GUI in this case, and it wasn't in the System Tray. Since I hadn't used the -shutdown argument, I had to end the program using Task Manager. Maybe it would actually work this way but I think the At Logon trigger makes more sense.

And indeed, no UAC prompts when running from the scheduler. I haven't yet tried using the scheduler task with a shortcut for launching the program manually without UAC. It wore me out just figuring out how to shedule a task successfully.

Just as a sanity check I set up a TVAP task in scheduler on my XP machine -- piece of cake -- ran the first time.
 

dlflannery

Moderator
The program is running as administrator so it seems unlikely that the UAC prompt is related to accessing the VRD COM objects. It seems more likely that the more immediate problems are that the program is unsigned (so UAC can't confirm that malware hasn't changed it) and/or because the program is immediately trying to write into the program directory (which is Win 7 non-no) or a secured part of the registry (another non-no).
..............
OK, my picture differs from yours (but I'm not a "serioius" developer and I'm confused by the documentation too.)

Anyway here's how I see it:

Even if you're an administrator, when you launch a program Win 7 does not run it with administrative privileges. If it knows or determines the program needs run-as-admin (RAA) and you have UAC turned on, it will prompt you to elevate the privileges. One way it knows RAA is needed is if the developer embeds a "manifest" in the program that tells it so. This is what I've done with TVAP and VAP. Thus it makes no difference for these two programs whether you configure them (in shortcut or executable properties) to RAA -- they are already configured that way by their manifests. At least with the manifest you get the UAC prompt once at startup rather than either an error or UAC prompt later when it does something that needs RAA.

Maybe it isn't the COM objects that require RAA -- until today I was convinced it was by some experiments I did outside TVAP or VAP. However today I can't repeat those experiments with the same result. :confused:

Maybe it's just writing to files in the program files area. I may try fixing this -- it's not as simple as it might seem becasue the VBScript files have to be modified too.

Meanwhile, I've been able to get a UAC-free shortcut working using Option 5. In addition to my previous tips on task setup, I found the following is critical: In the general tab configure run only when user logged on. I had it set up otherwise and it seemed to do nothing but again the task was in the process list of task manager but no way to access the GUI, even though the task owner in this case was me, not SYSTEM. You don't need to define a trigger for this purpose. As I've said before I don't know if all this fuss is worth it to avoid one UAC click when you start TVAP or VAP.

I do think being able to run as a scheduled task is important to some users, so I'm glad that nut has been cracked for Win 7.
 

dlflannery

Moderator
TVAP Ver. 0.85 -- No more UAC prompts

19 Feb 2010 Ver. 0.85

Major Change -- Program no longer writes files to runtime folder (in program files) but to %ALLUSERSPROFILE%\TVAP. (To see what this is on your pc, open a command window and type "echo %ALLUSERSPROFILE%\TVAP". It varies depending on what version of Windows you have.) Files affected are TivoFileManager.xml, TiVoVRDAutoProcessLog.txt, stopper.txt, and arglog.txt.
If upgrading to this version and you want to retain the file status database from a previous version of TVAP you need to copy the TiVoFileManager.xml file to the new data directory. Recommended procedure: (1) Start TVAP and get the message about needing to set folders etc., then (2) shut it down. This will create the data folder. Then (3) delete the new xml file just created in the data folder and copy the previous xml file (from the TVAP install folder in Program Files) to that folder and (4) restart TVAP. This change was made to allow TVAP to run in Vista and Win 7 without requiring "run as administrator" elevation (e.g., the UAC prompt).

Changed -- Until now TVAP would disable DVR-MS output if not running as administrator. Testing on Windows 7 and XP indicates this is no longer necessary. Thus DVR-MS output is now always enabled. This has not been tested on Vista so could be a problem. If so, a workaround is to set program and/or shortcut properties to force running as administrator.

Changed –- ComSkip commercial detection is now enabled for DVR-MS files. It still doesn’t work for me but it clearly is intended to work with DVR-MS files, so I leave it up to the user to try it out.

Another minor change: TVAP-ReadMe is now a PDF file.
 

tannebil

New member
I installed 0.85 and tried to run it without "Run as administrator" checked. It immediately crashed. Rechecked "Run as administrator" and it runs fine but with the UAC prompt at launch.
 

dlflannery

Moderator
I installed 0.85 and tried to run it without "Run as administrator" checked. It immediately crashed. Rechecked "Run as administrator" and it runs fine but with the UAC prompt at launch.
Verify that prior to the first run of 0.85 you had no ProgramData\TVAP folder in existence? Thus when it did run successfully you had to set the folder destinations? Or did you copy the previous xml file into the data folder?

I've learned that (in Win7) a file created by a program running with elevated (run as admin) privileges cannot be written to by a program not running elevated. I've modified VAP so it sets the permissions on the data files it writes to full control for everyone at program termination, which seems to solve this problem. Strangely enough this permission setting works even if you are running VAP non-elevated and with a non-admin logon.

EDIT: Very important to get the exact sequence you followed when you first tried 0.85 if I am to have a chance of duplicating it on my Win7 machine -- please!
For example:
1. Did you uninstall the previous version of TVAP?
2. When you first tried to run 0.85 was it on an administrator logon?
3. Did you move or copy any data files (e.g., TiVoFileManager.xml) prior to the crash?
4. Did it crash the very first time you ran it? If not, what did it do on the very first run?

I've tried every install sequence I can think of and it runs fine on my Win7 pc.
 
Last edited:

tannebil

New member
The first time I ran it, it would have been a "run as administrator" as the shortcut didn't change. I'll try uninstalling, deleting the data folder, reinstalliing, and running without elevated permissions.
 

dlflannery

Moderator
The first time I ran it, it would have been a "run as administrator" as the shortcut didn't change. I'll try uninstalling, deleting the data folder, reinstalliing, and running without elevated permissions.
Are you always logged on as the same administrator account? Was VideoReDo installed while running that logon?

To eliminate the possibility of problems with the VRD COM object do this:
1. Start a command window with default properties (NOT run-as-admin.)
2. Type: CD \Program Files (x86)\TVAP
3. Type: cscript profiles.vbs

You should see a list of profiles, not an error message.
 

dlflannery

Moderator
As discussed in the VAP thread, the change of VRD TVS4 program name from videoredo3.exe to videoredo4.exe in Build 596 breaks the "Run VideoReDo" button action. I will release a fixed version of TVAP ASAP.

A VAP user worked around this by renaming the installed executable (back to videoredo3.exe) however I can't recommend this -- there might be undesirable side effects since I believe the program name appears several places in the Windows Registry.

The safe workaround is to run the GUI version of VRD TVS4 separately for whatever purpose you have in mind, including adjusting cuts done by AdDetective or ComSkip. You should not have to shut down TVAP or even stop processing while you do this -- although I'm not 100% certain about the latter.
 

dlflannery

Moderator
TVAP Ver. 0.86 - Moved the data again!

Sorry for all the changes -- mostly related to Windows 7. I suspect the number of people who fully understand Win7 accounts and permissions is not much greater than the number who fully understand the U.S. Tax Code! I think I've got a good solution now so you don't need UAC elevation, and different logons (user accounts) can use TVAP without interference or other problems.

Major Change – TVAP data files have been moved to user-logon-specific folders defined by %APPDATA%\TVAP.

(Type echo %APPDATA%\TVAP at a command prompt to see where this is for your logon.)

The common location (%ALLUSERSPROFILE%\TVAP) was not working out on Windows 7 – too many file and folder permissions problems when switching between user logons as well as virtual folders being created all over the place. Now, if you run TVAP with a different logon for the first time, you are starting over. Also, you should NOT try to share the same TVAP folders (AdScan, QSF, etc) for different user logons. Note that both VideoReDo and TivoDesktop follow this same principle. Each different logon will have to be individually configured. Note that in Windows 7 if you use your administrative powers to copy data files (e.g., TiVoFileManager.xml) between data folders for different logons, you need to check the file permissions of the destination file and ensure it has full control for the logon that will use that data folder.

For Windows 7 the data folder (%APPDATA%\TVAP) is:
C:\Users\<User account name>\AppData\Roaming\TVAP. This folder will not exist until TVAP is run the first time on a user logon.

Changed – Added code to enable TVAP to determine the VideoReDo installation folder and which VRD program is installed for users who do not have administrator privileges.

Fixed – “Run VideoReDo” button failed with error message for VRD TVSuite 4 Build 596 or later because VRD changed the name of the executable file.

Fixed – If TVAP is unable to read the Profiles when running TVS4, a descriptive error message is displayed suggesting running VRD once as administrator (rather than just crashing) – this is a COM function issue.
 

tannebil

New member
OK, I uninstalled 0.85, deleted all the TVAP folders, and installed 0.86. It was a bit hinky the first time I launched it as it didn't list the files in my TiVo directory. However, quitting and relaunching solved that problem. No UAC prompts! Yeah!

I most likely won't do anything with VAP yet as it doesn't really add anything to to my BTV world. However, I suspect my next step in TV will involve using Windows Media Center to record shows using the cable card version of the HD HomeRun tuner so I suspect will come in handy at that point.
 

tannebil

New member
Postprocessing after Stop

Would it be possible to still run metadata extraction and post-processing after doing a "Stop processing after VRD"? Post-processing is where I load the metadata so I have to go back and do all the metadata manually when I want to stop TVAP from moving on to the next New file.

Thanks, Bill
 
Last edited:

dlflannery

Moderator
Would it be possible to still run metadata extraction and post-processing after doing a "Stop processing after VRD"? Post-processing is where I load the metadata so I have to go back and do all the metadata manually when I want to stop TVAP from moving on to the next New file.

Thanks, Bill
Sorry I don't understand your question. Could you elaborate with more detail about your process and the problem or deficiency you're trying to surmount?
Or, reformulate your question in a more precise way?

Are you saying that TVAP doesn't properly resume processing after you stop-after-VRD? This could be -- I don't use this feature and thus haven't tested it much.
 
Last edited:

msmart

New member
tannebil said:
I want to stop TVAP from moving on to the next New file.
Do you have Auto Cut After Ad Scans checked? If so, deselecting it should allow you to do your metadata loading, when ready to proceed open the project in VRD and Ctrl-P to save it (assuming the project file date will be updated when nothing has changed).
 

dlflannery

Moderator
TVAP Ver. 0.87 MAJOR changes !

Changelog 2 Mar 2010 Ver. 0.87
Major Change – Process flow and folder uses have been changed substantially. There is a single output folder where all final outputs of any process flow are saved. There is a temp(QSF) folder that is used only for temporary QSF'ed files (when the process flow is QSF followed by AdScan). All folders must be distinct now – no two folders can be the same. See the Process Flow and Folders section [of TVAP-Readme.pdf] above for details. When the process is QSF followed by AdScan, the (temporary) QSF file is saved in the Temp(QSF) folder and will be deleted when processing is done, provided Delete QSF is checked.
Major Change – When the process flow is QSF followed by AdScan, the (temporary) QSF'ed file is saved in .mpg format. This has the advantage increasing ComSkip usability – if the QSF'ed file was DVRMS format, ComSkip frequently failed. Also, no temporary or final output files have “_QSF” added to their names.
Change – User Post-process files are run (if checked) for all output types now.
Fixed – For DVRMS outputs, the metadata was not being inserted in the output file for some process flows.
Fixed – The user postprocess and clean-up batch files were being called twice for some process flows.

DISCUSSION OF CHANGES:
For upgrading TVAP users, your current XML data file will be fine but what you used to call the QSF Destination folder will now be the Temp (QSF) folder, and what you used to call the Ad Scan Destination folder will be the (final) Output Folder.

However you may have to make some changes, for example:
1. If you had two folders that were the same, they will have to be set to different locations. And all folders must be set except the TiVo Destination.
2. If you use a process flow where all you do is QSF, the output file will now be saved to the Output Folder (the one that used to be called the Ad Scan folder). And of course the location of your post-process script will have to change accordingly.
3. Post-Process and Clean-up scripts may have to change because TVAP now produces NO output files with "_QSF" in their names! (That's a good thing, right?)

Notes to Windows 7 users:
1. Whenever you install a new version of VideoReDo , it is strongly recommended you run it once as administrator (Right-click shortcut and select “Run as administartor”) before starting TVAP.

2. After TVAP inserts metadata into a final DVRMS output file, the file may be unavailable to other programs for up to 5 minutes. If you are doing postprocessing or cleanup involving the output file your batch file should take this into account, e.g.,, with a wait statement. I have no idea what's going on here and it only seems to happen on Win 7. I spent some time on it but didn't see what causes it -- so we have to live with it for now, at least.
 

dlflannery

Moderator
TVAP Ver. 0.88 -- Minor Fix

2 Mar 2010 Ver. 0.88
Fixed – “Run VideoReDo” button did not work with VRD Plus Beta Build 596 because the VRD Plus executable file name had been changed from “VideoReDo.exe” to “VRDPlus3.exe”.

Unless you're using late VRD Plus betas, you probably don't need this fix.
 

tannebil

New member
Sorry I don't understand your question. Could you elaborate with more detail about your process and the problem or deficiency you're trying to surmount?
Or, reformulate your question in a more precise way?

Are you saying that TVAP doesn't properly resume processing after you stop-after-VRD? This could be -- I don't use this feature and thus haven't tested it much.
Current behavior: "Stop after VRD" causes TVAP to stop processing after VRD completes for the currently processing file. The pyTivo and BTV metadata files are not created and the postprocessing job doesn't run.

Desired behavior: Don't stop TVAP processing until after VRD completes, the the pyTivo and BTV metadata files are created, and the post processing job is run.
 

dlflannery

Moderator
Current behavior: "Stop after VRD" causes TVAP to stop processing after VRD completes for the currently processing file. The pyTivo and BTV metadata files are not created and the postprocessing job doesn't run.

Desired behavior: Don't stop TVAP processing until after VRD completes, the the pyTivo and BTV metadata files are created, and the post processing job is run.
Doesn't it resume where it was when you restart processing? (If not I should fix that.) I'm curious why you need it to do this.

If you're doing manual intervention anyway, one way you can force this behavior is to block processing on all unprocessed inputs. This can be tedious if you have a lot of files waiting to be processed I suppose.

I still need to understand your situation a little better. Don't think I want to give up the way the Stop After VRD button works so it would mean adding another button. What operation wouild you perform if you could stop processing the way you want to do it?
 

tannebil

New member
The situation usually arises when I have a bunch of files waiting to be processed and I want to do something else with the machine. For example, the transcoding process for BTV-recorded shows starts as soon as the recording finishes so if TVAP is processing when that happens, I end up with two VRD processes slamming the system. Or perhaps something with another application requires a reboot.

There are currently 121 shows in my TiVo directory so manually changing the processing flag is ugly. It's actually pretty much impossible to scroll the list of programs except with the arrow up and down keys as the list box refreshes every couple of seconds and with each refresh it jumps back to the currently selected show.

I have not tested if the metadata files creation and postprocessing job happen after resuming processing so I'll do that tonight.
 

dlflannery

Moderator
There is a command line arg to assign process priority to TVAP processes. It defaults to "Below normal" but you can set it one step lower. It won't slow TVAP processing down if you're not doing anything else on the PC. See the ReadMe doc for details.

I've done some experiments with the QSF-AdScan-PostProcess flow, with Autocut on and off. I clicked the "Stop After VRD" button during each step of the process and it successfully resumed where it was after clicking the Start Button. I haven't tested completely shutting down/restarting TVAP after the "Stop After VRD" halts.

Perhaps you could also use the Stop Button. It will abort any running VRD process. It will not abort a PostProcess or ComSkip operation but you can abort those by closing their command window. Then you get the file name from the log and Reset that file so it will start processing from the beginning at the next start button click. You lose whatever processing time had been invested in that file but..... that's what the Stop After VRD button was designed to prevent. This may not always be a clean procedure depending on what your postprocess script does.
 
Last edited:
Top Bottom