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 04-02-2010, 11:20 AM   #1
ggieseke
Registered User
 
Join Date: May 2008
Posts: 3,016
Editing .TiVo Metadata

I figured out a way to create .TiVo files that aren't encrypted so that you can edit the metadata. The actual metadata is in two XML blocks (hereafter referred to as chunks), that you can extract using tivodecode with the -D option. I will leave documenting the exact XML format to others. The basic format of the file header and chunk headers comes from the tivodecode source, and the rest from trial and error.

I'm attaching a very basic Windows command prompt exe for anyone that wants to try it. The rest of this post is probably of interest to developers only. The usage is as follows:

mktivo chunk1 chunk2 mpegfile tivofile

chunk1 & chunk2 are the XML files extracted by tivodecode which you can edit after extracting them, or create your own from scratch. mpegfile is the unencrypted MPEG from tivodecode, kmttg, VideoReDo etc, and tivofile is the output file that it will write.

The technical stuff:

TiVo files normally consist of the file header, followed by chunk #3, chunk #1, chunk #2, and the actual MPEG file. Chunk #3 is not encrypted and contains the disclaimer. Desktop could care less if it's there so I leave it out. The rest of the data is usually encrypted, but by changing a field in the chunk headers from 1 to 0 it works fine without the encryption. All numeric fields in the file and chunk headers use big-endian (or Motorola) format - Windows developers take note. Each chunk consists of a chunk header, the XML data, and some padding.

The file header is 16 bytes long:
Bytes 0-3: The text string "TiVo"
Bytes 4-5: (16-bit) Unknown - set it to 4
Bytes 6-7: (16-bit) Unknown - set it to 13
Bytes 8-9: (16-bit) Unknown - set it to zero
Bytes 10-13: (32-bit) The offset in bytes to the actual MPEG data
Bytes 14-15: (16-bit) The number of chunks - set it to 2

Each chunk header is 12 bytes long:
Bytes 0-3: (32-bit) The chunk size in bytes - more on that later
Bytes 4-7: (32-bit) The size of the XML file in bytes
Bytes 8-9: (16-bit) The chunk ID, which will be 1 or 2
Bytes 10-11: (16-bit) 0=unencrypted, 1=encrypted, so set it to 0

For some reason the first chunk has 4 zero bytes after it and subsequent chunks have 7 zero bytes of padding, so the size for chunk 1 is the header size+XML size+4 and the size for chunk 2 is the header size+XML size+7.

After writing the chunks, pad the output file with zero bytes until the file size is an even multiple of 1024 bytes, then pad it with another 1024 zero bytes. After that, append the MPEG file and you have a .TiVo file. I have no idea why any of the padding bytes are necessary but it seems to require them.

I have also noticed that if you transfer a show back to the TiVo that's in its current database it uses the some of the fields like description from the database, not the metadata once it's transferred. I'm pretty sure that's based on the unique episode ID, but more experimentation is probably needed.

I hope this helps somebody. I mostly use it to edit the airdate and duration on series shows like Good Eats so they show up in order by episode and have the correct duration after editing out the commercials, but a full-blown GUI program to edit or create metadata would be sweet if anyone wants to tackle it.
Attached Files
File Type: zip mktivo.zip (16.1 KB, 116 views)
ggieseke is offline   Reply With Quote
Old 04-02-2010, 01:00 PM   #2
dlfl
Cranky old novice
 
dlfl's Avatar
 
Join Date: Jul 2006
Location: Near Dayton, Ohio
Posts: 5,996
Nice work!

Am I correct that .TiVo files created this way can be shared among users since the MAK is no longer involved ?

I wonder if we now have a new MPEG-2-plus-metadata video file format standard? What are the competitors? Well I guess wtv and dvrms.
__________________

"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 04-02-2010, 01:16 PM   #3
reneg
Registered User
 
