TiVo Community Forum banner
1 - 20 of 230 Posts

· Now in HD
Joined
·
5,823 Posts
Discussion Starter · #1 ·
I've been thinking of doing this for quite awhile and finally gave it a shot.

I just "removed" the .tivo header portion of a Family Guy episode I transferred using a hex editor and saved it as a file named FG.dat

I then edited the original .tivo file in VideoRedo to remove commercials, saved that away as FG.mpg

Opened up a DOS prompt and typed copy /b FG.dat+FG.mpg FG_edit.tivo

Just transferred FG_edit.tivo back to my TiVo and ... voila ... I have a Family Guy episode with no commercials but all its information intact (and in a folder!). :up:

Now to automate this... and figure out how to alter the xml data inside the .tivo portion of the file. :cool:

Edit: We'll I've taken a stab at automating the removal of the header...



TiVo Attach
 

· Registered
Joined
·
6 Posts
So could this process also be used to add Tivo metadata to video files that did not originate from a tivo. Like Family Videos - So that they could have titles and be placed in folders when transfered to a Tivo via GoBack...
 

· Now in HD
Joined
·
5,823 Posts
Discussion Starter · #4 ·
dmets said:
So could this process also be used to add Tivo metadata to video files that did not originate from a tivo. Like Family Videos - So that they could have titles and be placed in folders when transfered to a Tivo via GoBack...
First I gotta figure out how the information is stored in the header. It is not in clear text, but it may simple be Base64 or something. I see a hash and salt combination. I assume that is just hashing the MAK and not all the metadata, but I am not sure.

That would be [peter]sweet![/peter] though. :)
 

· Funkadelic
Joined
·
3,525 Posts
greg_burns said:
First I gotta figure out how the information is stored in the header. It is not in clear text, but it may simple be Base64 or something. I see a hash and salt combination. I assume that is just hashing the MAK and not all the metadata, but I am not sure.
It would be nice if TiVo could point us (YOU) in the right direction for creating custom headers until they create some sort of TiVo Desktop add-on widget to do it. I do remember early on there was a Wiki entry somewhere trying to decode that stuff, but I don't think they got very far. (Their goal was different anyhow.)

It'd be nice to add Dave's Home Video or something and end up with a folder of all my home videos. Not that I have any home videos, but maybe I'd think about getting a camera. :)
 

· Registered
Joined
·
11 Posts
So if you copy the header back on without changing the file extension to .tivo does the Tivo still recognize the metadata? Is the editing file that has been re-merged playable on a personal computer that doesn't know the MAK?

I sent this thread to the author of VideoRedo asking if he would add the ability to retain the metadata after editing as described in this thread.
 

· Registered
Joined
·
4 Posts
This is Dan from VideoReDo. Since the text isn't in clear-text if someone can describe what it looks like and where its located we can look at automating this. I can be reached at the videoredo support email (The board would not let me post our email address).
 

· Now in HD
Joined
·
5,823 Posts
Discussion Starter · #10 ·
samkuhn said:
So if you copy the header back on without changing the file extension to .tivo does the Tivo still recognize the metadata?
No. You can try this yourself by just renaming an original .tivo file to .mpg. Your Tivo will no longer show the metadata for that file, just its filename. The Tivo box must decide whether to even look for metadata based on file extension. If you do rename .tivo file to .mpg it won't even transfer.

samkuhn said:
Is the editing file that has been re-merged playable on a personal computer that doesn't know the MAK?
Haven't tried that. Can't image that it would since the part of the file that makes it a .tivo file has been reattached.
 

· Now in HD
Joined
·
5,823 Posts
Discussion Starter · #11 ·
videoredo said:
This is Dan from VideoReDo. Since the text isn't in clear-text if someone can describe what it looks like and where its located we can look at automating this. I can be reached at the videoredo support email (The board would not let me post our email address).
Well, all I am doing is opening any Tivo file up using a Hex editor. (I am using the one built-into VirtualDub, its on the Tools menu).

You quickly see a disclaimer at the start of the file in clear text\xml format.

From 0x480 to around 0x4000 is data. I assume this must be where the metadata is stored. The regular mpeg file seems to be after this point.
 

· Registered
Joined
·
275 Posts
greg_burns said:
From 0x480 to around 0x4000 is data. I assume this must be where the metadata is stored. The regular mpeg file seems to be after this point.
I spent some time with the file format when I was learning to extract the Closed Captioning information. Adding what has been posted here to what I already know, I would expect that reusing the existing header is workable but creating something custom will be much more difficult. The file is really two parts. The first part is a header created by Tivo with a few notable objects:

Byte 0 : Fingerprint – “TiVo”
Byte 9, length 4 or Byte 11, length 2 : offset of the MPEG2 Program Stream.
Byte 28 : Start of the xml wrapper containing the metadata.
a. Copy Right Notice is in clear text.
b. The metadata follows and is encrypted with a cipher I believe is similar to Blowfish.

The offset value points to a standard (ISO/IEC 13818) MPEG2 Program Stream. Some parts of the program stream are allowed to be encrypted in 13818 and TiVo uses this. In particular, all P and B pictures as well as the audio blocks are encrypted. Everything before the MPEG2 Program Stream should be copied as metadata.
 

· Registered
Joined
·
275 Posts
AV_Novice said:
A quick Google of Blowfish cipher took me to a web site that claims to have a list of 150 products that use Blowfish. Tivo, Inc. is listed.
Blowfish is conjecture on my part but it does have characteristics that fit such as processor/memory requirements, speed, security, license requirements, etc. However, there is also evidence that they have looked at other related algorithms such as Turing. In any case, it is a modern block or stream cipher, so even if Tivo explicitly told us which one they are using, we would still not be likely to break it. The security is in the key and key expansion algorithms not the cipher and no one except Tivo knows what those are...
 

· Now in HD
Joined
·
5,823 Posts
Discussion Starter · #15 ·
I noticed there is a thread on the other site (which shall remain nameless and unlinked :rolleyes: ) that is trying to determine the makeup of .tivo file as well.

"tivo file format (split from: Decrypting TiVo ToGo)"

I'm afraid I am in WAY over my head. :(
 

· Banned
Joined
·
4,176 Posts
greg_burns said:
I noticed there is a thread on the other site (which shall remain nameless and unlinked :rolleyes: ) that is trying to determine the makeup of .tivo file as well.

"tivo file format (split from: Decrypting TiVo ToGo)"

I'm afraid I am in WAY over my head. :(
What you have done so far is very valuable. It would be nice if, for example, VideoRedo just added the option to preserve the data and output to a .tivo extension.
 

· Registered
Joined
·
8 Posts
This is awesome!

Is is possible to do the reverse? That is, make up a .tivo from a homemade .mpg - adding the tivo meta data (episode information) to the mix. Is there a utility to do this easy (assuming you have your media access key)?
 

· Now in HD
Joined
·
5,823 Posts
Discussion Starter · #19 ·
endicot said:
This is awesome!

Is is possible to do the reverse? That is, make up a .tivo from a homemade .mpg - adding the tivo meta data (episode information) to the mix. Is there a utility to do this easy (assuming you have your media access key)?
There is currently no such utility. Unless Tivo makes the software themselves to do this, the chance of one of us figuring it out looks slim. There appears to be somesort of encryption (Blowfish?) on that portion of the file.
 
1 - 20 of 230 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top