TiVo Community
TiVo Community
TiVo Community
Go Back   TiVo Community > Main TiVo Forums > TiVo Home Media Features & TiVoToGo
TiVo Community
Reply
Forum Jump
 
Thread Tools
Old 08-19-2007, 01:08 AM   #61
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,092
@FrooBrar, Dan203 (or any Vista users)

Quote:
Originally Posted by FrooBrar
The attached images... If you cancel the UAC prompt, then the program does not run.
Thanks FrooBrar -- results were exactly as expected.

Now I'm wondering about Vista deployment. Have you or anyone installed TVAP 0.36 (with the Inno Setup installer) on Vista? I would expect problems due to UAC, trust etc. unless you can get around all that by disabling UAC (?).

If the Inno installer is a problem for Vista, and there isn't an acceptable work-around (e.g., disabling UAC for the install?) then a Dev Studio deployment project may be the answer. Using an installer (instead of a zip file) has the advantages that the TiVo metadata COM object can be automatically registered and a shortcut created. But if the security issues are too difficult perhaps the zip approach could be used for Vista with a batch file the user would have to run to register the COM.

I welcome any suggestions or comments.
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dlfl is offline   Reply With Quote
Old 08-19-2007, 01:20 AM   #62
FrooBrar
tivodecode author
 
Join Date: Dec 2006
Posts: 42
Quote:
Originally Posted by dlfl
Thanks FrooBrar -- results were exactly as expected.

Now I'm wondering about Vista deployment. Have you or anyone installed TVAP 0.36 (with the Inno Setup installer) on Vista? I would expect problems due to UAC, trust etc. unless you can get around all that by disabling UAC (?).
I have not tried it. However, I do have some experience deploying installers for Vista (in my real life). As long as one or more of the following is true, you should be fine:
1. The installer executable is manifested with the require administrator property.
2. The installer is something that the Vista heuristics can identify as an installer. The easiest way to be sure of this is to put the word "installer" or "setup" in the name of the executable.

If this is true, Vista will require elevation to run the executable.

Also, since it seems your main app only needs admin rights for one aspect of its operation, you may want to look into the COM elevation moniker, to elevate only the interface which requires it and not the whole app. Google for COM elevation moniker, or at least look at http://msdn2.microsoft.com/en-us/library/ms679687.aspx which details it. However, I do not know how to do it from anything other than C/C++, so this may not be an option for you. Something to think about, though.
FrooBrar is offline   Reply With Quote
Old 08-19-2007, 01:42 AM   #63
FrooBrar
tivodecode author
 
Join Date: Dec 2006
Posts: 42
Also, note that the Tivo Desktop MAK is stored in HKEY_CURRENT_USER, so it's anybody's guess what will happen in an OTS elevation scenario.
FrooBrar is offline   Reply With Quote
Old 08-19-2007, 11:43 AM   #64
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,092
@FrooBrar

Quote:
Originally Posted by FrooBrar
Also, note that the Tivo Desktop MAK is stored in HKEY_CURRENT_USER, so it's anybody's guess what will happen in an OTS elevation scenario.
If I can impose on you a little further, please test the attached modified version of TestUAC. (The included Interop dll must be placed in the path also, and your latest tivocom.dll must be registered.)

If you "allow" it to run, it should display your MAK in a message box then bring up a file browser to select a .tivo file. If you select one a huge message box will display unformatted chunk data. Or you can just cancel the file browser. Then the form will be there with the same text display options as for the previous version.

If this works it would seem to indicate that access to the MAK is OK in the elevation scenario. Or is the potential problem going to exist only if the current user is different from the one who installed the MAK ?

Thanks
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by dlfl : 11-16-2010 at 08:29 AM.
dlfl is offline   Reply With Quote
Old 08-19-2007, 05:14 PM   #65
FrooBrar
tivodecode author
 