Join Date: Jun 2002
Posts: 457
Interesting. I wonder if this can be used to get episode number & genres metadata to display on files transferred back to the Tivo.
reneg is offline   Reply With Quote
Old 04-02-2010, 01:20 PM   #4
ggieseke
Registered User
 
Join Date: May 2008
Posts: 3,016
Quote:
Originally Posted by dlfl View Post
Am I correct that .TiVo files created this way can be shared among users since the MAK is no longer involved ?
That would break TiVo's Terms & Conditions (which wasn't my intention), but yes. IMO it's hardly worth the effort since tivodecode, kmttg, VideoReDo & DSD could do that already. I just wanted to be able to organize my own files.

I'm kinda hoping that somebody with more .TiVo XML experience will run with it and come out with a really elegant metadata editor.
ggieseke is offline   Reply With Quote
Old 04-02-2010, 01:35 PM   #5
ggieseke
Registered User
 
Join Date: May 2008
Posts: 3,016
Quote:
Originally Posted by reneg View Post
Interesting. I wonder if this can be used to get episode number & genres metadata to display on files transferred back to the Tivo.
Absolutely. I have 178 Iron Chef Japan episodes and 206 Good Eats episodes that are doing that right now, and I wrote my own XML files from scratch for those series.

I haven't tested it with pyTivo yet, but in my experience so far anything that transfers back using standard .TiVo files and Desktop transfers back using this method.
ggieseke is offline   Reply With Quote
Old 04-02-2010, 01:47 PM   #6
wmcbrine
Resistance Useless
 
wmcbrine's Avatar
 
Join Date: Aug 2003
Posts: 9,078
Here's some more information on the header, from Dan203:

Quote:
Originally Posted by Dan203
The byte where this information is stored is byte 7 (0 based index)

Bit 0 = Always 0
Bit 1 = 0 for US TiVo files and 1 for AUS/NZ TiVo files
Bit 2 = 0 for Program Stream and 1 for Transport Stream
Bit 3 = 0 for SD and 1 for HD

Bits 4-7 tell you the type of TiVo the file originated from. 1 = regular S2, 5 = DVD TiVo and D = S3.
P.S. Dan's bit numbering here is high-to-low (backwards from what I'd use). Where he says "D = S3", this corresponds to what ggieseke is saying with "Bytes 6-7: (16-bit) Unknown - set it to 13".
__________________

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

Last edited by wmcbrine : 04-02-2010 at 01:56 PM.
wmcbrine is offline   Reply With Quote
Old 04-02-2010, 02:07 PM   #7
ggieseke
Registered User
 
Join Date: May 2008
Posts: 3,016
Quote:
Originally Posted by wmcbrine View Post
Here's some more information on the header, from Dan203:



P.S. Dan's bit numbering here is high-to-low (backwards from what I'd use). Where he says "D = S3", this corresponds to what ggieseke is saying with "Bytes 6-7: (16-bit) Unknown - set it to 13".
Thanks for the additional info! I get 13 (D in hexadecimal) from my S2DT TiVos, but the rest is interesting. I don't have a Series 3 - dunno what's up there.

4-13 is my birthday, so I thought it was just a cool coincidence.
ggieseke is offline   Reply With Quote
Old 04-02-2010, 03:00 PM   #8
Dan203
Super Moderator
 
Dan203's Avatar
 
Join Date: Apr 2000
Location: Nevada
Posts: 25,267
Excellent work! We might be able to do something with this in VideoReDo. Not exactly sure what yet, since it's still illegal for us to decrypt the original metadata, but perhaps we could use it to allow DVR-MS/WTV to TiVo conversions with intact metadata.

Quote:
Originally Posted by wmcbrine View Post
P.S. Dan's bit numbering here is high-to-low (backwards from what I'd use). Where he says "D = S3", this corresponds to what ggieseke is saying with "Bytes 6-7: (16-bit) Unknown - set it to 13".
You're right. When I wrote that I was reading the bits from a hex editor from left to right. My bad.

