Separate names with a comma.
Discussion in 'Developers Corner' started by fflewddur, Sep 6, 2015.
I sent a PM to fflewddur with your MAK.
i have kmttg and just got the latest tivolibre jar how do i install the jar so i can use it with kmttg?
TivoLibre is already included in the kmttg.jar, you don't need to download it separately.
does updating the tools and kmttg get the latest jar from https://github.com/fflewddur/tivolibre/releases ?
I just wanted to share that DSD works like a champ for me, gremlin free. Just curious, why isn't everybody using it? Does tivolibre or tivodecode fit some other circumspect better?
Sent from my SM-N900V using Tapatalk
From the kmttg page on descrypting TS TiVo files:
Windows users have option of using DirectShow Dump (DSD) program for decrypting .TiVo files instead of using tivodecode. The advantage of DSD is that it works with both PS and TS .TiVo files. The disadvantages are:
Only runs on Windows platform
Requires at least a partial install of TiVo Desktop, which is achieved by first fully installing TiVo Desktop and then uninstalling and choosing option to keep partial install.
This probably should be updated to include tivolibre as an option.
then it is necessary to use the tivolibre jar and to add a way to use it in future version.
kmttg has regular updates, so any necessary tivolibre updates will be incorporated quickly, so no need.
ok is there source so i can make updates my self and what do i need to write and compile?
Just wanted to give a status update: I found the problem and think I've got it fixed, but I'm going to let it run through my entire test set before releasing. Hopefully I'll have the fix posted tomorrow night
http://workupload.com/file/FlvfmPxo sample of improper decrypt of ts format tivo files
fflewddur check your pm i sent the mak for you to check
Got it, thanks for sending the file! I found the problem and am working on a fix...
Wow that was fast (in both cases)!
Yes, great work in quickly finding fixes to remaining issues Todd! We appreciate your work.
Thanks, it's my pleasure! I'm going to let my test script run overnight, and if everything looks good, should have a release that fixes both of these issues out tomorrow after work.
I'm curious what you found in each case?
Both issues were related to problems with how TivoLibre handles PES headers. Each TS packet begins with a series of PES headers which should not be decrypted, even if the TS packet itself says that it's encrypted. Sometimes these are split across multiple TS packets, so I had code that looked at the last PES header in each packet and calculated how far into the next packet it would extend, so decryption wouldn't start too soon (based on the structure of its output files, this seems to be the same thing TiVo Desktop does; tivodecode tries to concat all of the TS packets together, so it shouldn't have this issue, although it means tivodecode creates output files that aren't binary identical to TiVo Desktop. That makes it much harder to test whether tivodecode's output is correct, since a simple diff against the output of the same file run through TiVo Desktop will find differences in TS packet order).
Anyway, turns out there were a pair of PES header edge cases that never occurred in my test collection (so thanks for the bug reports!): 1) the PES header's start code can end in one packet but with the rest of the header in the next packet, or 2) the PES header's prefix (23 bits of 0 followed by a 1 bit) can be split across two TS packets. TivoLibre was treating both of these cases as if the PES headers had ended in the first packet, so if the next packet was encrypted, it would start decrypting it at the start of the TS packet, instead of skipping over the PES headers and starting decryption once they ended. Because TiVo files use a stream cypher, beginning the decryption even one byte too soon means that every byte after that point will be incorrectly decoded. TiVo files only encrypt a small percentage of their total packets, hence the largely normal video with blocks of pixelation: those pixelation artifacts were the improperly decrypted packets.
Tonight's release (0.7.3, available at https://github.com/fflewddur/tivolibre/releases) fixes both of these issues