Join Date: Dec 2006
Posts: 42
Quote:
Originally Posted by dlfl
If this works it would seem to indicate that access to the MAK is OK in the elevation scenario. Or is the potential problem going to exist only if the current user is different from the one who installed the MAK ?
There will always be a "problem" if the current user is different from the one who installed the MAK, as the MAK is a per-user setting.

The problem I was thinking of, is in the case of "over-the-shoulder" (OTS) elevation, where the user who is logged in is not an administrator, and when they try to run an app which requires admin privileges, they are prompted for credentials of an admin user. I am not sure whose HKEY_CURRENT_USER is used for an app launched in this way: the user currently logged on, or the admin whose credentials were used to elevate.
FrooBrar is offline   Reply With Quote
Old 08-19-2007, 05:38 PM   #66
FrooBrar
tivodecode author
 
Join Date: Dec 2006
Posts: 42
Quote:
Originally Posted by dlfl
If I can impose on you a little further, please test the attached modified version of TestUAC. (The included Interop dll must be placed in the path also, and your latest tivocom.dll must be registered.)

If you "allow" it to run, it should display your MAK in a message box then bring up a file browser to select a .tivo file.
It worked as advertised for an admin user, the elevation prompt, then the message box with the mak and the file browser. I canceled the file browser because I did not have a TiVo file handy...

However, I tested it with a limited user and an admin user using OTS elevation. The admin user was freshly created and did not have a MAK set. I set the MAK for the limited user using PowerShell, which you can see in the background in the attached image, and then tried to run the TestUAC2 app. It required elevation, made me enter the credentials of the admin user, and then gave me the error you see in the foreground. I return a not found error from getting the MAK if it is not set in the registry, which is apparently being translated into a System.IO.FileNotFoundException in C#. May be a good idea to catch those...

Anyway, this confirms that the HKEY_CURRENT_USER key used for OTS elevation is the admin whose credentials are used, not the user who tried to run the app. So the MAK would need to be set for the admin, and it would not matter what the limited user had set for their registry.
Attached Images
File Type: png limited_testuac2.png (36.4 KB, 12 views)
FrooBrar is offline   Reply With Quote
Old 08-19-2007, 11:03 PM   #67
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,092
TVAP Ver. 0.37 "released"

First, many thanks to FrooBrar and Dan203 for their Vista testing and coding the TiVo metadata retrieval stuff.

The Vista install/run security and user privilege stuff is pretty complicated as you can see from the two previous posts by FrooBrar -- I'm not guaranteeing when if ever TVAP will install and run seamlessly on Vista. However I've made some small steps in that direction to the extent that an admin user on Vista should be able to "elevate" TVAP to run with admin privileges, which hopefully will enable it to output DVR-MS.

19 August 2007 Ver. 0.37

- TiVo Metadata now obtained using FrooBrar's tivocom.dll COM object. Visual Studio C++
Runtime libraries (2.6MB) no longer included in installer. User no longer has to
enter MAK, which is obtained and decoded from the Windows Registry.

- Minimize button is active and minimizes to system tray icon. (Clicking tray icon still minimizes too.)

- Embedded manifest so when run on Vista user is prompted to elevate privileges to admin.

- Detects whether running with admin privileges and disables DVR-MS output if not.
User is given appropriate message.

I've left the ver. 0.36 installer on the VideoReDo host site just in case ... a lot of big changes were made in 0.37 !

ftp://upload:upload@videoredo.net/VR...AutoProcessor/
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dlfl is offline   Reply With Quote
Old 08-20-2007, 11:26 PM   #68
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,092
TVAP Ver. 0.38

Small bug fix: If you had enough files displayed to invoke the scroll bar the right click for metadata would select the wrong file.
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dlfl is offline   Reply With Quote
Old 08-26-2007, 08:56 PM   #69
tbuskey
Registered User
 
Join Date: Jun 2003
Posts: 3
Feature requests?

Is this the right place to ask?