Anyway the only important bit in that whole thing, at least for this program, is the SD/HD bit. If you set it to 0, which is SD, and the file is actually HD then S2 units will think that they are capable of transferring these files and will simply error out after the transfer starts. This may confuse users because the message provided by the TiVo is completely nondescript.

Dan
__________________
Dan Haddix
Super Moderator
Developer for VideoReDo
Dan203 is offline   Reply With Quote
Old 04-02-2010, 03:11 PM   #9
ggieseke
Registered User
 
Join Date: May 2008
Posts: 3,016
Quote:
Originally Posted by Dan203 View Post
We might be able to do something with this in VideoReDo. Not exactly sure what yet, since it's still illegal for us to decrypt the original metadata, but perhaps we could use it to allow DVR-MS/WTV to TiVo conversions with intact metadata.Dan
Ya gotta love corporate rules. It's legal to decrypt and edit the video, but not the metadata?

Maybe if you agree to NOT use the copyrighted TMS description it would be legal....
ggieseke is offline   Reply With Quote
Old 04-02-2010, 03:43 PM   #10
Dan203
Super Moderator
 
Dan203's Avatar
 
Join Date: Apr 2000
Location: Nevada
Posts: 25,267
It's more about the encryption then the actual data. We can access the unencrypted video using the DirectShow filter provided with TiVo Desktop. However they do not provide anything similar for accessing the metadata. We can't use tivodecode because it technically circumvents the encryption and as such is a violation of the DMCA.

Dan
__________________
Dan Haddix
Super Moderator
Developer for VideoReDo
Dan203 is offline   Reply With Quote
Old 04-02-2010, 08:55 PM   #11
reneg
Registered User
 
Join Date: Jun 2002
Posts: 457
Played with your utility a bit and made myself a .tivo file from a small clip of an hour long show. First thing I ran into when transferring the file back was pyTivo crashing. Since it was a .tivo file that I was transferring, pyTivo tried to run Tdcat to get the metadata out of the file. I'm guessing Tdcat is assuming the .tivo metadata is encrypted and decrypted the clear text xml into garbage. [Edit] Ran tdcat on the .tivo file and it produced an empty file, not garbage.

I moved the tdcat utility so pytivo could not find it and transferred the file again. Second time it transferred. The duration was off but it played fine.

Next I changed the duration and recorded duration xml fields in the chunks and transferred a new .tivo file back. It worked exactly like you would expect which was cool.

Then I tried adding episodeNumber into the xml as the clip I was using didn't contain an episode number. Unfortunately, the episodeNumber did not show up on the Tivo. On the plus side, genres did display back on the Tivo.

Last edited by reneg : 04-02-2010 at 10:35 PM.
reneg is offline   Reply With Quote
Old 04-03-2010, 08:32 PM   #12
reneg
Registered User
 
Join Date: Jun 2002
Posts: 457
Following up after playing around some more. I got episode numbers to display back on the Tivo. I started with a recorded show on the Tivo that didn't have an episode number. I created the two xml chunks from the recorded program and created some tests.

First test was to add <episodeNumber> keyword to both xml chunks. There was no change in behavior on the transferred program. It did not display episode number.

Then I added <episodeNumber> keyword in both chunks and changed <uniqueId> keyword in chunk2 (not the seriesID uniqueId, but the longer one that has an additional two bytes at the end, I just changed these last two bytes). After these changes, the episode number displayed on the Tivo under both the program and info screen after the file was transferred back to the Tivo.

Furthermore, it appears that the Tivo is picking up data to display from the <showing> section of chunk 2.

I wonder if it would be possible for pyTivo to pull files as .tivo files and get complete metadata?
reneg is offline   Reply With Quote
Old 04-03-2010, 09:26 PM   #13
Dan203
Super Moderator
 
Dan203's Avatar
 
