# [ANN] DeVo: A new TiVo file decryptor



## bobziuchkovski (Feb 4, 2016)

Hi All,

I wanted to announce DeVo, a new TiVo file decryptor. It supports both mpeg-ts and mpeg-ps formats. It started several months ago when I set out to patch tivodecode to fix some parsing errors I was encountering. I spent a couple days patching and refactoring, and then decided to write something fresh in Go.

I've been using it without issue for several months. Basically, "it works for me", and seems to decrypt with fewer problems than tivodecode, but that's all anecdotal. However, I want to explicitly send a HUGE thanks to all the tivodecode contributors. There's no way I could have written DeVo without the work they put into documenting the encrypted TiVo file format!

Anyway, DeVo is available for download from github.com/bobziuchkovski/devo -- there are precompiled binaries available for all supported Go 1.5.x platforms (Windows, Linux, Mac, FreeBSD, etc.).

Let me know if you guys have any questions or comments on the tool. Thanks!

- Bob

P.S. The forums won't let me post links (less than 5 posts on my account), so maybe someone else can post a direct link to the project.


----------



## wmcbrine (Aug 2, 2003)

http://github.com/bobziuchkovski/devo

Even though you've moved on, the tivodecode-ng project would still welcome your patches. 

http://github.com/wmcbrine/tivodecode-ng


----------



## bobziuchkovski (Feb 4, 2016)

Thanks for the links. I'll see if I still have any of my patches locally. If I do, I'd be happy to rebase and submit to your fork!


----------



## moyekj (Jan 24, 2006)

Thanks for posting! The more solutions the better. For testing purposes did you test against the "golden" way of decrypting using TiVoDirectShow? Are files produced by your solution binary identical to DirectShow decrypted output? Just wondering because otherwise it's difficult to automate any kind of mass testing since it would require visual inspection of everything to see if there are issues.


----------



## bobziuchkovski (Feb 4, 2016)

I didn't test that, but it's a great idea. To be honest, I haven't really touched to DeVo code in several months. It's been working well enough to decrypt all of my recordings daily without any failures/crashes and without any noticeable artifacts.

That's not to say it's perfect. I wouldn't be surprised if there are some packets that aren't processed correctly. However, since I can't discern any differences, I turned my attention to other projects. 

My main intention in posting the code was to provide another alternative that might be easier to consume and maintain. The DeVo tool itself is around 1k lines of code, which is pretty compact. I've also setup travis-ci to cross-compile binaries for every supported Go platform, so it might be easier to bundle with third-party tools: github.com/bobziuchkovski/devo/releases


----------



## moyekj (Jan 24, 2006)

I've tried both linux and windows pre-compiled binaries but I keep getting this error on both platforms attempting to decrypt 2 different sample mpeg2 TS TiVo files:
"Error: devo: error parsing metadata: EOF"


----------



## bobziuchkovski (Feb 4, 2016)

Interesting...I'm definitely interested in fixing any bugs. I wonder if it's a region/provider issue. Do you mind sharing your country and TV provider? Also, feel free to open a GitHub issue for the project if you'd prefer to troubleshoot there instead. Either is fine by me. Finally, do you mind testing an mpeg-ps file as well for a control? That would help to identify whether it has to do with parsing the tivo metadata, or the mpeg-ts stream itself.


----------



## moyekj (Jan 24, 2006)

I'm in Orange County, CA with Cox as provider (though that shouldn't really matter).
From the error it sounds like a metadata parsing issue. PS .TiVo files are giving me the same error. Perhaps others reading this thread should try it out themselves to see if they get different result.
What TiVo model are your samples coming from? I tested using a Roamio Pro. Could be that the TiVo metadata differences for different TiVo models are the issue...


----------



## bobziuchkovski (Feb 4, 2016)

Thanks for the info. One other question -- what series TiVo DVR are you using? Hopefully some other folks can test out DeVo as well for some more feedback/data points, but in the meantime, I'll work on implementing logging for the util. I'm ashamed to admit I skimped on logging back when I thought I'd never release it.


----------



## moyekj (Jan 24, 2006)

As I mentioned in my post - a Roamio Pro. You didn't mention which TiVo models you tested downloads from?

I just tried a (truncated) PS TiVo downloaded from a Premiere and this time it got further, but I got an error probably because the download was interrupted:
Error: devo: error processing input at offset 0x03e2677c: failed while processing mpegps packet 8557: unexpected EOF

However it did output an .mpg file, so looks like for Premiere units it gets past metadata processing. However playing it back there was some obvious audio problems towards the beginning (OK after that) that were not present when decrypting with VRD or tivolibre.

So looks like there's issues with metadata parsing for at least Roamios (and likely Bolts) and some issues with decrypting the A/V packets too. If you want I can provide some samples that have issues, but at this point I've got plenty of other options for decrypting so not too bothered with pursuing further unless you really want to track down the issues.

I'll probably sit back for now and perhaps others that give this a shot can post their findings.


----------



## bobziuchkovski (Feb 4, 2016)

Yeah, if you don't mind sending some of the samples, that would be great. I'd hate to have known bugs sitting in the software, even if it's working fine for me personally. I'm using a Roamio on Comcast for my setup.


----------



## moyekj (Jan 24, 2006)

OK I sent you a PM with links to 2 samples with issues along with MAK.


----------



## wmcbrine (Aug 2, 2003)

So far I've tried it with one (1) short recording, in both PS and TS modes. The PS output was identical to tivodecode-ng and tivolibre, the TS differed (it was the same from the other two). I'm sorry to say the DeVo TS output was pretty glitchy (the others were fine). PM to follow.


----------



## bobziuchkovski (Feb 4, 2016)

Thank you both -very- much for the samples. I'll try to dissect those this weekend and patch. It sounds like tivodecode-ng and tivolibre have both become very solid. Kudos to everyone for their hard work on those projects!


----------



## wmcbrine (Aug 2, 2003)

Well I wish I could say -ng was solid. Not there yet.


----------



## bobziuchkovski (Feb 4, 2016)

It sure sounds like it's pretty solid, at least for the decoding! Btw, I looked through my source checkouts and I didn't see my tivodecode checkout, so I probably blew it away along with my patches...I cleaned-out a lot of unused git/svn clones a couple months back.

I looked through the git repo for tivodecode-ng, though, and I doubt anything I had would have applied cleanly anyway. It looks like you've done quite a bit of refactoring on the project. It honestly looks much improved over the original!


----------