1st: great program. I finally have a fairly automated way to transfer shows from my TiVo, strip commercials and store them on my file server. I use pyTivo (gets around the subfolder bug) to let the TiVo pull them back for viewing. My server is Solaris and pyTivo is on there too. I have TiVo Desktop & VideoReDo running in VMware on Linux. If I can get everything running on Solaris or even Linux w/o VMware. Oh well.

I like to keep my files as .Tivo with the metadata. Can TVAP save as .tivo instead of .mpg?

Can TVAP remove the original .TiVo file when it finishes?

Anything to save keystrokes!
tbuskey is offline   Reply With Quote
Old 08-26-2007, 09:13 PM   #70
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,092
Quote:
Originally Posted by tbuskey
.......
I like to keep my files as .Tivo with the metadata. Can TVAP save as .tivo instead of .mpg?

Can TVAP remove the original .TiVo file when it finishes?

Anything to save keystrokes!
TVAP doesn't delete the original .tivo. If you set a destination folder for .tivo files TVAP will move the .tivo files to that folder when done. (If you don't specify any VRD processing then TVAP will do nothing but move the .tivo's to that folder.) But this will be the original (unprocessed by VRD) tivo file.

Do you want to have VRD process the .tivo then save it as a .tivo?

Both deletion and .tivo saves could be considered for addition to TVAP. It would be much easier to program if the processed .tivo files would always be required to be put in a destination folder different from the tivo transfer folder. Would that serve your purposes?
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dlfl is offline   Reply With Quote
Old 08-31-2007, 09:19 AM   #71
tbuskey
Registered User
 
Join Date: Jun 2003
Posts: 3
Quote:
Originally Posted by dlfl
TVAP doesn't delete the original .tivo. If you set a destination folder for .tivo files TVAP will move the .tivo files to that folder when done. (If you don't specify any VRD processing then TVAP will do nothing but move the .tivo's to that folder.) But this will be the original (unprocessed by VRD) tivo file.

Do you want to have VRD process the .tivo then save it as a .tivo?

Both deletion and .tivo saves could be considered for addition to TVAP. It would be much easier to program if the processed .tivo files would always be required to be put in a destination folder different from the tivo transfer folder. Would that serve your purposes?
I want this workflow:

Tivodesktop transfers to local disk (because it can't transfer to a network disk)
TVAP:
1) runs ad-detective with VRD
2) saves the resulting file to a network drive folder as a .tivo file (not the original folder)
3) deletes the original from local disk

pyTivo makes the resulting .tivo available back to my TiVo for viewing.
I've found that pyTivo transfers .mpgs much slower then .tivo files
tbuskey is offline   Reply With Quote
Old 08-31-2007, 02:42 PM   #72
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,092
Quote:
Originally Posted by tbuskey
I want this workflow:

Tivodesktop transfers to local disk (because it can't transfer to a network disk)
TVAP:
1) runs ad-detective with VRD
2) saves the resulting file to a network drive folder as a .tivo file (not the original folder)
3) deletes the original from local disk

pyTivo makes the resulting .tivo available back to my TiVo for viewing.
I've found that pyTivo transfers .mpgs much slower then .tivo files
I've got a version of TVAP that I'm about to start testing. It will do what you want as long as VRD can output a file to a network drive path and the path URL can be specified in a form that VRD accepts as a path for output files.

I don't have a network drive to test with. If you process a file in VRD can you have it output the processed file directly to the network drive? I assume yes, but it would be nice to know for sure.

I use pyTivo but I've never had an MPEG video that didn't transfer faster than real time, even from my laptop using wireless.
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dlfl is offline   Reply With Quote
Old 09-01-2007, 12:50 AM   #73
FrooBrar
tivodecode author
 