Join Date: Apr 2000
Location: Nevada
Posts: 25,267
pyTiVo should be able to be updated to support this new format. All they have to do is read that encryption bit and decide if the XML needs to be decrypted or not. However I'm not sure it's necessary. pyTiVo already has it's own external metadata format, so why would you want to go through the hassle of creating one of these modified .tivo files instead?

Dan
__________________
Dan Haddix
Super Moderator
Developer for VideoReDo
Dan203 is offline   Reply With Quote
Old 04-03-2010, 09:58 PM   #14
innocentfreak
Registered User
 
Join Date: Aug 2001
Location: Florida
Posts: 8,542
Quote:
Originally Posted by Dan203 View Post
Excellent work! We might be able to do something with this in VideoReDo. Not exactly sure what yet, since it's still illegal for us to decrypt the original metadata, but perhaps we could use it to allow DVR-MS/WTV to TiVo conversions with intact metadata.
I would definitely be interested in this. The transfer speeds of the Premiere have given me the itch to be able to transfer anything to the TiVo initiated from the TiVo. I looked briefly into it on the TiVo HD, but I couldn't handle the transfer speeds. Now I am just trying to figure out the best way to have my rips and that where I can pull them to the TiVo rather than streaming.

Does PyTiVo or VideoReDo currently have the ability to convert files in other formats/codecs to .TiVo files that the TiVo can see to pull preferably with guide data?
__________________
1 - TiVo Roamio Pro
2 - TiVo Premiere XL

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


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
innocentfreak is offline   Reply With Quote
Old 04-03-2010, 10:19 PM   #15
mattack
Registered User
 
Join Date: Apr 2001
Location: sunnyvale
Posts: 17,243
I thought they did.. I've been playing with iTivo a bit lately, and it has the option to get metadata out. I just noticed something.. In the metadata for an episode of the tonight show, it ALSO put the metadata for the jimmy fallon show -- presumably because I padded the recording by one minute and so it technically now contains part of the jimmy fallon show.
mattack is offline   Reply With Quote
Old 04-03-2010, 10:51 PM   #16
reneg
Registered User
 
Join Date: Jun 2002
Posts: 457
Quote:
Originally Posted by Dan203 View Post
pyTiVo should be able to be updated to support this new format. All they have to do is read that encryption bit and decide if the XML needs to be decrypted or not. However I'm not sure it's necessary. pyTiVo already has it's own external metadata format, so why would you want to go through the hassle of creating one of these modified .tivo files instead?

Dan
Because even with everything that pyTivo currently does, the metadata is incompletely displayed on the Tivo for files pulled back to the Tivo. Specifically, episode number and genres do not display.

I wasn't thinking of pyTivo creating a modified .tivo file, but rather feeding the Tivo a dynamically generated .tivo data stream on pulls of mpeg2's. pyTivo already deals with xml for metadata and transcoding files to mpeg2.
reneg is offline   Reply With Quote
Old 04-04-2010, 02:01 AM   #17
wmcbrine
Resistance Useless
 
wmcbrine's Avatar
 
Join Date: Aug 2003
Posts: 9,078
Yes, that's my plan. But I still have a few more things to figure out -- like, the bitstreamFormat field: What's that about? Can we do without it?

I also suspect that this might be the only way to feed transport streams (hopefully to include H.264) to the TiVo, but I'm not sure yet.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
wmcbrine is offline   Reply With Quote
Old 04-04-2010, 06:17 AM   #18
ggieseke
Registered User
 
Join Date: May 2008
Posts: 3,016
I leave out everything between </showing> and </TvBusMarshalledStruct:TvBusEnvelope> and it doesn't seem to affect anything, so I think we can do without bitstreamFormat. Some of the other fields like startTime, stopTime & expirationTime are ignored anyway on transfers. I suspect that the entire vActualShowing section may also be unnecessary since it has the wrong info if you pad a show early.

I'm attaching some typical chunks that I created from scratch. Episode number & genres display properly on my TiVos before and after transfer. I made up the episode number and the unique episode id since the data from TMS is incomplete for that series.

