# mp4 and tivodecode?



## tomhorsley (Jul 22, 2010)

Just wondering: Anyone know if downloading programs and filtering the files through tivodecode will continue to work when the files are mpeg4, not mpeg2?


----------



## Dan203 (Apr 17, 2000)

No. The H.264 files will always be in the TS format, which is not compatible with tivodecode. There is a special build of tivodecode that sorta works with TS files, but it's got bugs that can introduce corruption into the video stream. Your best bet for decoding TS files cleanly is to install TiVo Desktop and then use something like DirectShow Dump or VideoReDo which taps into the TiVo supplied decoder filter which works perfectly with TS files. (Windows only)


----------



## tomhorsley (Jul 22, 2010)

Sigh. I was afraid of that. I suppose my other option might be to get really ambitious and tackle trying to get the bugs out of tivodecode for TS files (but I looked at it a bit once and didn't really want to go there .

I wonder if I could come up with a way to completely automate running TiVo Desktop and VideoReDo in a virtual machine? .

I guess I won't care till comcast starts sending out H.264 in the boca/delray area in Florida...


----------



## chrispitude (Apr 23, 2005)

Dan203 said:


> No. The H.264 files will always be in the TS format, which is not compatible with tivodecode. There is a special build of tivodecode that sorta works with TS files, but it's got bugs that can introduce corruption into the video stream. Your best bet for decoding TS files cleanly is to install TiVo Desktop and then use something like DirectShow Dump or VideoReDo which taps into the TiVo supplied decoder filter which works perfectly with TS files. (Windows only)


Are you referring to tivodecode 0.4pre4? Or, there this also this recent effort to better handle TS files:

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


----------



## wmcbrine (Aug 2, 2003)

tivodecode-ng incorporates all the attempted fixes previously published. It works on TS files, much of the time. Just not enough for me to feel like I should announce it yet.  But, AFAIK, there's no reason to use any other version of tivodecode. Also, tivodecode-ng is noticeably faster, due to better buffering (my one real contribution, so far).

I've managed (at least with one sample recording) to narrow down the source of glitchy TS packets to an off-by-one error -- i.e., the byte stream being XORed with the data, in these (and only these) packets, starts one position off from where it does with DirectShow Dump. But what's causing that, I haven't got yet. I'm not convinced the error is actually on the tivodecode side.


----------



## tomhorsley (Jul 22, 2010)

Neat! I just tried tivodecode-ng on a TS file I downloaded (tonight's new mythbusters), and it actually seems to have worked. I never got anything that mplayer would recognize as video with the 0.4pre4 version, so this looks like a definite improvement. Thanks!

P.S. It is also faster because downloading a TS stream runs at a much higher bit rate since the tivo isn't cpu bound converting it to PS format.


----------



## wmcbrine (Aug 2, 2003)

Make sure you watch the decoded video before you decide that it worked.


----------



## dhester (Nov 8, 2015)

I know that Comcast is converting to mpeg4 for HD in the Atlanta area, where I live. This is why I upgraded from a TiVo HD to a Roamio. Just recently, transfers off of my Roamio started to break. I get a very small file, something like 45MB for a 1/2hr show. Sometimes when I try to play it with vlc, I get audio only. Since I can still get standard def shows off of the same TiVo, I am speculating that those HD channels are now mpeg4. Also, if I try to transfer the shows (the PS file) directly off the TiVo with the HTTPS interface, the same thing happens. If I understand correctly, the TS stream is what the TiVo actually recorded and the PS stream is generated by the TiVo upon request. It seem that the TiVo doesn't handle the mpeg4 to PS well.

Wmcbrine, thanks for all the hard work. I used to use your branch of pytivo until I set up my Plex server. I had not run across your upgrade to tivodecode yet, so I am glad I found this thread. I'll be testing out tivodecode-ng as it seems it may be the only way for me to get my shows off my TiVo for now. Initial test looks good. I manually downloaded the TS file and tivodecode-ng made a valid video.


----------



## Dan203 (Apr 17, 2000)

You can't download H.264 as PS at all. Only TS. Your best bet for decrypting those is to install TiVo Desktop and then use DirectShow Dump or VideoReDo to do the decryption. (both use the decryption filter included with TiVo Desktop)


----------



## moyekj (Jan 24, 2006)

tivolibre works great to decrypt either TS or PS TiVo downloads - no need for Windows only solution of TiVo Desktop and DirectShow. tivodecode-ng may work for some TS downloads but still has issues (which you may not catch until you watch) that tivolibre has addressed. Also, tivolibre is integrated/available in kmttg or the author's own TTG new tool, Archivo.


----------



## Diana Collins (Aug 21, 2002)

I had always used VRD to decode both MPEG2 and MPEG4 videos. However, just a couple of days ago I had problem with a recording of "Blue Velvet" from Sony Movie Channel (which is MPEG4 on Verizon). When I used VRD to decrypt the film I got an "out of memory" error after a few seconds when trying to save the edited version in VRD. I then decrypted with tivolibre instead and was able to save the edited file without an error.


----------



## ej42137 (Feb 16, 2014)

Diana Collins said:


> I had always used VRD to decode both MPEG2 and MPEG4 videos. However, just a couple of days ago I had problem with a recording of "Blue Velvet" from Sony Movie Channel (which is MPEG4 on Verizon). When I used VRD to decrypt the film I got an "out of memory" error after a few seconds when trying to save the edited version in VRD. I then decrypted with tivolibre instead and was able to save the edited file without an error.


Did you report it? In my experience they are very responsive fixing errors if they hear about them.


----------



## lew (Mar 12, 2002)

I'd like to download a compiled windows binary Tivodecode -ng. Can anyone help. I searched tvg and used Google to search web.

.
I made the mistake of saving videos as TiVo to files on my pc. I eat to see if I can use pytivo to download to Tivodecode. Obviously not an issue with roamio.

I can use VRD to change video. Trying to see if I can skip that step


----------



## HerronScott (Jan 1, 2002)

lew said:


> I'd like to download a compiled windows binary Tivodecode -ng. Can anyone help. I searched tvg and used Google to search web.
> 
> .
> I made the mistake of saving videos as TiVo to files on my pc. I eat to see if I can use pytivo to download to Tivodecode. Obviously not an issue with roamio.
> ...


You probably want to use tivolibre instead.

http://www.tivocommunity.com/tivo-vb/showthread.php?t=531700

The author seems to have fixed the issues with decoding some shows that tivocode-ng had.

Scott


----------



## lew (Mar 12, 2002)

HerronScott said:


> You probably want to use tivolibre instead.
> 
> http://www.tivocommunity.com/tivo-vb/showthread.php?t=531700
> 
> ...


I'm looking for tivodecode -ng for a specific reason. Unless there is an easy way to use tivolibre with pytivo instead if tivodecode.


----------



## HerronScott (Jan 1, 2002)

lew said:


> I'm looking for tivodecode -ng for a specific reason. Unless there is an easy way to use tivolibre with pytivo instead if tivodecode.


It sounded like you had a number of shows downloaded in .TiVo format that you wanted to decode without manually doing each in VideoRedo. I figured you could easily script doing that with Tivo-Libre.

java -jar tivo-libre.jar -i input.TiVo -o output.mpg -m 0123456789

I wasn't sure what you meant by using pytivo to download to Tivodecode.

Scott


----------



## lew (Mar 12, 2002)

I know several different ways of solving the issue.

I'd like to find out if putting the ng version of tivodecode in the bin folder in my pytivo Directory will let me download to a tivo HD. 

Do you know where I can download a windows version of the file?

You're right. It might be a waste of time. I might wind up changing the video files.


----------



## wmcbrine (Aug 2, 2003)

tivodecode-ng will compile with MinGW now. Although I'm not quite satisfied with it yet, it is better than tivodecode 0.2pre4 that everyone uses, so I should probably get around to knocking up a real 0.1 release (which would include Windows binaries). Maybe this year. 

Meanwhile, anyone else who wants to build it, feel free...


----------



## moyekj (Jan 24, 2006)

Another possibility is for pyTivo to just include support for using tivolibre in place of tivodecode as an option - after all it's a 3rd party app just like tivodecode with the advantage that it seems to have fixed most of the known issues with tivodecode.

In fact, if one wanted to it wouldn't be too hard to just make a wrapper script around tivolibre such that it launches exactly same way as tivodecode, and then you just use the wrapper script in place of the real tivodecode. With that workaround no changes to pyTivo necessary.


----------



## ADent (Jan 7, 2000)

Finally got around to installing tivodecode-ng. It was super hard on my mac (not really - had to type some commands though).

TiVo-Libre is dumping pieces of files it can not decode cleanly - about 20 second in the one file I am testing.
Tivodecode-ng just had about 1/2 sec of blocking and sound cutout and kept on playing.

Thanx for working on TiVoDecode-ng.


----------