Join Date: Dec 2006
Posts: 42
Quote:
Originally Posted by dlfl
I've got a version of TVAP that I'm about to start testing. It will do what you want as long as VRD can output a file to a network drive path and the path URL can be specified in a form that VRD accepts as a path for output files.
Maybe I'm missing something here, but how can you output a .TiVo file? I think this is what was being requested, but I know I haven't gotten around to figuring out how to write .TiVo files, since I have a feeling it will be a can of worms. Is there some support for this from VRD or TiVo Desktop that I don't know about?
FrooBrar is offline   Reply With Quote
Old 09-01-2007, 01:16 AM   #74
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,092
Quote:
Originally Posted by FrooBrar
Maybe I'm missing something here, but how can you output a .TiVo file? I think this is what was being requested, but I know I haven't gotten around to figuring out how to write .TiVo files, since I have a feeling it will be a can of worms. Is there some support for this from VRD or TiVo Desktop that I don't know about?
VRD supports the .TiVo output and it passes on the metadata in the process. I've done it with the VRD program but haven't actually done it with the COM interface yet -- but I expect it will work -- and will know real soon now.

Given a .TiVo as input, wouldn't it be essentially a matter of binary copying the metadata portions to the output file? Or is it the MPEG2 part (changed after processing by VRD) that poses the difficulty? Does TiVo encrypt the video encoding too?
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by dlfl : 09-01-2007 at 01:23 AM.
dlfl is offline   Reply With Quote
Old 09-01-2007, 01:30 AM   #75
FrooBrar
tivodecode author
 