I think that the unique episode id in chunk 2 may be the key to how TiVo determines if an episode is already in the NPL, but that's just a guess. From what I've seen it always starts with "EP", then the 6-digit series id, and 4 more digits. On some shows the TMS guide data seems to use the episode number for the last 4 digits (if it exists), and on other shows they just start at 1 and increment it with each new episode.
Attached Files
File Type: zip Chunks.zip (2.1 KB, 27 views)

Last edited by ggieseke : 04-04-2010 at 06:27 AM. Reason: forgot the attachment
ggieseke is offline   Reply With Quote
Old 04-04-2010, 06:26 AM   #19
ggieseke
Registered User
 
Join Date: May 2008
Posts: 3,016
Arrow

Quote:
Originally Posted by Dan203 View Post
pyTiVo should be able to be updated to support this new format. All they have to do is read that encryption bit and decide if the XML needs to be decrypted or not.
A very minor patch to tivodecode would also fix it. Glancing at the source for tdcat, adding one 'if' near the bottom should work.

if ((o_chunk_1 && chunk->id == 1) || (o_chunk_2 && chunk->id == 2))
{
if(chunk->type == TIVO_CHUNK_BLOB)
{
prepare_frame(&metaturing, 0, 0);
skip_turing_data(&metaturing, (size_t)(chunk_start - current_meta_stream_pos));
decrypt_buffer(&metaturing, chunk->data, chunk->data_size);
current_meta_stream_pos = chunk_start + chunk->data_size;
}
if (fwrite (chunk->data, 1, chunk->data_size, ofh) != chunk->data_size)
{
perror("write chunk");
return 8;
}
}
ggieseke is offline   Reply With Quote
Old 04-04-2010, 06:43 AM   #20
reneg
Registered User
 
Join Date: Jun 2002
Posts: 457
Just a bit of clarification on the 2nd <uniqueId> in chunk 2, I've seen it start with "EP", then the 6-digit series id, and 4 more digits and I've also seen it start with "EP", then contain 8-digit series id, and 4 more digits. At some point in the past, they ran out of unique 6-digit series id numbers.

An example from a recent episode of The Mentalist:
Code:
<uniqueId>EP010587140044</uniqueId>
Also, reformating the xml with whitespace doesn't seem to hurt anything, but helps readability quite a bit.

Last edited by reneg : 04-04-2010 at 06:50 AM.
reneg is offline   Reply With Quote
Old 04-04-2010, 06:50 AM   #21
ggieseke
Registered User
 
Join Date: May 2008
Posts: 3,016
Quote:
Originally Posted by reneg View Post
Just a bit of clarification on the 2nd <uniqueId> in chunk 2, I've seen it start with "EP", then the 6-digit series id, and 4 more digits and I've also seen it start with "EP", then contain 8-digit series id, and 4 more digits. At some point in the past, they ran out of unique 6-digit series id numbers.
Oops, forgot about that. I think that also explains why you had trouble getting the episode number to display until you changed the uniqueId. If that uniqueId was already in the database it would have pulled the data from its internal memory, not the metadata.
ggieseke is offline   Reply With Quote
Old 04-04-2010, 10:16 AM   #22
wmcbrine
Resistance Useless
 
wmcbrine's Avatar
 
Join Date: Aug 2003
Posts: 9,078
Quote:
Originally Posted by ggieseke View Post
I suspect that the entire vActualShowing section may also be unnecessary
Yeah, I already ditched that in pyTivo's TvBus responses (almost equivalent to .TiVo XML) -- I just send <vActualShowing/> (an empty section) now.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
wmcbrine is offline   Reply With Quote
Old 04-04-2010, 12:46 PM   #23
reneg
Registered User
 
Join Date: Jun 2002
Posts: 457
Quote:
Originally Posted by ggieseke View Post
A very minor patch to tivodecode would also fix it. Glancing at the source for tdcat, adding one 'if' near the bottom should work.

if ((o_chunk_1 && chunk->id == 1) || (o_chunk_2 && chunk->id == 2))
{
if(chunk->type == TIVO_CHUNK_BLOB)
{
prepare_frame(&metaturing, 0, 0);
skip_turing_data(&metaturing, (size_t)(chunk_start - current_meta_stream_pos));
decrypt_buffer(&metaturing, chunk->data, chunk->data_size);
current_meta_stream_pos = chunk_start + chunk->data_size;
}
if (fwrite (chunk->data, 1, chunk->data_size, ofh) != chunk->data_size)
{
perror("write chunk");
return 8;
}
}
I needed another check to get this to work on the tivodecode-0.3pre source. Here is what I changed to get tdcat to work on encrypted & unencrypted tivo headers.
Code:
190c190
<         if (chunk->data_size && chunk->type == TIVO_CHUNK_PLAINTEXT_XML)
---
>         if (chunk->data_size && (chunk->type == TIVO_CHUNK_PLAINTEXT_XML) && (chunk->id == 3))
199a199,200
>             if(chunk->type == TIVO_CHUNK_ENCRYPTED_XML)
> {
203c205
< 
---
> }

reneg is offline   Reply With Quote
Old 04-06-2010, 08:01 PM   #24
Dan203
Super Moderator
 
Dan203's Avatar
 
Join Date: Apr 2000
Location: Nevada
Posts: 25,267
Quote:
Originally Posted by wmcbrine View Post
the bitstreamFormat field: What's that about? Can we do without it?
I just decoded 3 different files. A regular PS file, a TS file from a Premier and an H.264 TS file from a NZ TiVo and all 3 had the exact same value for the bitstreamFormat. So I don't think it has anything to do with the video codec or the file type.

Dan
__________________
Dan Haddix
Super Moderator
Developer for VideoReDo
Dan203 is offline   Reply With Quote
Old 04-07-2010, 02:04 AM   #25
Dan203
Super Moderator
 
Dan203's Avatar
 
Join Date: Apr 2000
Location: Nevada
Posts: 25,267
FYI I had a sample TS .tivo file from a NZ user which was broadcast in H.264 with AAC LAOS audio. I decrypted the video manually using GraphEdit (similar technique to DSD) and then decrypted both chunks of metadata using tdcat. I then combined it all using the mktivo program from this thread and modified the TS and HD bits manually in a hex editor.

The resulting file played perfectly in WMP. So I tried to pull it to my S3 unit but it failed. I then tried pulling it to my Premier unit and it actually worked! Well kind of. I could play the file and see the video, but I could not hear the audio. Not sure why. The video does have a minor glitch at the beginning of the audio when played on a PC so perhaps that's screwing up the TiVo.

After that I tried to create a TS file myself and attach the same header, but that one crashed WMP and would not transfer to the TiVo. I even tried simply remuxing the NZ file and reattaching the header to that, but again it crashed WMP and refused to transfer. I'm guessing there is something in the TS stream itself that TiVo requires. I have DanR looking at the files to see if he can figure out what that might be. (he's the TS expert) If we can figure it out then maybe we can create H.264 TS files in VRD, attach one of these fake headers, and end up with an H.264 file that can be pulled to a Premier (and maybe a S3 after a software update) instead of having to use MP4s and pyTiVo push.

Dan
__________________
Dan Haddix
Super Moderator
Developer for VideoReDo
Dan203 is offline   Reply With Quote
Old 04-07-2010, 04:40 PM   #26
ggieseke
Registered User
 
Join Date: May 2008
Posts: 3,016
Dan,

Sweet. Looking forward to any news even though I'm stuck in the S2 world.

P.S. I may have a way to get the metadata out of a .TiVo file for you without decrypting anything or breaking any DMCA rules. More on that later after some more programming and experimentation. VRD rocks!
ggieseke is offline   Reply With Quote
Old 04-07-2010, 08:03 PM   #27
reneg
Registered User
 