Join Date: Dec 2006
Posts: 42
Quote:
Originally Posted by dlfl
Given a .TiVo as input, wouldn't it be essentially a matter of binary copying the metadata portions to the output file? Or is it the MPEG2 part (changed after processing by VRD) that poses the difficulty? Does TiVo encrypt the video encoding too?
Ahh, right. I think I see what they are doing then. Some of the video/audio data is encrypted in a normal .TiVo file that you would download from the TiVo box directly. The particular MPEG packets which are encrypted are flagged with a certain bit, and are decrypted by either the TiVo DirectShow filter or TiVoDecode. However, it has been determined quite some time ago that you can take a decrypted MPEG stream, stick an unmodified encrypted metadata header on the front, and the TiVo will like it just fine (presumably, it would try to decrypt any packets flagged as encrypted, but since there are none, it doesn't try).
FrooBrar is offline   Reply With Quote
Old 09-03-2007, 07:55 PM   #76
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,092
TVAP Ver. 0.39

Quote:
Originally Posted by tbuskey
I want this workflow:
Tivodesktop transfers to local disk (because it can't transfer to a network disk)
TVAP:
1) runs ad-detective with VRD
2) saves the resulting file to a network drive folder as a .tivo file (not the original folder)
3) deletes the original from local disk
This version should do it, although I could not test it on an actual network drive (because I don't have one -- yet). I tested using a 300 GB USB drive. As long as there is a path to the network drive that can be selected in the folder browser that TVAP uses to select destination folders, it should work, assuming VRD is ok with it too.

From the changelog:
3 September 2007 Ver. 0.39
- Added .TiVo output file type selection.
- Added option in default settings to delete original .TiVo file after processing it.
- Major change in file handling: Previously, all processing outputs were placed on the TiVo
transfer directory, then moved to destination folders if so configured. Now the VRD
process outputs the files directly to the specified output folders. The only file moves
made by TVAP are for the original .TiVo file to its destination folder after processing, if set.

I've left the previous version on the download site, just in case. There might be problems caused by slow file access. I had one VRD error during testing with DRV-MS files where the Ad Scan process said it couldn't find the QSF'ed input file -- but the file was actually there when I looked. I guessed this was probably related to slow drive access, e.g., the OS saying a file was there (TVAP checks the input file existence before it launches a VRD process) when it actually was still being written to by the previous process. Thus I sprinkled in 1 second time delays after each VRD process , and after the code that writes the metadata to the DVR_MS file. After that I could not duplicate the error. Keep me posted.

Download and readme info:
ftp://upload:upload@videoredo.net/VR...AutoProcessor/
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dlfl is offline   Reply With Quote
Old 09-05-2007, 12:43 AM   #77
FrooBrar
tivodecode author
 
Join Date: Dec 2006
Posts: 42
I am considering changing the interface for my COM component. I want to make the ITivoDecode.OpenTivoFile method take the MAK as a parameter, rather than setting it as a property on the ITivoFile object later. Currently, if you don't set the property on the file, it will default to the MAK from the registry. In my proposed change, you would have to pass in the TivoDecode.mak property to the function.

Does this seem reasonable?
FrooBrar is offline   Reply With Quote
Old 09-05-2007, 10:27 PM   #78
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,092
Quote:
Originally Posted by FrooBrar
I am considering changing the interface for my COM component. I want to make the ITivoDecode.OpenTivoFile method take the MAK as a parameter, rather than setting it as a property on the ITivoFile object later. Currently, if you don't set the property on the file, it will default to the MAK from the registry. In my proposed change, you would have to pass in the TivoDecode.mak property to the function.

Does this seem reasonable?
So....... Does this mean I can still avoid having the user enter the MAK, i.e., by using the ITivoDecode.MAK property in "get" mode then just passing the MAK thus obtained in to the revised OpenTivoFile method?

If so, that's fine for me. I would just prefer not to require the user to enter the MAK (even once).

Just curious, what is your motivation for this change? OTS ? Should TVAP have an option to enter a MAK different than what is found in the current user's registry section? (To get more settings in TVAP I may need to expand the real estate on the form, or add another dialog, etc. -- oh well!).
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by dlfl : 09-06-2007 at 07:43 PM.
dlfl is offline   Reply With Quote
Old 09-07-2007, 02:27 AM   #79
FrooBrar
tivodecode author
 
Join Date: Dec 2006
Posts: 42
Quote:
Originally Posted by dlfl
So....... Does this mean I can still avoid having the user enter the MAK, i.e., by using the ITivoDecode.MAK property in "get" mode then just passing the MAK thus obtained in to the revised OpenTivoFile method?
Yes. Also, I have figured out how to do default parameters in COM, so you may be able to not specify a value and have it just work. I know this works right from JScript/VBScript/VB, and does not work from C/C++, so I don't know how C# will take it...

Quote:
Originally Posted by dlfl
If so, that's fine for me. I would just prefer not to require the user to enter the MAK (even once).

Just curious, what is your motivation for this change?
I want to be able to do more work up front on OpenTivoFile rather than waiting for later, so I can avoid holding the file open for the lifetime of the ITivoFile object. To do this, I need to know the MAK before I return the ITivoFile object to the caller, so you could not set the MAK property yet and would need to pass it into the function.

However, I am in the middle of adding features to the COM object (I only ever implemented a subset of what I ultimately intended to), and it turns out I need to hold the file open for the lifetime of the object anyway. But, I am still doing more metadata work up front now than before.

I am adding support to open a TivoFile object over an IStream (apparently UCOMIStream to you) as well as on a file name, so a client of the object could stream Tivo file data in from any source, not just a file. To do this in a way that best supports streaming, I need to avoid all seek operations and just go sequentially through the file.

I am also adding suppport to decrypt the MPEG stream to a file or an IStream as well.

Quote:
Originally Posted by dlfl
Should TVAP have an option to enter a MAK different than what is found in the current user's registry section? (To get more settings in TVAP I may need to expand the real estate on the form, or add another dialog, etc. -- oh well!).
Well, that is a feature you can consider. You don't have to, though. In reality, OTS is not that likely in your target demographic. That feature is intended for enterprise users on a domain, who have centralized IT staff. The user needs to run something elevated so they call in the IT guy who enters the admin password "over the shoulder" of the user.

Last edited by FrooBrar : 09-07-2007 at 02:28 AM. Reason: oops, left quoted text outside the quote block
FrooBrar is offline   Reply With Quote
Old 09-07-2007, 03:06 AM   #80
Dan203
Super Moderator
 
Dan203's Avatar
 
Join Date: Apr 2000
Location: Nevada
Posts: 25,994
Quote:
Originally Posted by FrooBrar
Yes. Also, I have figured out how to do default parameters in COM, so you may be able to not specify a value and have it just work. I know this works right from JScript/VBScript/VB, and does not work from C/C++, so I don't know how C# will take it...
You can set default values in C++ but it takes a little extra work. Once you add an ActiveX control to a C++ project, in MS VC++, it automatically generates a .h file with prototype functions for each corresponding ActiveX function. If you edit those prototypes to have default values then you are not required to supply values when actually calling the function from other parts of the C++ program. Alternatively you can simply pass the function a blank string and your ActiveX function should be smart enough to detect that and apply the default on it's own.

Dan
__________________
Dan Haddix
Super Moderator
Developer for VideoReDo
Dan203 is offline   Reply With Quote
Old 09-07-2007, 03:33 AM   #81
FrooBrar
tivodecode author
 
Join Date: Dec 2006
Posts: 42
Quote:
Originally Posted by Dan203
You can set default values in C++ but it takes a little extra work. Once you add an ActiveX control to a C++ project, in MS VC++, it automatically generates a .h file with prototype functions for each corresponding ActiveX function. If you edit those prototypes to have default values then you are not required to supply values when actually calling the function from other parts of the C++ program. Alternatively you can simply pass the function a blank string and your ActiveX function should be smart enough to detect that and apply the default on it's own.

Dan
Well, yes and no. I can add default parameters to the functions in my class, but I cannot add default parameters to the interface, which is in a .h file which is autogenerated by MIDL at compile time.

And I didn't use the empty string as the default value, but that would probably be easier.

I just did a little googling, and I found this:
http://blogs.msdn.com/eric_carter/ar...15/114079.aspx

Looks like C# does not support the default parameters option of COM. Ugh.

I will change my implementation to accept the empty string to mean "use the mak in the registry and throw if it is not found"...
FrooBrar is offline   Reply With Quote
Old 09-07-2007, 03:50 AM   #82
Dan203
Super Moderator
 
Dan203's Avatar
 
Join Date: Apr 2000
Location: Nevada
Posts: 25,994
Quote:
Originally Posted by FrooBrar
Well, yes and no. I can add default parameters to the functions in my class, but I cannot add default parameters to the interface, which is in a .h file which is autogenerated by MIDL at compile time.
Sorry what I meant was that the user could add defaults on their end by editing the .h file which is automatically generated by MSVS when adding a ActiveX control to a C++ project. If you wanted to simplify it you could provide a replacement .h file the user could just drop into the project overwriting the auto generated one.

Although allowing an empty string is the easier option

Dan
__________________
Dan Haddix
Super Moderator
Developer for VideoReDo
Dan203 is offline   Reply With Quote
Old 09-07-2007, 07:38 PM   #83
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,092
Quote:
Originally Posted by FrooBrar
Well, yes and no. I can add default parameters to the functions in my class, but I cannot add default parameters to the interface, which is in a .h file which is autogenerated by MIDL at compile time.

And I didn't use the empty string as the default value, but that would probably be easier.

I just did a little googling, and I found this:
http://blogs.msdn.com/eric_carter/ar...15/114079.aspx

Looks like C# does not support the default parameters option of COM. Ugh.
..........
Interesting link. I've done a fair amount of C++ programming (Borland Builder, mostly) and I find C# syntax refreshingly simpler. But not in this case!
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dlfl is offline   Reply With Quote
Old 09-09-2007, 07:51 PM   #84
FrooBrar
tivodecode author
 
Join Date: Dec 2006
Posts: 42
Quote:
Originally Posted by FrooBrar
I will change my implementation to accept the empty string to mean "use the mak in the registry and throw if it is not found"...
I have put a new release of tivocom at http://tivodecode.sourceforge.net/ti...ivocom-1.2.zip

This is what I said in my commit message (should describe the changes pretty well)

rework interfaces (bumped typelib version to 1.1). Add support for decoding
the MPEG stream. Added support to read and write from streams (implementing
IStream) and make the versions which take filenames use a stream
implementation that wraps file access. Make OpenTivoFile take the MAK as a
parameter. It has a default value of "" (empty string), which means try to
get the MAK from the registry, so either omit that param (for those
languages which permit that) or specify it as empty string to use the MAK
from the registry. Added progress reporting of MPEG stream decoding via a
connection point. Progress is updated every 100 frames, and percent
complete is provided if the tivo file stream supports Seek and Stat
functions


Also, something I didn't mention in the commit message is I changed the error when the MAK is not found so that it returns the same HRESULT (ERROR_FILE_NOT_FOUND), but also sets the error info so you may get a description of the error as "MAK not found". Hopefully a little better than the generic "file not found" message it was giving...

Please try it out and let me know what you think.
FrooBrar is offline   Reply With Quote
Old 09-10-2007, 02:30 PM   #85
Dan203
Super Moderator
 
Dan203's Avatar
 
Join Date: Apr 2000
Location: Nevada
Posts: 25,994
Quote:
Originally Posted by FrooBrar
Added support to read and write from streams
Does this functionality give the user the ability to write MPEG Program Stream data to the file while maintaining the encrypted meta data?

Also a technical, but mostly unrelated, question... In the .tivo file's header there is some unencrypted XML data labeled "fingerprint" and "salt". Is it possible to generate these two values from scratch using nothing more then the MAK? Or do they need to come from the TiVo itself? I've noticed that they are different in each .tivo file, so they're not static values. I've also noticed that changing even a single digit of either one prevents TiVo Desktop from being able to decrypt the metadata in the file. It also effect the video, but only if the video is encrypted, and that is not a requirement. However TiVo Desktop does require the metadata to be encrypted so these values are needed for proper metadata storage.

The ultimate goal here would be to allow the building of a .tivo file from scratch. Taking unencrypted metadata and an unencrypted MPEG stream an melding them into a .tivo file which can then be read by TiVo Desktop and transfered onto a TiVo complete with metadata.

Dan
__________________
Dan Haddix
Super Moderator
Developer for VideoReDo
Dan203 is offline   Reply With Quote
Old 09-11-2007, 01:15 AM   #86
FrooBrar
tivodecode author
 
Join Date: Dec 2006
Posts: 42
Quote:
Originally Posted by Dan203
Does this functionality give the user the ability to write MPEG Program Stream data to the file while maintaining the encrypted meta data?
No, just to decrypt the MPEG part to a file or stream.

Quote:
Originally Posted by Dan203
Also a technical, but mostly unrelated, question... In the .tivo file's header there is some unencrypted XML data labeled "fingerprint" and "salt". Is it possible to generate these two values from scratch using nothing more then the MAK? Or do they need to come from the TiVo itself? I've noticed that they are different in each .tivo file, so they're not static values. I've also noticed that changing even a single digit of either one prevents TiVo Desktop from being able to decrypt the metadata in the file. It also effect the video, but only if the video is encrypted, and that is not a requirement. However TiVo Desktop does require the metadata to be encrypted so these values are needed for proper metadata storage.
All right, here's a quick overview of how the keys are generated for encrypting/decrypting the data (metadata and video)

Video: Take the MAK, in ASCII, concatenate the plaintext XML chunk, take the SHA1 of this.

Metadata: Make a string "tivo:TiVo DVR:MAK", take the MD5 of this string, convert that to ASCII hex, concatenate the plaintext XML chunk, take the SHA1 of this.

So, technically, the format of the chunk you are referring to does not matter. It could say whatever you wanted. It is used verbatim to decrypt the data in the file.

I have written a perl script to test generating a TiVo header with metadata from the decrypted chunks, using tdcat and a little creative use of pack(). It is not really in a user-friendly or portable state, and I intend to get around to writing a C program to do this when I get some free time, and add this to tivodecode, but I will try to post the perl script I have right now.

Quote:
Originally Posted by Dan203
The ultimate goal here would be to allow the building of a .tivo file from scratch. Taking unencrypted metadata and an unencrypted MPEG stream an melding them into a .tivo file which can then be read by TiVo Desktop and transfered onto a TiVo complete with metadata.

Dan
I have done this with the perl script, and it worked. So far I have noticed that TiVo Desktop uses chunk id 1, while the TiVo itself prefers to use chunk id 2. Also, if you change the metadata in chunk 2 and send it back to the TiVo, you may be surprised to see the TiVo still showing you the old metadata. This seems to be due to the unique show id in chunk 2 xml, and I guess the TiVo has a cache of metadata based on show id and does not update it. Just delete the show ID from the chunk 2 xml before sending it back to the tivo and it will work.

Also, the file generated is the part of the tivo file right up to the start of the MPEG data. I just ran:
cat decrypted_mpeg.mpg >> output.TiVo
and got a combined file.
Attached Files
File Type: txt tivo-padding-test.pl.txt (3.5 KB, 15 views)
FrooBrar is offline   Reply With Quote
Old 10-13-2007, 12:18 AM   #87
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,092
TVAP Ver. 0.40

- Fixed: When TivoToGo (at least Ver. 2.3 that I use) queues multiple tivo files for transfer, it creates zero-length files on the tivo transfer directory and TVAP decided the files had completed transferring because their length was not changing.

- Fixed: MetaData for files being transferred was not handled properly.

Download or view readme instructions/details at:
ftp://upload:upload@videoredo.net/VR...AutoProcessor/
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dlfl is offline   Reply With Quote
Old 10-16-2007, 10:49 PM   #88
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,092
TVAP Ver 0.41

16 October 2007 Ver. 0.41
- TiVo files "queued" for transfer by Desktop (i.e., sitting on transfer folder with constant zero size)
are shown as TRANSFERRING in the file list, with "queued" displayed for file length. This allows
user to set custom processing options.
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dlfl is offline   Reply With Quote
Old 10-17-2007, 01:31 AM   #89
saberman
Registered User
 
Join Date: May 2004
Posts: 195
Quote:
Originally Posted by dlfl
Also, if someone has a PC running XP and can run this from an account that doesn't have admin privileges I would appreciate knowing what that does too.

Thanks!
I tried running it on Windows XP SP2 from an account that is a power user but not an administratior and it said:

---------------------------
TestUAC.exe - Application Error
---------------------------
The application failed to initialize properly (0xc0000135). Click on OK to terminate the application.
---------------------------
OK
---------------------------

I go the same results when I tried "run as" using an adminstrator id.
saberman is offline   Reply With Quote
Old 10-17-2007, 09:23 PM   #90
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 6,092
Quote:
Originally Posted by saberman
I tried running it on Windows XP SP2 from an account that is a power user but not an administratior and it said:

---------------------------
TestUAC.exe - Application Error
---------------------------
The application failed to initialize properly (0xc0000135). Click on OK to terminate the application.
---------------------------
OK
---------------------------

I go the same results when I tried "run as" using an adminstrator id.
Thanks for the info. I hope such issues are not causing TVAP users problems that they can't work around. I haven't sorted out the interaction between user privileges and MAK owner beyond what FrooBar said in post #66 of this thread.
__________________

"It must be swell to be so perfect and odor-free" -- Del Griffith


VideoReDo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

pyTivo users: Try
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
and
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
dlfl is offline   Reply With Quote
Reply
Forum Jump




Thread Tools


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Advertisements

TiVo Community
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
vBulletin Skins by: Relivo Media

(C) 2013 Magenium Solutions - All Rights Reserved. No information may be posted elsewhere without written permission.
TiVoŽ is a registered trademark of TiVo Inc. This site is not owned or operated by TiVo Inc.
All times are GMT -5. The time now is 02:56 AM.
OUR NETWORK: MyOpenRouter | TechLore | SansaCommunity | RoboCommunity | MediaSmart Home | Explore3DTV | Dijit Community | DVR Playground |