Join Date: Jun 2002
Posts: 457
Quote:
Originally Posted by ggieseke View Post
Dan,

Sweet. Looking forward to any news even though I'm stuck in the S2 world.

P.S. I may have a way to get the metadata out of a .TiVo file for you without decrypting anything or breaking any DMCA rules. More on that later after some more programming and experimentation. VRD rocks!
Like allowing a user-defined pre-processing application to run?
reneg is offline   Reply With Quote
Old 04-09-2010, 04:29 AM   #28
ggieseke
Registered User
 
Join Date: May 2008
Posts: 3,016
Quote:
Originally Posted by reneg View Post
Like allowing a user-defined pre-processing application to run?
I'm not sure if, or how it could be implemented in VRD - that's up to them.

I started with the assumption that if you could get the metadata out of Desktop itself then it would be legal, just like using the DirectShow filter to get the video. I took a program that I wrote a while back to dump the NPL of a TiVo and modified it to query TiVoServer. The basic HMO spec still applies, but the ports and connect strings are slightly different.

That got me the NPL from Desktop, and from its TiVoVideoDetails Url field you can get chunk 1, but the episode and series IDs needed for chunk 2 were still missing. Then I figured out the file format of Desktop's .cache files and that info was included, but there was no easy way to relate the physical file path stored in a cache file to a specific entry in the NPL.

I added code to list every file in the My TiVo Recordings directory including subdirectories and shortcuts, created a table of physical file paths and the details url that Desktop would use, then matched that to the NPL entries.

It's crude but effective, and it goes through nearly 500 recordings on my PC in less than a second. I still need to add the code to output the XML chunks for a particular file, but then I will have a way to get the metadata without decrypting anything or breaking any rules that I can think of. Of course, TiVoServer.exe has to be running and the file has to be in a directory that it can see, but IMHO that's a fairly minor limitation.

It's mostly just an exercise in curiosity at this point, but it could easily be rewritten into a DLL that other programs could use.
ggieseke is offline   Reply With Quote
Old 04-09-2010, 04:44 AM   #29
Dan203
Super Moderator
 
Dan203's Avatar
 
Join Date: Apr 2000
Location: Nevada
Posts: 25,267
I've actually investigated that path before (i.e. using TiVoServer) and found two problems with it...

1) TiVoServer had to be running, which is not a requirement for simply opening the file.

2) TiVoServer only contains data for .tivo files that are actually stored in the My TiVo Recordings folder. Again, not a requirement to simply open the file.

It's a neat solution for an indie project where most users will understand how it works and it's limitations, but for VideoReDo it would be a support nightmare.

As for the TS files... I think I figured out what's unique about them. However we need to make a change to our TS muxer to generate compatible files, and that's DanR's department, so it could be a few days before he can make the changes and I can test it out to see if it actually works.

Dan
__________________
Dan Haddix
Super Moderator
Developer for VideoReDo
Dan203 is offline   Reply With Quote
Old 02-03-2011, 07:15 PM   #30
lucas_nz
Registered User
 
Join Date: Sep 2010
Posts: 2
Quote:
Originally Posted by Dan203 View Post
As for the TS files... I think I figured out what's unique about them. However we need to make a change to our TS muxer to generate compatible files, and that's DanR's department, so it could be a few days before he can make the changes and I can test it out to see if it actually works.
I've been playing with creating mpeg-ts files with h264 video and encapsulating them in an unencrypted .TiVo file. This all works fine with files I download off the Tivo and decode. But haven't been able to remux a mp4 and successfully encapsulate it. Any pointers on the tivo mpeg-ts format or tools that I could use to remux and h264 mp4 into an mpeg-ts that the tivo will accept?

Cheers,

Luke
lucas_nz 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 03:00 PM.
OUR NETWORK: MyOpenRouter | TechLore | SansaCommunity | RoboCommunity | MediaSmart Home | Explore3DTV | Dijit Community | DVR Playground |