# Best Video Archiving Method for Tivos?



## larrs (May 2, 2005)

i have a new ToweRAID box I received for Christmas and 4 new 2GB Drives (my Wife is great!). I will now have roughly 6+ GB of RAID sorage for my media collection and will be moving everything from its current location to this setup.
I am looking at a strategy for putting many of my BDs and DVDs on this to be available on any of my Tivos (I now have 5). I have been converting my BDs to mp4 with only Dolby stereo in the past and have just copied the DVDs to a single VOB which plays fine on the tivos with 5-channel DD. My questions are:

What format should I use to give me better sound quality on the BDs (I use Tivo Desktop Plus but also have streambaby)? And, what is the best strategy for the DVDs? What is the best strategy for metadata, subtitles, etc...?

Please give me products to use as well as settings tips if you have any. Today I use DVDFab and VideoRedo.

Thanks


----------



## Dan203 (Apr 17, 2000)

We've discussed this before, but ripping DVDs/BDs for playback on a TiVo is not as easy as it sounds. The biggest problem is the subtitles. A lot of DVDs, and I assume BDs, use what are known as "forced subtitles" to display text when someone is speaking a foreign language. These subtitles are not burned into the video but actually separate tracks which your DVD player knows to overlay when necessary. The problem is that TiVo does not know how to read or display this subtitle track, so if you simply rip the VOBs and upload them to your TiVo you may miss out on dialog when someone is speaking a foreign language. The only way to avoid this is to use a program which recodes the entire movie and burns the forced subtitles right into the video stream. Unfortunately there aren't any simple tools I know of that can do that and produce a format that is TiVo compatible. Handbrake can do it for DVDs, but the MP4 files it produces will then need to be recoded on the fly by TiVo Desktop or pyTiVo for your TiVo to actually play them. So a double conversion will take place which might reduce quality. I don't think Handbrake does BluRay and I'm not sure if there is anything equivalent out there that does.

My advice would be to pick up some other media playback device which can understand the MKV format. There are several programs out there that can convert DVD/BD to MKV while retaining all the tracks, including the subtitles and even the menus. You just need to find a streaming player that understands how to read them.

Dan


----------



## Stormspace (Apr 13, 2004)

Dan203 said:


> We've discussed this before, but ripping DVDs/BDs for playback on a TiVo is not as easy as it sounds. The biggest problem is the subtitles. A lot of DVDs, and I assume BDs, use what are known as "forced subtitles" to display text when someone is speaking a foreign language. These subtitles are not burned into the video but actually separate tracks which your DVD player knows to overlay when necessary. The problem is that TiVo does not know how to read or display this subtitle track, so if you simply rip the VOBs and upload them to your TiVo you may miss out on dialog when someone is speaking a foreign language. The only way to avoid this is to use a program which recodes the entire movie and burns the forced subtitles right into the video stream. Unfortunately there aren't any simple tools I know of that can do that and produce a format that is TiVo compatible. Handbrake can do it for DVDs, but the MP4 files it produces will then need to be recoded on the fly by TiVo Desktop or pyTiVo for your TiVo to actually play them. So a double conversion will take place which might reduce quality. I don't think Handbrake does BluRay and I'm not sure if there is anything equivalent out there that does.
> 
> My advice would be to pick up some other media playback device which can understand the MKV format. There are several programs out there that can convert DVD/BD to MKV while retaining all the tracks, including the subtitles and even the menus. You just need to find a streaming player that understands how to read them.
> 
> Dan


I use Winx DVD ripper. When you rip the DVD it'll include the sub in the video stream if you leave the subtitle option enabled. I do have an issue ripping directly to Mpeg however(They won't play on the TiVo, DRM I think) so I rip them to AVI and then convert the AVI to mpeg using another application. Video quality is fine.


----------



## dlfl (Jul 6, 2006)

Dan203 said:


> ..........The only way to avoid this is to use a program which recodes the entire movie and burns the forced subtitles right into the video stream. Unfortunately there aren't any simple tools I know of that can do that and produce a format that is TiVo compatible. Handbrake can do it for DVDs, but the MP4 files it produces will then need to be recoded on the fly by TiVo Desktop or pyTiVo for your TiVo to actually play them.........


Are you sure Dan? I've pushed H.264 .mp4 files created by HandBrake to TiVo using pyTiVo's push capability, and I've streamed them using Stream Baby. Unless there's something about burning in the subtitles that makes the file incompatible -- I haven't done that.

I think when pyTiVo pushes an mpeg4 it ends up getting transcoded back to mpeg2 by the TiVo for storage and playback on the TiVo -- thus suffering the double-transcoding. However I believe when you stream with Stream Baby the TiVo is decoding the mpeg4 directly to video.


----------



## Dan203 (Apr 17, 2000)

dlfl said:


> Are you sure Dan? I've pushed H.264 .mp4 files created by HandBrake to TiVo using pyTiVo's push capability, and I've streamed them using Stream Baby. Unless there's something about burning in the subtitles that makes the file incompatible -- I haven't done that.
> 
> I think when pyTiVo pushes an mpeg4 it ends up getting transcoded back to mpeg2 by the TiVo for storage and playback on the TiVo -- thus suffering the double-transcoding. However I believe when you stream with Stream Baby the TiVo is decoding the mpeg4 directly to video.


You can push an H.264 MP4 to an HD TiVo without recoding. However that's not really a convenient way to do it. Most people will want to pull the program from the server to the TiVo, in which case it will always be recoded.

Dan


----------



## wmcbrine (Aug 2, 2003)

dlfl said:


> I think when pyTiVo pushes an mpeg4 it ends up getting transcoded back to mpeg2 by the TiVo for storage and playback on the TiVo -- thus suffering the double-transcoding.


No.


----------



## ajayabb (Jan 12, 2007)

Dan203 said:


> You can push an H.264 MP4 to an HD TiVo without recoding. However that's not really a convenient way to do it. Most people will want to pull the program from the server to the TiVo, in which case it will always be recoded.
> 
> Dan


You can always stream/"pull" h.264 natively with Streambaby without having to get off the couch to the Tivo


----------



## jcthorne (Jan 28, 2002)

So to sum up, its actually very easy to transfer a DVD/BR to a server and have it available for the tivo. We do not own a DVD or BR drive other than the ones in our laptops. ALL video is presented by the Tivo.

My workflow is DVDFAB - MeGUI - pytivo. I only deal with subtitles once in a blue moon though and then I have MeGUI encode them into the video. This effects very few titles.

You are building mp4 files with .h264 video and ac3 5.1 DD audio. Use full resolution of the source, let x264 handle the bitrate with a crf of about 19 for HD.


----------



## larrs (May 2, 2005)

jcthorne said:


> So to sum up, its actually very easy to transfer a DVD/BR to a server and have it available for the tivo. We do not own a DVD or BR drive other than the ones in our laptops. ALL video is presented by the Tivo.
> 
> My workflow is DVDFAB - MeGUI - pytivo. I only deal with subtitles once in a blue moon though and then I have MeGUI encode them into the video. This effects very few titles.
> 
> You are building mp4 files with .h264 video and ac3 5.1 DD audio. Use full resolution of the source, let x264 handle the bitrate with a crf of about 19 for HD.


What are the profile and settings you use in DVDFab? I have been using it, but I have to then put the video through VideoRedo and change the framerate to "standard definition" to keep it from being jerky when played back. I have also had heck getting the 5.1 audio to work properly on a BD source- which audio setting do you use?

I will look into MeGUI as well, but I use stream baby rather than pyTivo.


----------



## txporter (Sep 18, 2006)

dlfl said:


> Are you sure Dan? I've pushed H.264 .mp4 files created by HandBrake to TiVo using pyTiVo's push capability, and I've streamed them using Stream Baby. Unless there's something about burning in the subtitles that makes the file incompatible -- I haven't done that.
> 
> I think when pyTiVo pushes an mpeg4 it ends up getting transcoded back to mpeg2 by the TiVo for storage and playback on the TiVo -- thus suffering the double-transcoding. However I believe when you stream with Stream Baby the TiVo is decoding the mpeg4 directly to video.





wmcbrine said:


> No.


This sort of depends on what you mean by mpeg4 exactly. Since you specifically wrote H.264 .mp4 files above and then spoke of mpeg4, I assumed that you were speaking of Stormspace's use of AVI/mpeg4 files. If that is the case, then yes, they will be transcoded. The H.264/.mp4 files from Handbrake (with or without hardcoded subtitles) will push fine through pyTivo's push interface (no transcoding, stored as h.264 on tivo).

Using Handbrake to convert and burn-in subtitles for DVDs (as mentioned above) is probably the easiest way to get files that you can store on your raid server for serving up to your Tivo (through pytivo push or Streambaby). I use avisynth/x264 batch files which accomplish much the same thing as jcthorne's workflow. They are not as easy to learn as Handbrake, but allow more control of the output files. I have no experience with blu-ray conversion, so I can't really comment on that.


----------



## txporter (Sep 18, 2006)

larrs said:


> What are the profile and settings you use in DVDFab? I have been using it, but I have to then put the video through VideoRedo and change the framerate to "standard definition" to keep it from being jerky when played back. I have also had heck getting the 5.1 audio to work properly on a BD source- which audio setting do you use?
> 
> I will look into MeGUI as well, but I use stream baby rather than pyTivo.


jcthorne is most likely just using DVDfab to rip the files to his hard drive. He is using MeGUI to convert to H.264/.mp4 files. I am not sure exactly what you are doing to the file when you say you are changing the framerate to "standard definition". If VRD is finishing its task in just a few mins rather than 1+ hrs, then likely it is just running quickstream fix which is helping with the playback.


----------



## larrs (May 2, 2005)

txporter said:


> jcthorne is most likely just using DVDfab to rip the files to his hard drive. He is using MeGUI to convert to H.264/.mp4 files. I am not sure exactly what you are doing to the file when you say you are changing the framerate to "standard definition". If VRD is finishing its task in just a few mins rather than 1+ hrs, then likely it is just running quickstream fix which is helping with the playback.


In VRD, I do "save as" and the only option I choose is "Framerate- standard definition".

It finishes in about5 minutes, but the result plays without dropping frames on the Tivos. If I don't do this, it drops frames like crazy.


----------



## Dan203 (Apr 17, 2000)

larrs said:


> In VRD, I do "save as" and the only option I choose is "Framerate- standard definition".
> 
> It finishes in about5 minutes, but the result plays without dropping frames on the Tivos. If I don't do this, it drops frames like crazy.


I hate to break it to you but this setting has absolutely no effect unless the video is recoded. And if it's only taking 5 minutes to output then it's not being recoded.

The fix you're seeing is most likely coming from the remuxing VRD does which corrects bad timecodes.

Dan


----------



## PaJo (Dec 17, 2001)

So far, I have not needed to process any file prior to using Handbrake and both the .m4v and .mkv files worked well on our HD Tivo. The only thing I do is use DVDFAB ripper with VOB pass through then select the finished folder containing the .vob,.idx,.sub files as the source for Handbrake. I use the default h.264 settings with two exceptions, I use a constant quality rate of 18 and in the audio section I pick AC3 pass through. Handbrake does have the option to burn in sub titles with the .mkv files , but I never tried that. It seems the subtitles do better with with the .mkv than the .m4v files but neither type file will display the subtitles with our HD Tivo. The .mkv subtitles do work with our Asus O'Play. The only sync problems I ever had was using Streambaby and having the file on the Asus external hard drive, but using pyTivo to transfer the same file from the Asus worked well. My guess was going from the Asus to my pc to the HD Tivo had a negative affect on the audio sync using Streambaby.

If you try Handbrake (it's free) just select seconds rather than chapters and encode a 5 minute video to test your setup, once you are sure it's OK for you add your movies to the queue and wait for them to be encoded. If you really need the forced subtitles , just use the .vob files.


----------



## larrs (May 2, 2005)

Dan203 said:


> I hate to break it to you but this setting has absolutely no effect unless the video is recoded. And if it's only taking 5 minutes to output then it's not being recoded.
> 
> The fix you're seeing is most likely coming from the remuxing VRD does which corrects bad timecodes.
> 
> Dan


I actually knew that, sort of. Checking the file with MediaInfo reports no framerate change. However, it is not exactly the same either. I will try to post the difference, when I get a chance to look at a file before and after. VRD does report that it removes some frames each time.

And, BTW this is only on HD titles, not SD (DVD).


----------



## Dan203 (Apr 17, 2000)

Even though the setting is called "SD" what it really means is that if the frame rate is >30fps then it will be cut in 1/2. This really only applies to 1080p or 720p video and 1080i is already 29.97fps.

Dan


----------



## larrs (May 2, 2005)

So, I now have TDT plus and streambaby. It seems streambaby works great, but has an issue with 2.35 AR when done at 720P which is what I had been doing all of my HD content at (interestingly enoughm, probably only to speed up teh tivo transfers with TDT). 

I really may look into a WD extender or something else although I wanted as few pieces of equipment as possible...


----------



## dlfl (Jul 6, 2006)

larrs,

How does it happen all your HD is 2.35 AR ? Or are you deliberately cropping lower aspect videos (e.g., 16:9) to get 2.35 (thus losing video content)?

If this is your only reason for consdiering additional hardware, I would consider just including the (black) letterbox regions and produce a 1280x720 video (which will work fine with Stream Baby). The black regions should encode very efficiently and thus won't add much to either encoded file size or encoding time (for the same PQ). For some discussion on this go ***here***. Scroll down and read "Why picture quality suffers", which seems to contradict what I'm saying. But then read the first item in the "Comments" section and the response to it.


----------



## orangeboy (Apr 19, 2004)

dlfl said:


> larrs,
> 
> How does it happen all your HD is 2.35 AR ? Or are you deliberately cropping lower aspect videos (e.g., 16:9) to get 2.35 (thus losing video content)?
> 
> If this is your only reason for consdiering additional hardware, I would consider just including the (black) letterbox regions and produce a 1280x720 video (which will work fine with Stream Baby). The black regions should encode very efficiently and thus won't add much to either encoded file size or encoding time (for the same PQ). For some discussion on this go ***here***. Scroll down and read "Why picture quality suffers", which seems to contradict what I'm saying. But then read the first item in the "Comments" section and the response to it.


Tip for viewing that linked site: use <ctrl>-a (select all) to raise the contrast of the text on the black background. I'm not a fan of black backgrounds that contain text :down:


----------



## txporter (Sep 18, 2006)

dlfl said:


> larrs,
> 
> How does it happen all your HD is 2.35 AR ? Or are you deliberately cropping lower aspect videos (e.g., 16:9) to get 2.35 (thus losing video content)?
> 
> If this is your only reason for consdiering additional hardware, I would consider just including the (black) letterbox regions and produce a 1280x720 video (which will work fine with Stream Baby). The black regions should encode very efficiently and thus won't add much to either encoded file size or encoding time (for the same PQ). For some discussion on this go ***here***. Scroll down and read "Why picture quality suffers", which seems to contradict what I'm saying. But then read the first item in the "Comments" section and the response to it.


Yes, this is an issue on TivoHD with cropped 720p video. jcthorne has written about it here and on the pytivo forum in the past. It is not a problem on Tivo Premiere (cropped 720p video are handled correctly). Here is a discussion that jcthorne and I had on pytivo forums. The videos that showed problems were only those that he downloaded from torrents. I could not reproduce the AR display problem with files I created myself with avisynth/x264.


----------



## larrs (May 2, 2005)

txporter said:


> Yes, this is an issue on TivoHD with cropped 720p video. jcthorne has written about it here and on the pytivo forum in the past. It is not a problem on Tivo Premiere (cropped 720p video are handled correctly). Here is a discussion that jcthorne and I had on pytivo forums. The videos that showed problems were only those that he downloaded from torrents. I could not reproduce the AR display problem with files I created myself with avisynth/x264.


Actually, my videos are 1280X544, etc. and when pushed to the Tivo Premiere with streambaby, I am gettting it "stretched" to full frame 1280X720. I may not be doing something right in the reencode to .mp4. If I pull it using TDT+, it displays correctly.

I also noticed I got the same behavior on a DVD clip I used for testing as well...let me play a little.

Also, what do you do for 5.1 audio in your h264 files?


----------



## dlfl (Jul 6, 2006)

larrs said:


> Actually, my videos are 1280X544, etc. and when pushed to the Tivo Premiere with streambaby, I am gettting it "stretched" to full frame 1280X720. I may not be doing something right in the reencode to .mp4. If I pull it using TDT+, it displays correctly.
> 
> I also noticed I got the same behavior on a DVD clip I used for testing as well...let me play a little.
> 
> Also, what do you do for 5.1 audio in your h264 files?


I'm confused about exactly what you're doing at this point. (Re-reading the thread didn't help.)

First just a minor terminology correction: You don't "push" with streambaby. You either "pull" or "stream". "Stream" is most accurate but it's a pull because you initiate it from your TiVo.

What kind of file are you streaming with Stream Baby? And how is it generated? Are you able to stream it as is, or is it re-encoding? If it's re-encoding that may be why the AR is getting screwed up -- you really want to stream without re-encoding for quality and network-thruput reasons anyway.

When you pull it with TDT+, what kind of file is it? TiVo, Mpeg2 or H.264 .mp4?

Sorry can't help you on the 5.1 audio, but others here can.


----------



## larrs (May 2, 2005)

dlfl said:


> I'm confused about exactly what you're doing at this point. (Re-reading the thread didn't help.)
> 
> First just a minor terminology correction: You don't "push" with streambaby. You either "pull" or "stream". "Stream" is most accurate but it's a pull because you initiate it from your TiVo.
> 
> ...


Correct, I am "streaming" the files.

The files are .m2ts files converted to h.264 mp4 files. They are usually 1920X1080 that I have reencoded to 1280X?? to preserve the aspect ratio (on a 2.35 AR movie, that usually is 544 or 596, etc.). When these are played back on my tivo premiere using streambaby, they no longer have the appropriate black bars above and below the picture, but are stretched to fill the 16X9 screen. However, using Tivo Desktop Plus, they play fine.

I guess I am being told higher in the thread to force 1280X720 and make the encoder "produce" the black bars for the full 16X9 area and that will fix it- hopefully for both methods of watching on the tivo. I am playing with a video right now with handbrake (which I haven't used before) and I will see.

Someone really needs to write a wiki about this...


----------



## txporter (Sep 18, 2006)

larrs said:


> Correct, I am "streaming" the files.
> 
> The files are .m2ts files converted to h.264 mp4 files. They are usually 1920X1080 that I have reencoded to 1280X?? to preserve the aspect ratio (on a 2.35 AR movie, that usually is 544 or 596, etc.). When these are played back on my tivo premiere using streambaby, they no longer have the appropriate black bars above and below the picture, but are stretched to fill the 16X9 screen. However, using Tivo Desktop Plus, they play fine.
> 
> ...


If you take a blu-ray source (1920x1080) and transcode it to 1280x720 without cropping anything, it will preserve the aspect ratio. That is what you are being asked to try above. You don't need to produce the black bar, they are already there in the source video. You will need to go into Handbrake and turn off the autocropping.

I am sort of surprised to hear that you are getting this stretching on the Premiere. When pushing the video with pytivo, I didn't see that. I am surprised that it would be any different with streambaby. And the reason that it works with a pull is that MPEG2 video do not have these display issues with non-full frame 720p video. When you pull any video that is not already MPEG2, it will be transcoded to MPEG2.

Perhaps you can commiserate with jcthorne.  He has been dealing with these issues for quite some time. I guess there aren't that many users that are transcoding blu-ray material for Tivo playback AND dealing with non-full frame 720p transcodes of said blu-ray material.


----------



## txporter (Sep 18, 2006)

larrs said:


> Also, what do you do for 5.1 audio in your h264 files?


Not sure what you are asking. For DVD source material, I just mux the AC3 5.1 audio file in with the h.264 video. I know that some work needs to happen with blu-ray files for audio, but I honestly haven't dealt with them to tell you what needs to happen.


----------



## reneg (Jun 19, 2002)

dlfl said:


> ... You don't "push" with streambaby. You either "pull" or "stream". "Stream" is most accurate but it's a pull because you initiate it from your TiVo.


I think this is technically a "push" via http://code.google.com/p/streambaby/wiki/PushConfiguration. It's initiated through Streambaby on the Tivo, but I can push a video to any one of my Tivos.


----------



## dlfl (Jul 6, 2006)

reneg said:


> I think this is technically a "push" via http://code.google.com/p/streambaby/wiki/PushConfiguration. It's initiated through Streambaby on the Tivo, but I can push a video to any one of my Tivos.


Interesting, I wasn't aware Stream Baby had this push option in addition to its original streaming (by a pull) function.

Actually I remember discussion of a push feature that required a running pyTiVo installation and the screen shot in the Stream Baby doc pages (**here**) shows it as "PyTivo Push".

So is it built into Stream Baby now, or does it still require pyTiVo?


----------



## moyekj (Jan 24, 2006)

dlfl said:


> Interesting, I wasn't aware Stream Baby had this push option in addition to its original streaming (by a pull) function.
> 
> Actually I remember discussion of a push feature that required a running pyTiVo installation and the screen shot in the Stream Baby doc pages (**here**) shows it as "PyTivo Push".
> 
> So is it built into Stream Baby now, or does it still require pyTiVo?


It's built in. I translated pyTivo's mind.py (which is what communicates with mind.tivo.com to queue up a push) to Java equivalent and then Keary integrated the push capability.


----------



## dlfl (Jul 6, 2006)

larrs,

At least based on my experience, be sure to include the "-O" (Optimize for streaming) option when you run HandBrake to generate .mp4's for TiVo push or streaming. They didn't play if I didn't do this. VideoReDo seems to automatically perform that optimization on its output files.


----------



## moyekj (Jan 24, 2006)

dlfl said:


> larrs,
> 
> At least based on my experience, be sure to include the "-O" (Optimize for streaming) option when you run HandBrake to generate .mp4's for TiVo push or streaming. They didn't play if I didn't do this. VideoReDo seems to automatically perform that optimization on its output files.


 Problem with using -O option is that apparently it kills iPhone/iPod compatibility. Both pyTivo push and streambaby push will automatically move the moov atom to the front of the mp4 file if needed, so the -O option is not really needed for TiVo pushes.**

** pyTivo I believe still has an issue doing this for large mp4 files (> 4GB)


----------



## dlfl (Jul 6, 2006)

moyekj said:


> Problem with using -O option is that apparently it kills iPhone/iPod compatibility. Both pyTivo push and streambaby push will automatically move the moov atom to the front of the mp4 file if needed, so the -O option is not really needed for TiVo pushes.**
> 
> ** pyTivo I believe still has an issue doing this for large mp4 files (> 4GB)


**Here** is the pyTivo forum thread on my experience which was a while back (March 2010).

The problem requiring -O occurred only for pyTiVo push -- not for Stream Baby, and the files were small test files (so no large file issues). In that thread it was stated that pyTiVo should have been running qt-faststart and the debug info indicated it did -- but the files still didn't play when pushed unless they were encoded with the -O option. Anyway, old data and maybe just a fluke. 

A somewhat related thing I discovered recently is if you use mp4v2 library code to add metadata tags to a .mp4, it leaves the file in an un-streamable state. You have to optimize for streaming using the function for that purpose in mp4v2, which copies the file in the process. Atomic Parsely on the other hand leaves the files in optimized order. MetaX for windows is based on mp4v2 and it doesn't do the optimization. The files will play fine in a PC player but will not play when streamed with Stream Baby. There might be exceptions to this depending on the original order of the file and what tags are added with MetaX.


----------



## moyekj (Jan 24, 2006)

Yeah, the mp4 container is a real pain in the a** for header information. mpeg2 transport stream container would be a better/easier format to deal with but I don't think it's been figured out how to push H.264 + AC3 in mpeg2 TS container natively to TiVos (if even possible). There was some talk about making unencrypted TS .TiVo for Premiere units with H.264 + AC3 and I think even wmcbrine may have done proof of concept of that with mpeg2 video but I don't think there has been any more progress/investigation on that front.


----------



## larrs (May 2, 2005)

txporter said:


> Not sure what you are asking. For DVD source material, I just mux the AC3 5.1 audio file in with the h.264 video. I know that some work needs to happen with blu-ray files for audio, but I honestly haven't dealt with them to tell you what needs to happen.


That;s pretty much it. I know that the tivo can't use 5.1 AAC, so I wanted to know what kind of audio you were doing. Are you using 448kb/48?


----------



## wmcbrine (Aug 2, 2003)

moyekj said:


> There was some talk about making unencrypted TS .TiVo for Premiere units with H.264 + AC3 and I think even wmcbrine may have done proof of concept of that with mpeg2 video but I don't think there has been any more progress/investigation on that front.


Actually what I did was only fake .TiVo files with program streams; I haven't been able to get the TiVo to accept TS, and I recently received some very disappointing news on that front. I can only hope that he's wrong... I haven't had time to check it myself yet.

Once again, it seems I'm being punished for saying "I know how to do it", when in fact I only knew the obvious way to do it that _should've_ worked, but didn't.


----------



## moyekj (Jan 24, 2006)

So if I read that right even TiVo Desktop can't push back TS .TiVo files natively? That's not encouraging... Would be nice to look at a recent copy of Premiere "tivoapp" but hacking on Premiere units seems to be even more challenging than for Series 3.


----------



## larrs (May 2, 2005)

OK, so I have fixed the issues I had with DVDFab. First, correctly as suggested above, changing the aspect from 1280X5xx to 1280X720 corrected the stretched nature within streambaby and also works properly with Tivo Desktop Plus for transfers (this is important to me because I can never tell if my wife "gets" a new program and she does know how to use Tivo Desktop since the folders are right there in the Now Playing List.
An additional win: I found the default in DVDFab turns deinterlacing "on" which is what was causing the jerkiness I was seeing in the videos before running them through VideoRedo, by turning that off, the video plays fine. So, all is good except that DVDFab's mp4 program will only do AAC audio, which means I am stuck with Stereo DPLII if I go with that.

So, I tried handbrake and got an m4v file with full 5.1 DD passthough, but I am still getting the stretched nature on the video. I used 1280X720, Anamorphic- none, Crop- Auto. Filters are all off. Video is h.264 and framerate is same as source. I set the target size to 2500.

I certainly would like to keep the 5.1 audio, so if someone can share what is wrong with the above settings, I would prefer to use handbrake.


----------



## dlfl (Jul 6, 2006)

I think the auto crop in HB is your culprit. Turn it off.


----------



## larrs (May 2, 2005)

dlfl said:


> I think the auto crop in HB is your culprit. Turn it off.


Yep, that did it. I was a little thrown off in that the choices are only "on" and "custom", there is no "off". However I did change to custom and setting of "0" cropping on all sides and all is well. So, Handbrake it is. I can say that it works perfectly on 1080P, 720P and 480i material and with 5.1 audio as well as working with streaming and pulling via Tivo Desktop.

I finally have my answer...it seems.


----------



## dlfl (Jul 6, 2006)

larrs said:


> .......I finally have my answer...it seems.


 Whew! It's been a long haul but we've laughed, we've cried, and we learned!

I'm curioius what version of HB you're using. Latest official release, or what? GUI or command-line ? I see they just made a new official release: 9.5.

Also, did you need to use the "-0" option or not?


----------



## larrs (May 2, 2005)

dlfl said:


> Whew! It's been a long haul but we've laughed, we've cried, and we learned!
> 
> I'm curioius what version of HB you're using. Latest official release, or what? GUI or command-line ? I see they just made a new official release: 9.5.
> 
> Also, did you need to use the "-0" option or not?


I am using the latest GUI. I did not do anything with the -0 option as I am not really sure where that option would be in the GUI version. I can say it works like a charm. Now, all that is left is to determine the proper encoding parameters to keep video quality as high as possible while keeping space to a minimum. Once I am in the correct ballpark there, I have a ton videos (at least) to encode, so my pc will be very busy.


----------



## fyodor (Sep 19, 2006)

While we're here, I was wondering if anyone had any success remuxing (but not transcoding) high bitrate content to MP4 and pushing it.

It used to be the case with THDs that if you remuxed high bitrate (greater than 20mbps) h.264 content to mp4 without transcoding the content would push but not play back successfully. The bitrates were too high for the THD to handle. 

Has anyone tried this with a premiere?


----------



## txporter (Sep 18, 2006)

dlfl said:


> Whew! It's been a long haul but we've laughed, we've cried, and we learned!
> 
> I'm curioius what version of HB you're using. Latest official release, or what? GUI or command-line ? I see they just made a new official release: 9.5.
> 
> Also, did you need to use the "-0" option or not?


Up until recently, I have been running my mp4 video through mp4creator -optimize. I was messing with some files on my premiere and noticed that it wasn't necessary. I no longer run optimization on my videos.



larrs said:


> I am using the latest GUI. I did not do anything with the -0 option as I am not really sure where that option would be in the GUI version. I can say it works like a charm. Now, all that is left is to determine the proper encoding parameters to keep video quality as high as possible while keeping space to a minimum. Once I am in the correct ballpark there, I have a ton videos (at least) to encode, so my pc will be very busy.


Glad that you got it worked out. I haven't used Handbrake in a while, but you should be able to use Constant Quality encoding to get very high quality results without needing to tinker with what bitrate is used. Handbrake used to have a percentage number in their Constant Quality settings, but I think they now moved to CRF numbers (same as used by x264 encoder). At any rate, it is generally considered that using a CRF of 18 is transparent to the original source (i.e. you won't notice any difference). If you want to save a little hard drive space, you can move that number higher. I use CRF 19 for SD video, and CRF 21 for 720p/1080i material. You can tinker with the settings and see what you like best. Most of the other settings are really for squeezing the most quality out of a video at the smallest size. If you don't need the video to be as small as possible, then you can probably get away with mostly all default settings and a CRF of 18-22. The encoding times will be faster than pushing everything to the limit.


----------



## larrs (May 2, 2005)

txporter said:


> Up until recently, I have been running my mp4 video through mp4creator -optimize. I was messing with some files on my premiere and noticed that it wasn't necessary. I no longer run optimization on my videos.
> 
> Glad that you got it worked out. I haven't used Handbrake in a while, but you should be able to use Constant Quality encoding to get very high quality results without needing to tinker with what bitrate is used. Handbrake used to have a percentage number in their Constant Quality settings, but I think they now moved to CRF numbers (same as used by x264 encoder). At any rate, it is generally considered that using a CRF of 18 is transparent to the original source (i.e. you won't notice any difference). If you want to save a little hard drive space, you can move that number higher. I use CRF 19 for SD video, and CRF 21 for 720p/1080i material. You can tinker with the settings and see what you like best. Most of the other settings are really for squeezing the most quality out of a video at the smallest size. If you don't need the video to be as small as possible, then you can probably get away with mostly all default settings and a CRF of 18-22. The encoding times will be faster than pushing everything to the limit.


I actually read some Handbrake forums and it seems that they are in agreement that using CRF is preferable to file size. My test at CRF 20 yesterday (1080 source to 720) looked great on my 50" plasma, but I did not try my projector yet ( was too busy watching football) and I used a real torture test scene panning over a cityscape that if done poorly, will really cause a mess. However, given I have plenty of space with my shiny new RAID system, I think I will give 18 a try for a full video tonight. I was also planning to play with an SD video as well and I think I will use 18 or your 19. Right now I have a couple hundred SD videos at full quality that take up quite a bit of space. Any savings will be a plus for me and I can take my time converting them as they play fine as is for now. On an SD video at 19, what kind of file size do you get as a percentage of the original?


----------



## PaJo (Dec 17, 2001)

When I first started using Handbrake, I tried various settings for the Constant Quality, and I think a setting of 10 produced a file that was bigger than the source file. I used 16 & 17 for a while but really did not see any difference with a setting of 18 on our 58" Plasma. I also experimented with the strict vs loose anamorphic for our older B&W movies from the '40s , but did not see a big difference, likewise I tried using the filters for black and white but overall the default settings work pretty good. Handbrake has been the easiest so far for me, everything just works with the default settings , and using the ac3 pass through yields 5.1 sound on through the HD Tivo to our Sony receiver.


----------



## larrs (May 2, 2005)

OK, so as you can guess, I did all of my testing with a small clip of about 500MB and all is well. However, today I ran a full HD video (about 8.5GB) through at the 18 setting and it fails to open in streambaby and cannot pull to the Tivo through Tivo desktop plus. I noticed the file size is about 5.5GB. So, my questions:

Is there still (or was there ever) a 4GB file size for .mp4 files? If so, can I check the "large file size" and use 64 bit and if so, will it work with the tivos? And, lastly, will it also work with other devices like a WD Live unit? 

Or, is my best best to limit the file size to 4GB to make it more universally acceptable?

I just don't want to waste another several hours on each file testing if someone already knows the answer.


----------



## moyekj (Jan 24, 2006)

larrs said:


> OK, so as you can guess, I did all of my testing with a small clip of about 500MB and all is well. However, today I ran a full HD video (about 8.5GB) through at the 18 setting and it fails to open in streambaby and cannot pull to the Tivo through Tivo desktop plus. I noticed the file size is about 5.5GB. So, my questions:
> 
> Is there still (or was there ever) a 4GB file size for .mp4 files? If so, can I check the "large file size" and use 64 bit and if so, will it work with the tivos? And, lastly, will it also work with other devices like a WD Live unit?
> 
> ...


You should try running your > 4GB sample through qt-faststart (Google for source code and/or windows binary) and then try streaming again. TD+ I'm still not sure if latest version can handle H.264 + AC3 audio natively in push mode, but pyTivo can (after you manually qt-faststart > 4GB files).
If all you care about is TiVo compatibility then adding -O option in Handbrake may allow you to skip qt-faststart step for those big files. mp4 container is a PITA.


----------



## larrs (May 2, 2005)

OK, I agree .mp4 is a PITA. 

I finally tried a full video tonight and it looked and sounded magnificent at 4GB through streambaby. However, now it has no audio when played through my reciever on my Projector if I use DD 5.1 when transferring with TDTP...

And it gets worse...
I also did an SD video the same way and set the parameters to no anamorphic 720X480 and I get window boxing when played back through streambaby or TDTP...so I am back to test clips for my SD collection until I figure this out.

So I will now have to use streambaby exclusively or go back to AAC audio it seems for HD content and I am looking at starting over on SD content.

PITA indeed.


----------



## PaJo (Dec 17, 2001)

I read that with some files using "loose" anamorphic will retain the original aspect ratio better than "strict" . My backups have been from our DVD collection so a CRF setting of 18 works fine, but they say a setting of 22 will work well with BD, you did write previously that your picture quality was great at CRF 20. I am one of those KIS (keep it simple) types and did not get into playing around with specific cropping etc. and detailed settings as you apparently are doing. I don't get upset if there is a little black bar, I do prefer to keep the original aspect ratios if possible. 

I really do not retain much content on our HD Tivo these days, the little Asus O'Play is only a couple remote buttons away and much like your WD player, plays everything just as well as the HD Tivo. I rarely use streambaby, for me using pyTivo to copy the file to the HD Tivo is all we need. I can watch it as the HD Tivo copies it and if need be, delete afterwards. I do keep Galleon mainly for the local traffic cameras, most shows that I previously recorded on the HD Tivo are now copy protected by Comcast, so I can move very little of the things I record from the Tivo to the pc for backup.We watch a lot of Netflix streaming these days.


----------



## jcthorne (Jan 28, 2002)

Couple of points to help larrs. 

for the mp4 files there is no 4gb limits for either the tivo or the WD live plus. Mp4 files must contain an h.264 video track at level 4.1 or lower and ac3 audio if you want 5.1. the file must be streamable. qt-faststart is one way of achieving that, IMSA standard mp4 files profile works, handbrake optimize for web video option does the same. 

For the DVD files you are running into an aspect ratio bug in the series three tivos. Any video larger than 480i (640x480) but smaller than 1080i (1920) is handled as 720p by tivo. Any video that falls in this range needs to be encoded as full frame 720p (1280x720) to display correctly, auto size and aspect are broken. Its fixed on the Premiere boxes.

Tivo desktop cannot push mp4 files with h264 video to the tivo without transcoding. pytivo can. tivo desktop audio transcoding for 5.1 audio is broken, simple as that. Us Pytivo and it works.


----------



## larrs (May 2, 2005)

jcthorne said:


> Couple of points to help larrs.
> 
> for the mp4 files there is no 4gb limits for either the tivo or the WD live plus. Mp4 files must contain an h.264 video track at level 4.1 or lower and ac3 audio if you want 5.1. the file must be streamable. qt-faststart is one way of achieving that, IMSA standard mp4 files profile works, handbrake optimize for web video option does the same.
> 
> ...


I thought of the 720P idea, but if the source is 720X480, HandBrake will not allow you to encode it any higher than 720Xxx.

Also, all of my testing has been done on a Premier, however I do have an S3 and a THD (series 3) so I am happy to be aware of this. But, this still doesn't explain the behavior on the Premieres (window boxing). I will continue to play with my test files but I am also now getting the dreaded "0xffff error" in streambaby, so I am researching how to handle that in the streambaby thread.

I will look at pytivo tonight and I will turn on the "optimize for web video" in HandBrake and see what happens. When all is said and done, if (IF) I get this all worked out, I will report what the solution is. I can't be the only one who has given up on this multiple times.

Thanks


----------



## jcthorne (Jan 28, 2002)

larrs said:


> I thought of the 720P idea, but if the source is 720X480, HandBrake will not allow you to encode it any higher than 720Xxx.
> 
> Also, all of my testing has been done on a Premier, however I do have an S3 and a THD (series 3) so I am happy to be aware of this. But, this still doesn't explain the behavior on the Premieres (window boxing). I will continue to play with my test files but I am also now getting the dreaded "0xffff error" in streambaby, so I am researching how to handle that in the streambaby thread.
> 
> ...


The inabilaty of handbrake to allow specifying the final resolution is one reason I mostly have up using it. Its to restricted to encoding for specific devices that are not always compatible. I use meGUI for most every thing, upsizing 720 res DVD to get rid of anamorphic encoding is one of them.

For handbrake, you are stuck with 640x480 with anamorphic turned on, like the original dvd. The source is not 720x480 on a standard dvd.

720xXXX is HD for tivo, not SD. (its above 480i)

What solution is it you are looking for? I have likely already done it as I have pushed most every type of video source to my tivos over the last few years. We ONLY use the tivo for video presentation. ALL tv, movies etc.


----------



## larrs (May 2, 2005)

jcthorne said:


> What solution is it you are looking for? I have likely already done it as I have pushed most every type of video source to my tivos over the last few years. We ONLY use the tivo for video presentation. ALL tv, movies etc.


Then you're my guy!

I have a large video collection and a new 8TB RAID array to fill...

Currently, I have a hundred or so SD movies (only part of my collection) I managed to put on an external drive in mpeg format and have enjoyed watching them "on demand" on my 4 tivos (now 5) via Tivo Desktop Plus. However, I was still disc-based for HD. I tried streambaby a year ago or so and couldn't see a reason to keep it (with SD mpeg2 files, there wasn't really a need since they transfer so fast).

I was trying to figure out how to archive all of my movies to .mp4 (HD and SD with 5.1 DD audio if possible) and store so my entire collection could be watched on any of my tivos since we now have one on every TV in the house where we could possibly want to sit and watch a movie. For big productions, I will still go get the disc off the shelf so I can enjoy it on my 100" screen with DTS Master Audio, etc. but for watching in bed at the end of the night or sitting in the family room on our 40" TV with a sound bar for audio, it is a PITA to drag myself down to the closet in the media room to pick a disc- not to mention, by the time we pick a title, and push "play" and go through the gunk on a disc, no one wants to watch any longer (but that is another subject)...

It then dawned on me this would be a great use of streaming since the video would not have to be converted to mp2 by Tivo Desktop, so I tried streambaby again and like the concept.

However, my early test using DVDFab was giving me the anamorphic error on 720P encodes and someone directed me to Handbrake which seems easy to use. That is where I am now.

If you could rundown your process for SD and HD that would be great and I will owe you one. In the meantime, I will download MeGUI later today and play arund with it.


----------



## jcthorne (Jan 28, 2002)

For SD from DVD, two choices. Use handbrake with strict anamorphic, optimize for web and mp4 format, ac3 passthrough, no subtitles. Will yield an anamorphic mp4 file at 640x480 that tivo should push and play correctly. Or play the mpeg2 directly if you have the space to keep them that way.

If you wish to create non-anamorphic mp4s you will need to upconvert to 720p or downrez to 640xXXX. I use megui for that. Open the file in megui and edit the resize dimentions to 1280x720 and add boarders as required to get the full frame from the source you have. I set up a few profiles for these tasks in megui but its not that many settings.

For HD, I use meGUI to either remux the original h264 or transcode to h264 at 1080p (for me the decision to transcode depends on the original size but its not a tivo limit and sure is easier and faster not to transcode and just remux if you have the storage)


I seldom deal with transcoding 720p video any more. On series 3 tivos, its a problem. TV is the only real source of 720p and its almost always full frame and plays fine. BR is almost always 1080p and I leave it that way.


Lets work on one recipie at a time, what do you want to start with and what specifics do you need?


----------



## txporter (Sep 18, 2006)

It has been a long time since I have really messed with Handbrake (I use avisynth scripts and x264), but I can tell you that most DVDs (and every recent DVD I have messed with) are 720x480 anamorphic, not 640x480. Not sure why you are getting 640x480 from Handbrake. Perhaps, that is the problem with streaming SD video? I transcode all of my DVDs without any resolution modification to 720x480 h.264 and I have no playback issues when pushed with pytivo (can set Aspect to Full, Panel or Zoom on Tivo and it will always be full screen, no stretching). I don't use Streambaby.

This is my general batch file for encoding NTSC DVD rips:
x264-sd.bat:

```
FOR &#37;%A IN (*.mpg) DO (
  ECHO setmtmode(5,0^)
  ECHO MPEG2Source("%%~nA.d2v",cpu=3^)
  ECHO setmtmode(2^)
  ECHO TFM(^)
  ECHO Tdecimate(^)
  ECHO RemoveGrain(1^)
  ECHO FFT3DFilter(sigma=1,sharpen=0.5,ncpu=4^)
  ECHO setmtmode(5^)
  ECHO textsub("%%~nA.srt"^)
)> %%~nA.avs

setlocal
set x264="D:\encode\x264.exe"
set mp4box="D:\encode\mp4box\mp4box.exe"
set dgindex="D:\encode\dgindex.exe"
set eac3to="D:\encode\eac3to\eac3to.exe"
set cc="D:\encode\CCExtractor\ccextractorwin.exe"

mkdir output

FOR %%A IN (*.mpg) DO (
%dgindex% -IF=[%%A] -FO=0 -OF=[%%~nA] -HIDE -EXIT
%cc% %%A %%~nA.srt
copy D:\encode\style.txt %%~nA.srt.style
%eac3to% %%A %%~nA.ac3
%x264% --crf 19 --keyint 48 --sar 40:33 --tune film -o %%~nA.264 %%~nA.avs 2>%%~nA.log

%mp4box% -add %%~nA.264:fps=23.976 -add %%~nA.ac3 "%%~dpA\output\%%~nA.mp4"

)
```


----------



## jcthorne (Jan 28, 2002)

txporter said:


> It has been a long time since I have really messed with Handbrake (I use avisynth scripts and x264), but I can tell you that most DVDs (and every recent DVD I have messed with) are 720x480 anamorphic, not 640x480. Not sure why you are getting 640x480 from Handbrake. Perhaps, that is the problem with streaming SD video? I transcode all of my DVDs without any resolution modification to 720x480 h.264 and I have no playback issues when pushed with pytivo (can set Aspect to Full, Panel or Zoom on Tivo and it will always be full screen, no stretching). I don't use Streambaby.


Its these kind of mind twisters that got me away from anamorphic encoding long ago. I'll let txporter help you with the dvd files as he as much more and more recent experience with it. I have not worked on an sd dvd in years and my memory is not what it used to be. If its not HD, I mostly don't mess with it anymore. It does sound like your transcode of the mpeg2 dvds should go easily enough though.


----------



## larrs (May 2, 2005)

Thanks for all the assistance!

I am currently encoding a video from DVD to mp4 using the web optimize and your recommended handbrake settings. I'll download and try MeGUI as well. However, I can't verify until I get home tonight as to how it behaves via streambaby. I am going to concentrate on SD DVD for now and move to HD when that is figured out.


One more quick question: with pyTivo, I have to go to the computer to initiate the push to the tivo, correct? If so, this may be a deal breaker for me and keep me with streambaby.

Again, thanks for taking the time to help. I will say if nothing else, this is a learning exercise.


----------



## larrs (May 2, 2005)

As an FYI, the question about the mp4 file size may be moot as that 5.5G file will not open in VLC Media Player either. I must have set something else incorrectly.


----------



## jcthorne (Jan 28, 2002)

Yes, pytivo initiates the push from the computer. transfer initated from the tivo is a pull and does not currently support mp4 natively.

Streambaby should be able to push the same files as pytivo but via its HMO interface allows the user to initiate the push from the tivo menu. I have thought about going this route myself but for now, all video we are interested in watching is stored on the tivo, archives and staging on the server. IE current series tv shows and movies we have not yet seen are on the tivo. (2tb holds a bunch of hd video) Let us know how it goes with streambaby as an interface for the push. I tried the streaming once and the rebuffering, pauses etc drove me and the wife nuts. Did not like it at all. May be better now.


----------



## txporter (Sep 18, 2006)

larrs said:


> One more quick question: with pyTivo, I have to go to the computer to initiate the push to the tivo, correct? If so, this may be a deal breaker for me and keep me with streambaby.
> 
> Again, thanks for taking the time to help. I will say if nothing else, this is a learning exercise.


Yes, you need to initiate from a web interface, although I thought that streambaby had somehow ridged up a way to initiate a push from the Tivo interface. It will still transfer to the tivo rather than stream, but can be done from Tivo. I haven't ever tried this.

I have gone to pushing video to my tivo using safari on my itouch. You can do this from any device on your local network. Just open http://192.1.168.xxx:9032 in your browser (where the ip address is the ip of your computer running pytivo). You can then push the files to your tivo from that interface.


----------



## txporter (Sep 18, 2006)

jcthorne said:


> I think we are stating the same thing. 720x480 anamorphic is stored as 640x480 pixels in the file. Its these kind of mind twisters that got me away from anamorphic encoding long ago. I'll let txporter help you with the dvd files as he as much more and more recent experience with it. I have not worked on an sd dvd in years and my memory is not what it used to be. If its not HD, I mostly don't mess with it anymore. It does sound like your transcode of the mpeg2 dvds should go easily enough though.


I follow you. I think it is actually 720x480 pixel though and displayed back at 854x480 resolution due to anamorphic.


----------



## jcthorne (Jan 28, 2002)

txporter said:


> I follow you. I think it is actually 720x480 pixel though and displayed back at 854x480 resolution due to anamorphic.


See, I told you it was a mind twister.


----------



## jcthorne (Jan 28, 2002)

txporter said:


> Yes, you need to initiate from a web interface, although I thought that streambaby had somehow ridged up a way to initiate a push from the Tivo interface. It will still transfer to the tivo rather than stream, but can be done from Tivo. I haven't ever tried this.
> 
> I have gone to pushing video to my tivo using safari on my itouch. You can do this from any device on your local network. Just open http://192.1.168.xxx:9032 in your browser (where the ip address is the ip of your computer running pytivo). You can then push the files to your tivo from that interface.


I wish I could figure a way to do it from outside the home network. Just dont seem able to forward the ports and make it accessable. I use an EVO and the ip is global, not local to my home network.


----------



## larrs (May 2, 2005)

txporter said:


> Yes, you need to initiate from a web interface, although I thought that streambaby had somehow ridged up a way to initiate a push from the Tivo interface. It will still transfer to the tivo rather than stream, but can be done from Tivo. I haven't ever tried this.
> 
> I have gone to pushing video to my tivo using safari on my itouch. You can do this from any device on your local network. Just open http://192.1.168.xxx:9032 in your browser (where the ip address is the ip of your computer running pytivo). You can then push the files to your tivo from that interface.


Streambaby does initiate from the tivo and streaming is fine with me- I do not need a local copy of the file on the tivo. That was my point- this is what I need. I don't want to have to go to the pc everytime I want to find a video to watch and push it to the tivo. Even though I have PCs everywhere, this would not benefit me (I can already hear my family complaining ). Streambaby, if I can get it to work is exactly what we need. However, I also wanted to try to keep the Tivo Desktop interface working, but it will not work with 5.1 and mp4 files.


----------



## PaJo (Dec 17, 2001)

jcthorne said:


> Yes, pytivo initiates the push from the computer. transfer initated from the tivo is a pull and does not currently support mp4 natively.
> 
> .


I must have an unusual setup, on my HD Tivo using pyTivo I have two additional folders in my Now Playing menu, one for movies on my PC and the other for movies on the Asus O'Plays external drive, all we do is select the movie we want, and it can be files ending with .mvk .m4v or .mp4 encoded by handbrake and select transfer and within a few seconds it asks if we want to watch start watching the movie, along with the usual warning that on some networks the transfer may be too slow etc. etc. I don't remember doing anything special with pyTivo , if we do not stop the transfer, the movie will be on our HD Tivo just as any other recording- the only difference is rather than a red led for recording it has a blue led lit while it is copying the movie to the hard drive.

Perhaps the linux ( by wmcbrine ) version of pyTivo is a little different than the windows setups, then again I could have installed something years ago that I no longer remember, and every time I upgrade my system it just keeps upgrading the programs I installed ( Kubuntu does upgrade mostly everything you installed every time there are new upgrades).


----------



## larrs (May 2, 2005)

PaJo said:


> I must have an unusual setup, on my HD Tivo using pyTivo I have two additional folders in my Now Playing menu, one for movies on my PC and the other for movies on the Asus O'Plays external drive, all we do is select the movie we want, and it can be files ending with .mvk .m4v or .mp4 encoded by handbrake and select transfer and within a few seconds it asks if we want to watch start watching the movie, along with the usual warning that on some networks the transfer may be too slow etc. etc. I don't remember doing anything special with pyTivo , if we do not stop the transfer, the movie will be on our HD Tivo just as any other recording- the only difference is rather than a red led for recording it has a blue led lit while it is copying the movie to the hard drive.
> 
> Perhaps the linux ( by wmcbrine ) version of pyTivo is a little different than the windows setups, then again I could have installed something years ago that I no longer remember, and every time I upgrade my system it just keeps upgrading the programs I installed ( Kubuntu does upgrade mostly everything you installed every time there are new upgrades).


So, do these "pulls" convert to mpeg2, or do they stay natively in mp4- that is the question. Even with Tivo Desktop, I can get decent performance with pulls if the file is converted to 720P, but I know it is converting to mpeg2. Also, I'd like to know if you are getting 5.1 audio on thos mp4s via the "pull transfer" on pyTivo. Feel free to correct me if I have any of this wrong, I have never used pyTivo, but I would be willing to try.


----------



## jcthorne (Jan 28, 2002)

on a pull, pytivo converts ALL formats to mpeg2 video and converts audio to ac3 5.1 or passes through if already compatible.

The conversion of a high bitrate mp4 or mkv at 1080p/24 with audio in a incompatible format takes a LOT of processor on the server to keep up with real time. I have never seen it done but folks have reported sucess. Not going to happen on our file server with its 1.8Ghz intel.

Now, if the file is already in correct format for tivo, no problem to watch in real time on a pull.


----------



## jcthorne (Jan 28, 2002)

larrs said:


> Streambaby does initiate from the tivo and streaming is fine with me- I do not need a local copy of the file on the tivo. That was my point- this is what I need. I don't want to have to go to the pc everytime I want to find a video to watch and push it to the tivo. Even though I have PCs everywhere, this would not benefit me (I can already hear my family complaining ). Streambaby, if I can get it to work is exactly what we need. However, I also wanted to try to keep the Tivo Desktop interface working, but it will not work with 5.1 and mp4 files.


Have you actually played a full length 1080p flic via streaming? I have never seen streambaby do it without stopping, studdering and rebuffering several times. And that is with the Premiere on a gigabit network. Unless streambaby has made great improvements in the last year, it simple was not usable for streaming HD for us. Initiating a push was nice but did not replace pytivo. Pytivo only pushes from the computer end. Guess I could run both on the server....


----------



## orangeboy (Apr 19, 2004)

jcthorne said:


> Have you actually played a full length 1080p flic via streaming? I have never seen streambaby do it without stopping, studdering and rebuffering several times. And that is with the Premiere on a gigabit network. Unless streambaby has made great improvements in the last year, it simple was not usable for streaming HD for us. Initiating a push was nice but did not replace pytivo. Pytivo only pushes from the computer end. Guess I could run both on the server....


I like streambaby, with the exception of the 1GB buffer limit it runs into on the TiVo. That's why I prefer the pytivo push.


----------



## jcthorne (Jan 28, 2002)

orangeboy said:


> I like streambaby, with the exception of the 1GB buffer limit it runs into on the TiVo. That's why I prefer the pytivo push.


Yep. And with BR ripped mp4s at 15+ GB the rebuffer happens about every 10 minutes.


----------



## PaJo (Dec 17, 2001)

larrs

On my system, I think both streambaby and pyTivo rely on ffmpeg libraries/exe to transcode the file, and on my system both work with 5.1 sound output. It is possible I have a video or two that will not work with them. I do not have a bd on my pc and do nothing with bd, just dvd.


----------



## larrs (May 2, 2005)

jcthorne said:


> Yep. And with BR ripped mp4s at 15+ GB the rebuffer happens about every 10 minutes.


I may have come up with a method that works well, it does require two passes of encoding, but my preliminary testing on a 100" screen is very, very positive and it yields a file size of about 2GB. So far I have only done two films, but it looks good and I have the opinion of my family members that it is acceptable to them.

Since I have the disc for crtical watching anyway, it doesn't bother me that there may be a little missing...


----------



## larrs (May 2, 2005)

jcthorne said:


> Have you actually played a full length 1080p flic via streaming? I have never seen streambaby do it without stopping, studdering and rebuffering several times. And that is with the Premiere on a gigabit network. Unless streambaby has made great improvements in the last year, it simple was not usable for streaming HD for us. Initiating a push was nice but did not replace pytivo. Pytivo only pushes from the computer end. Guess I could run both on the server....


Did it last night (see my above post). I ended with a file size of 2.5GB and it rebuffered once for about 7 seconds.

EDIT: Sorry, but I did change the rez to 720P, so the answer is no. However I did a bunch of testing and no one in my family could see enough of a difference to warrant staying at 1080P- and this is on my 100" screen with my Mitsubishi 1080P Projector. If I freeze frame the movie, there may be some slight dfference, but none if watching. And, at least with streambaby I can get 5.1 DD.


----------



## larrs (May 2, 2005)

PaJo said:


> larrs
> 
> On my system, I think both streambaby and pyTivo rely on ffmpeg libraries/exe to transcode the file, and on my system both work with 5.1 sound output. It is possible I have a video or two that will not work with them. I do not have a bd on my pc and do nothing with bd, just dvd.


So can you share the process you use for DVD (if you are doing them in mpeg4)?

I ran a couple of other tests last night using the settings suggested above and still got a stretched video on streambaby with mp4. This time, inerestigly, I got very small black bars at the top and bottom but nowhere near where they should be so it was all stretched (using strict anamorphic and web optimized settings).

I also tried to try MeGUI, but by that time, I was tired and it is not a really user intuative product so I did not get very far.

As of now, streambaby is OK for me for HD videos, but not at all for SD (unless I want to leave everything at mpeg2).


----------



## txporter (Sep 18, 2006)

larrs said:


> I may have come up with a method that works well, it *does require two passes of encoding*, but my preliminary testing on a 100" screen is very, very positive and it yields a file size of about 2GB. So far I have only done two films, but it looks good and I have the opinion of my family members that it is acceptable to them.
> 
> Since I have the disc for crtical watching anyway, it doesn't bother me that there may be a little missing...


If you are using x264, then 2-pass encoding is really never needed. If you use CRF based encoding (constant quality), then the bitrate allocation algorithm is identical between crf and 2-pass. Dark Shikari (x264 developer) has said in multiple threads on doom9 that there will be no improvement in quality using 2-pass over crf.

Handbrake and MeGUI both use x264.

edit: Found a thread over on Doom10 (here)


----------



## larrs (May 2, 2005)

txporter said:


> If you are using x264, then 2-pass encoding is really never needed. If you use CRF based encoding (constant quality), then the bitrate allocation algorithm is identical between crf and 2-pass. Dark Shikari (x264 developer) has said in multiple threads on doom9 that there will be no improvement in quality using 2-pass over crf.
> 
> Handbrake and MeGUI both use x264.
> 
> edit: Found a thread over on Doom10 (here)


Actually, what I do does "sort of" require it although it is done with two programs although only one for video. I use one step to convert the HD audio to DD5.1 and the second step is video reduction. Not really two video steps. If I take it down to 720P from 1080, I seem to be able to get a file size of about 2.5GB on a 15GB starting file without degradation.


----------



## larrs (May 2, 2005)

using my 250MB test file, I finally got a DVD file to convert and properly display via streambaby.

I used anamorphic= none, 740X480 and cropping to custom and set all crop parameters to 0. Also, it seems the web optimized has to be on as well. Interestingly, this file was named .mp4 by handbrake and all the others were given an .m4v extension. Looks and sounds great. I am doing the entire 6GB file now and will report back.

*EDIT*: When I set the full file, handbrake tried to give it a .m4v extension which I fiound is the default when you use ac3 audio and subtitles. Interesting- I changed the default and forced the mp4 extension and I ended up with a file that plays back perfectly. At RF18 it came in at 1.5GB with DD audio... Not too shabby at all!

Compared to the original mpeg2 file, we literally cannot tell the difference and it is 25% of the size. It streams fine with streambaby, but plays with no audio transferred with Tivo Desktop. I am now doing the same file with AAC mixed down to DPLII stereo and will see how close it sounds to the original DD just for kicks. I am then going to post a final summation of my findings.


----------



## larrs (May 2, 2005)

I have verified the following several times and it works on both streambaby and transfers with Tivo Desktop (with caveats as mentioned). I will try pyTivo in the near future.

This is for Anamorphic mpg files, such as those on DVDs (especially my homemade anamorphic DVDs from shows recorded from HDTV, but that is another story):

Using Handbrake (I tried DVD Fab and VideoRedo, but I can verify there was a difference in picture quality and IMHO Handbrake won out):

Set Handbrake Picture tab settings: Anamorphic off, 720X480, Custom crop to all 0 values and "web optimized" 

Set all video filters tab values to "Off" 

In the video tab, set video codec to h.264 and framerate to same as source. Using RF18 constant qualit

In the audio tab, DD5.1 passthrough (will only play via streambaby- will transfer but will not play audio through tivo desktop transfers). Tried AAC 6 channel discreet (also will not even transfer via tivo desktop will play in streambaby, not sure about pyTivo), or AAC Dolby PLII Mixdown (plays in all above methods but is stereo) 
NOTE- I am amazed at how good a DPLII source sounds with a receiver capable of decoding it. My system is pretty decent (Marantz receiver, NHT speakers) and it sounded as good as the DD track IMO.

On subtitles, I select Forced Only subs to be burned into the video. I didn't touch anything else in the other tabs. 

Here is the trial and error important step I found- if I use DD passthrough and turn on subtitles, handbrake tries to make the file an .m4v file. If no subs, it uses .mp4. Either way, you can edit the name of the file to force an .mp4 extesnion, otherwise I had issues with the file not playing.


I hope this helps some others, it took at least 50 hours of trial and error and a bunch of suggestions from others in this and other forums. Thanks for the input.

I am still refining what I do with HD material.


----------



## jcthorne (Jan 28, 2002)

With as much work as you have done in Handbrake, for HD material that is not already h264, I would recommend you stick with HB. meGUI works great for me but I have been using it for years and know my way arround its 'excentric' user interface. If you wish some help in meGUI just ask, be glad to try.

For HD that is already h264, suggest you try orangeboy's batch file for remuxing to a tivo compliant mp4. Its spiffy and works well. meGUI also does this fine.


----------



## dlfl (Jul 6, 2006)

larrs said:


> .........This is for Anamorphic mpg files, such as those on DVDs (especially my homemade anamorphic DVDs from shows recorded from HDTV, but that is another story):
> ..........
> Set Handbrake Picture tab settings: Anamorphic off, 720X480, Custom crop to all 0 values and "web optimized"
> ...........


In the previous version of HB (9.4) you could enable a text panel that showed the actual command-line parameters corresponding to what you set up in the GUI. If possible with Ver. 9.5, could you please paste the contents of this panel for one of these encodings into a post here?

I'm trying to understand the anamorphic aspects, which are always somewhat confusing. It would seem that "Anamorphic off" would mean a PAR (pixel aspect ratio) of 1:1, which with a 720x480 encoding would never give the correct DAR (Display Aspect Ratio) for either 4:3 or 16:9 formats. That is if the output dimensions are actually 720x480. If you load the output file into VRD or run MediaInfo on it, what are the dimensions? It could also be that "Anamorphic Off" causes HB to just pass the input PAR thru to the output, thus signaling the correct DAR.


----------



## txporter (Sep 18, 2006)

I was wondering the same thing, dlfl. It would be nice to see the mediainfo/VRD video info on the resulting mp4 files. Handbrake is a nice GUI in that it has a decent algorithm built-in to detect interlacing/telecining and output the progressive frames.

I am fairly certain that by convention Handbrake changes the extension from mp4 to m4v as soon as you pass through AC3 audio. Even though AC3 has been added to mp4 container specs, Handbrake kept the same extension preferences.


----------



## larrs (May 2, 2005)

jcthorne said:


> With as much work as you have done in Handbrake, for HD material that is not already h264, I would recommend you stick with HB. meGUI works great for me but I have been using it for years and know my way arround its 'excentric' user interface. If you wish some help in meGUI just ask, be glad to try.
> 
> For HD that is already h264, suggest you try orangeboy's batch file for remuxing to a tivo compliant mp4. Its spiffy and works well. meGUI also does this fine.


Yes, I believe I will. meGUI is way too "excentric" for me. I couldn't figure it out and I am no novice when it comes to non-intuative programs. HandBrake was running a video in 3 mins.


----------



## larrs (May 2, 2005)

dlfl said:


> In the previous version of HB (9.4) you could enable a text panel that showed the actual command-line parameters corresponding to what you set up in the GUI. If possible with Ver. 9.5, could you please paste the contents of this panel for one of these encodings into a post here?
> 
> I'm trying to understand the anamorphic aspects, which are always somewhat confusing. It would seem that "Anamorphic off" would mean a PAR (pixel aspect ratio) of 1:1, which with a 720x480 encoding would never give the correct DAR (Display Aspect Ratio) for either 4:3 or 16:9 formats. That is if the output dimensions are actually 720x480. If you load the output file into VRD or run MediaInfo on it, what are the dimensions? It could also be that "Anamorphic Off" causes HB to just pass the input PAR thru to the output, thus signaling the correct DAR.


Anamorphic is off, but by specifying the 720X480 size, it forces the black bars to be correctly displayed. For some reason if I left the anamorphic on, I would get no black bars and a stretched image to fill the entire 16X9 of my TV screen when converted to mp4.

I ran MediaInfo and the dimensions were indeed reported as 720X480.


----------



## dlfl (Jul 6, 2006)

larrs,

Any chance of getting a sample cut-and-paste of the command line options for one of your 720x480 encodes? I'd still like to see what "Anamorphic Off" translates to in the command line. (I assume you realize the GUI version of HB is just a front end for the command line program.) Thanks.


----------



## larrs (May 2, 2005)

dlfl said:


> larrs,
> 
> Any chance of getting a sample cut-and-paste of the command line options for one of your 720x480 encodes? I'd still like to see what "Anamorphic Off" translates to in the command line. (I assume you realize the GUI version of HB is just a front end for the command line program.) Thanks.


Be glad to if you'll point me to where it might be. The Activity Window is a log of what is happening, but it is just reporting what I have reported- there is no mention of PAR, etc. Point me in the correct direcction and I'll see what I can do.


----------



## dlfl (Jul 6, 2006)

larrs said:


> Be glad to if you'll point me to where it might be. The Activity Window is a log of what is happening, but it is just reporting what I have reported- there is no mention of PAR, etc. Point me in the correct direcction and I'll see what I can do.


Unless this changed with Ver. 9.5 (and who knows when the HB docs will be updated?), the command lline window is the "Query Editor". It is hidden by default and can be enabled in the program options menu. At the moment I don't have either version running on any of my PC's or I would verify this.


----------



## larrs (May 2, 2005)

dlfl said:


> Unless this changed with Ver. 9.5 (and who knows when the HB docs will be updated?), the command lline window is the "Query Editor". It is hidden by default and can be enabled in the program options menu. At the moment I don't have either version running on any of my PC's or I would verify this.


I found it and have it enabled. However, I have a small batch of jobs running already and this requires a restart of the program. I will run it and get you the output in my next post (proably tomorrow) after this batch is done.

I didn't ignore your question, but I was out of town this weekend.


----------



## txporter (Sep 18, 2006)

I just downloaded HB v0.9.5, enable Query Editor and input what larrs listed above. Here is what it generated:

```
-i "D:\encode\Test\startrek\TNG.S1E01-clip.mpg" -t 1 -c 1 -o "D:\encode\Test\TNG.S1E01-clip.mp4"  -f mp4 -O  -w 720 -l 480 --crop 0:0:0:0 -e x264 -q 18 -a 1 -E copy:ac3 -6 auto -R Auto -B auto -D 0.0 --subtitle 1 --markers="D:\Profiles\RA6363\Local Settings\Temp\TNG.S1E01-clip-1-chapters.csv" -x b-adapt=2:rc-lookahead=50 --verbose=1
```
Also, I would recommend trying an encode or two with Detelecine and Decomb enabled rather than Off. You will have telecined frames from DVD. I prefer to IVTC back to progressive stream.


----------



## larrs (May 2, 2005)

txporter said:


> I just downloaded HB v0.9.5, enable Query Editor and input what larrs listed above. Here is what it generated:
> 
> ```
> -i "D:\encode\Test\startrek\TNG.S1E01-clip.mpg" -t 1 -c 1 -o "D:\encode\Test\TNG.S1E01-clip.mp4"  -f mp4 -O  -w 720 -l 480 --crop 0:0:0:0 -e x264 -q 18 -a 1 -E copy:ac3 -6 auto -R Auto -B auto -D 0.0 --subtitle 1 --markers="D:\Profiles\RA6363\Local Settings\Temp\TNG.S1E01-clip-1-chapters.csv" -x b-adapt=2:rc-lookahead=50 --verbose=1
> ...


This is exactly what I see with the exceptions of my subtitle settigns being slightly different (I have forced only and burned in selected). I will enable both setting above per your suggestions for a 480P output and see how I like it.

Thanks

Thanks


----------



## larrs (May 2, 2005)

txporter said:


> Also, I would recommend trying an encode or two with Detelecine and Decomb enabled rather than Off. You will have telecined frames from DVD. I prefer to IVTC back to progressive stream.


This worked great. One other question- I have a bunch of TV stuff at 1080i I would love to convert to mp4 and 720P to save space. would you do the same settings to IVTC?


----------



## txporter (Sep 18, 2006)

larrs said:


> This worked great. One other question- I have a bunch of TV stuff at 1080i I would love to convert to mp4 and 720P to save space. would you do the same settings to IVTC?


Yes, I would do the same thing for 1080i material. 1080i TV shows are usually hard telecined FILM rate sources.

720p broadcasts of TV shows are double rate hard telecined FILM sources. Such a waste of bandwidth! Only 4 of every 10 frames are actually unique! I am not sure if there is a way to reduce back to the actual progressive stream with Handbrake in that case (720p broadcast) or not. I use avisynth and tell it to throw away every other frame first and then delete every 5 frame after that. (You didn't ask about this, but thought you might be interested in info.)


----------



## larrs (May 2, 2005)

If you have been following this thread hoping to find a definitive answer for a guide to video encoding fo the tivo, I have bad news to report: it appears I am back a few squares.

It seems the method described to encode mpeg2 anamorphic videos does not fully work. by setting the parameters to 720X480 with no anamorphic, the Tivo is fooled into thinking this is a 4X3 video and plays as such using tivo desktop. I found this quite by accident with a video that was 1.85:1 rather than 2.35:1. If the tivo is on "full", it will appear it is correctly displayed if it is a 2.35 movie, but the 1.85 will have large black bars much like a 2.35 aspect movie.
Additionally, on the computer, VLC gives an error that the format is not recognized and it will play also thinking the video to be 4X3.

More play time coming.


----------



## jcthorne (Jan 28, 2002)

That was the basis of my earlier comments about the greater than 480i video aspect bug in the series 3 units.

640x480 is fine, 1280x720 exact is fine. Anything else in between falls into the crack. For 720x480 anamorphic or 720x576 anamophic (PAL) DVD, I always upconvert to 1280x720 full frame with the black bars hard coded. Does not take up much space in a h264 file. Then they play perfectly. The other option was to downconvert to 640 but I did not want to loose what was there. Tivo also does not handle anamorphic h264 video gracefully but I have not pinpointed the bug range there, just do not encode anamorphic video. IE I always encode with PAR = 1:1


----------



## moyekj (Jan 24, 2006)

jcthorne said:


> Tivo also does not handle anamorphic h264 video gracefully but I have not pinpointed the bug range there...


 So is that still the case with Premiere as well?


----------



## jcthorne (Jan 28, 2002)

Really cannot answer for the Premiere. I seldom play with DVD sourced video any more and HD video is almost never anamorphic encoded. My comments were only valid for the Series 3 units. Have not sent the Premiere an anamorphic h264 video.


----------



## larrs (May 2, 2005)

moyekj said:


> So is that still the case with Premiere as well?


I am working with a Premiere, so the answer appears to be yes. And, I would likely not be playing with SD mpeg files either if I didn;t already ahve a boatload that I want to save space on...

I did find out however, that one can set Handbrake to Strict anamorphic, but set the custom cropping to "zero" on all sides and it seems to work fine with my test files and plays fine in VLC. Will try an entire video tonight and make sure. This also seems to eliminate the need to mark the video as "web optimized".

*On another note, I found you can put two soundtracks in the file (5.1 and AAC stereo) and it plays in 5.1 on streambaby and stereo using TivoDesktop (which will not play mp4s with 5.1). However, interesting bug here, TDT will only transfer exactly 1/3 of the file before failing. Doesn't matter if the file is 10 mins or 10 hours....interesting.*


----------



## larrs (May 2, 2005)

jcthorne said:


> That was the basis of my earlier comments about the greater than 480i video aspect bug in the series 3 units.
> 
> 640x480 is fine, 1280x720 exact is fine. Anything else in between falls into the crack. For 720x480 anamorphic or 720x576 anamophic (PAL) DVD, I always upconvert to 1280x720 full frame with the black bars hard coded. Does not take up much space in a h264 file. Then they play perfectly. The other option was to downconvert to 640 but I did not want to loose what was there. Tivo also does not handle anamorphic h264 video gracefully but I have not pinpointed the bug range there, just do not encode anamorphic video. IE I always encode with PAR = 1:1


OK, I broke down and read the online guide to MeGUI and am giving it another try. However, how do you get from 720X480 to 1280X720? (EDIT- OK, I found it has to be set in the script box- then I lost it the next time I tried it then found it again...man this is not intuative)

EDIT 2: I can see a difference easily between 480 and 720. 720 looks better. Now this could be the different encoders between the two, but it looks good- seconded by my daughter.

I'll try your method. Are you keeping DD5.1 audio?


----------



## jcthorne (Jan 28, 2002)

larrs said:


> OK, I broke down and read the online guide to MeGUI and am giving it another try. However, how do you get from 720X480 to 1280X720? (EDIT- OK, I found it has to be set in the script box- then I lost it the next time I tried it then found it again...man this is not intuative)
> 
> EDIT 2: I can see a difference easily between 480 and 720. 720 looks better. Now this could be the different encoders between the two, but it looks good- seconded by my daughter.
> 
> I'll try your method. Are you keeping DD5.1 audio?


Yes, I mux them with ac3 5.1 only. Likely what you are seeing is better quality upconversion during your encode than the tivo does on the fly.


----------



## txporter (Sep 18, 2006)

This is odd. I don't understand how the aspect ratio display issue is occurring. I transcode all of my DVD rips to 720x480 (16:9 or 4:3) using avisynth/x264 and I don't see these problems on TivoHD or Tivo Premiere.

@larrs - A DVD video (480i) that is upsized to 720p cannot actually look better than the original. You cannot create data that isn't there. It is possible that whatever filtering that you have done is more pleasing to your eyes, but you should be able to do that at 480p as well. The other possibility is the upsize done by the TV is worse than that done by software. In that case, potentially you could see some visual benefit.

This is my batch file for transcoding DVD rips (16:9) to mp4:

```
:LOOP
FOR %%A IN (*.mpg) DO (
IF NOT EXIST "%%~nA.avs" ((
  ECHO setmtmode(5,0^)
  ECHO MPEG2Source("%%~nA.d2v",cpu=3^)
  ECHO setmtmode(2^)
  ECHO TFM(^)
  ECHO TDecimate(^)
  ECHO RemoveGrain(1^)
  ECHO setmtmode(5^)
  ECHO FFT3Dgpu(mode=1,precision=2,bw=48,bh=48,ow=16,oh=16,sigma=1,sharpen=0.5^)
  ECHO TextSub("%%~nA.srt"^)
  ECHO #Vobsub("%%~nA.idx"^)
) > "%%~nA.avs"
) )

SHIFT
@if %1X==X goto END
@goto LOOP

:END 

setlocal
set mp4creator="C:\Hcenc\mp4creator.exe"
set mp4box="c:\hcenc\mp4box.exe"
set dgindex="C:\HCenc\dgindex.exe"
set eac3to="C:\HCenc\eac3to\eac3to.exe"
set cc="C:\Program Files (x86)\CCExtractor\ccextractorwin.exe"
set x264="C:\hcenc\x264.exe"

mkdir output

FOR %%A IN (*.mpg) DO (
%dgindex% -IF=[%%A] -FO=0 -OF=[%%~nA] -HIDE -EXIT

%cc% %%A -o %%~nA.srt
copy c:\hcenc\style.txt %%~nA.srt.style

%eac3to% %%A %%~nA.m4a -down2 -quality=0.5


%x264% --crf 19 --tune film --keyint 48 --sar 40:33 -o %%~nA.264 %%~nA.avs 2>%%~nA.log
%mp4box% -add %%~nA.264:fps=23.976:par=40:33 -add %%~nA.m4a "%%~dpA\output\%%~nA.mp4"

del *.txt
del %%~nA.avs
del %%~nA.ac3
del %%~nA.d2v
del %%~nA.264
move %%A I:\Originals\
)
```
Obviously, you will need a few different programs to get this to work. For the most part you can work out what is needed from the script, but ping me if you want to try it and have questions. I use VideoRedo to convert the DVD rips to single mpg files first and then run this script on whatever files are in the directory.


----------



## larrs (May 2, 2005)

txporter said:


> @larrs - A DVD video (480i) that is upsized to 720p cannot actually look better than the original. You cannot create data that isn't there. It is possible that whatever filtering that you have done is more pleasing to your eyes, but you should be able to do that at 480p as well. The other possibility is the upsize done by the TV is worse than that done by software. In that case, potentially you could see some visual benefit.
> QUOTE]
> 
> I know this is the case, however, it easily looks better, so I am betting on it being the upconversion being done better by the software. After all, the best upconverters are due to software used.
> ...


----------



## Stuxnet (Feb 9, 2011)

Novice here... just when I thought I had a handle on moving DVDs to my TP... Here's my process...

1.Rip full DVD (std DVD, not BR) ... 5-10 minutes
2.Run VOB2MPG (no conversion) ... 5-10 minutes
3.Push MPG w/pyTiVo (icldg MetaGenerator) 

Am I losing something here? I thought this achieved transfer without conversion/loss...


----------



## txporter (Sep 18, 2006)

Stuxnet said:


> Novice here... just when I thought I had a handle on moving DVDs to my TP... Here's my process...
> 
> 1.Rip full DVD (std DVD, not BR) ... 5-10 minutes
> 2.Run VOB2MPG (no conversion) ... 5-10 minutes
> ...


You are losing nothing. Your process is lossless. We basically moved off from true archival to visibly lossless compression with h.264 codec transcoding.


----------



## larrs (May 2, 2005)

txporter said:


> You are losing nothing. Your process is lossless. We basically moved off from true archival to visibly lossless compression with h.264 codec transcoding.


A lot is to be said for leaving it alone. One gets 5.1 sound on all methods of transfers and anamorphic handled properly with no hoops to jump through- nevermind it takes minutes instead of hours.

In fact, as I now have a spiffy 8TB RAID array, I am in no hurry to reduce the sizes of my files. However, I will be doing so slowly just to have fun playing with it.

Which leads me to another question for the experts using .h264: I checked the first batch of my files and I have a mixture of 30i and 24p SD material. I am interested in framerates used, deinterlacing, detelecine and noise reduction filters (i.e. those used in Handbrake) for each of these cases.

As always, thanks for the input.


----------



## txporter (Sep 18, 2006)

larrs said:


> A lot is to be said for leaving it alone. One gets 5.1 sound on all methods of transfers and anamorphic handled properly with no hoops to jump through- nevermind it takes minutes instead of hours.
> 
> In fact, as I now have a spiffy 8TB RAID array, I am in no hurry to reduce the sizes of my files. However, I will be doing so slowly just to have fun playing with it.
> 
> ...


Are you using MediaInfo to determine whether or not you have 30i or 24p SD material? If so, that simply looks at the header to the video files to see what the container say its framerate is. Most DVDs are telecined 24p material, but depending on how they were treated before mastering, they can be marked as either 24p with pulldown or 30i.

The best way to truly determine what sort of stream you have is stepping through the video and using your eyes. This method helps make it a little easier to determine when stepping through the video.

I use a program called DGIndex to index my mpegs before feeding to avisynth. At the bottom of the file that is output from DGIndex (video_filename.d2v) is a number that shows you the percentage of frames that are VIDEO or FILM. FILM is progressive, VIDEO is generally interlaced (it is possible to have a progressive video that is hard telecined, which shows up as interlaced). Regardless of the percentage that is spit out, stepping through the video will give you your answer.

If you are interested in delving into filtering, deinterlacing, etc, you really should start learning to use avisynth. There is really NO comparison with what you can do with it and what is available with Handbrake. I believe that MeGUI is a frontend that uses avisynth+x264. I have never used it, so I can't really tell you. I have played around with XVID4PSP in the past. It is a GUI that will take a video input and build a avs script for you and then send it to an encoder. It has a lot of options for filters.

Here is a site where an avisynth user did a lot of comparisons of some of the available filters. It is an interesting place to start to get a handle on what can be accomplished and how things compare. When it all comes down to it, you will need to tinker, play, tweak until you find something that you like. It will probably be different for different videos.


----------



## dlfl (Jul 6, 2006)

Wouldn't gspot provide some useful info, perhaps a little easier to start out with than avisynth?


----------



## txporter (Sep 18, 2006)

Gspot will give you a better feel for the framerate since it actually runs through the file rather than just looking at the header. Not sure how good it is at determing pulldown video vs interlaced. It IS better than just using MediaInfo though.

When it comes down to it though, nothing short of looking through the video will give you the correct answer. Especially when you start dealing with ABC broadcast shows that start dropping frames to shorten playing time (which results in blends when they transcode their own 720p feed to 1080i here in Texas), or PAL originated shows filmed at 25p and then broadcast at 30i here (again with blends) or even worse anime.


----------



## larrs (May 2, 2005)

txporter said:


> Gspot will give you a better feel for the framerate since it actually runs through the file rather than just looking at the header. Not sure how good it is at determing pulldown video vs interlaced. It IS better than just using MediaInfo though.
> 
> When it comes down to it though, nothing short of looking through the video will give you the correct answer. Especially when you start dealing with ABC broadcast shows that start dropping frames to shorten playing time (which results in blends when they transcode their own 720p feed to 1080i here in Texas), or PAL originated shows filmed at 25p and then broadcast at 30i here (again with blends) or even worse anime.


I _*WAS*_ using MediaInfo, but it looks like I will be changing. Also, I have gravitated toward MeGUI because it uses DGIndex to run through the video before encoding and sets the framerate much better than Handbrake. It also uses AVisynth, but puts a nice GUI on the front end, which I like.

For example, I cut a small portion of a movie to use for testing- 200MB. With Handbrake, there were two portions of the video that stuttered every time I encoded it no matter which filters, parameters, etc I used. These were not there on the original mpeg2 file. However, with MeGUI, running it through indexing then encoding, the stutters were not there, so I suspect it is a framerate issue that the indexer takes care of. Is this a correct assumption?


----------



## jilter (Oct 4, 2002)

jcthorne said:


> So to sum up, its actually very easy to transfer a DVD/BR to a server and have it available for the tivo. We do not own a DVD or BR drive other than the ones in our laptops. ALL video is presented by the Tivo.
> 
> *My workflow is DVDFAB - MeGUI - pytivo. * I only deal with subtitles once in a blue moon though and then I have MeGUI encode them into the video. This effects very few titles.
> 
> You are building mp4 files with .h264 video and ac3 5.1 DD audio. Use full resolution of the source, let x264 handle the bitrate with a crf of about 19 for HD.


Hi.
I have a question:
Is DVDFab necessary if you are using meGUI?

thanks!


----------



## tfratzke (Jul 11, 2003)

This is the combo i use.
AVS Video Converter and AnyDVD HD.
No, neither of these options are free, but i had gotten so tired of messing around with all of the free options and failing, and i recently discovered AVS Video Converter, it works perfectly.
You can rip to tons of different formats, mp4, mkv, avi, mpg, etc, all right with a single click directly from the Blu Ray. (no need to rip blu ray to HDD first)AVs will also handle subtitles. Lots of customization options, but honestly i have had great success with built in presets.

Worth checking out IMO.


----------



## jcthorne (Jan 28, 2002)

jilter said:


> Hi.
> I have a question:
> Is DVDFab necessary if you are using meGUI?
> 
> thanks!


Yes, meGUI does not rip dvds.


----------



## larrs (May 2, 2005)

tfratzke said:


> This is the combo i use.
> AVS Video Converter and AnyDVD HD.
> No, neither of these options are free, but i had gotten so tired of messing around with all of the free options and failing, and i recently discovered AVS Video Converter, it works perfectly.
> You can rip to tons of different formats, mp4, mkv, avi, mpg, etc, all right with a single click directly from the Blu Ray. (no need to rip blu ray to HDD first)AVs will also handle subtitles. Lots of customization options, but honestly i have had great success with built in presets.
> ...


I used it at trial a couple of years ago and didn't really like it. However, I am not opposed to paying for a tool that does what I want to do- so I'll take a look again.

The funny thing about this is I am really trying to do my own Kaliedescape type system using 5 tivos as extenders and an 8TB Server. Even if I pay for a few tools, I cannot possibly approach the cost of a Kaliedescape...

Tivo would be really smart to rework tivo desktop to properly handle more video formats and to stream from box to box (getting around the copy codes). This would make it a much more pwerful tool.

Stepping on the soabox-
Heck, there are times I have thought about replacing all of the Tivos except one and using media extenders. I can always move what I want to watch to the PC and then stream to the extenders and eliminate all monthly fees (what I watch via TV is almost all set as copy freely). However, my cable co is all digital so I would still need a box on every TV at a cost of $7 per month and Tivo is a much better box for me. 
Getting down from soapbox-


----------



## tfratzke (Jul 11, 2003)

larrs said:


> I used it at trial a couple of years ago and didn't really like it.


I too tried it a few years back and did not like it at all. The newest version is much improved, in fact, i'd say great.

I totally agree with you about making Tivo Desktop handling more video formats and can totally understand your consideration of looking at other media solutions. Especially now with all of these set top boxes (WD Live, Boxee, Roku) heck even the consoles can do most of what Tivo can, minus record TV. But for me, i'm still not willing to dump my cable and give up the beauty of the Tivo interface.


----------



## orangeboy (Apr 19, 2004)

tfratzke said:


> ...But for me, i'm still not willing to dump my cable and give up the beauty of the Tivo interface.


What does one have to do with the other? I have 3 TiVos, and no cable.


----------



## larrs (May 2, 2005)

orangeboy said:


> What does one have to do with the other? I have 3 TiVos, and no cable.


Most likely 4 letters...E..S..P..N.


----------



## larrs (May 2, 2005)

tfratzke said:


> This is the combo i use.
> AVS Video Converter and AnyDVD HD.
> No, neither of these options are free, but i had gotten so tired of messing around with all of the free options and failing, and i recently discovered AVS Video Converter, it works perfectly.
> You can rip to tons of different formats, mp4, mkv, avi, mpg, etc, all right with a single click directly from the Blu Ray. (no need to rip blu ray to HDD first)AVs will also handle subtitles. Lots of customization options, but honestly i have had great success with built in presets.
> ...


OK I dl'd a test version and it looks alot slicker than I remember. However the audio options on mpeg 2 files are stereo only. That's a deal breaker for me.


----------



## txporter (Sep 18, 2006)

larrs said:


> For example, I cut a small portion of a movie to use for testing- 200MB. With Handbrake, there were two portions of the video that stuttered every time I encoded it no matter which filters, parameters, etc I used. These were not there on the original mpeg2 file. However, with MeGUI, running it through indexing then encoding, the stutters were not there, so I suspect it is a framerate issue that the indexer takes care of. Is this a correct assumption?


Sorry, I haven't been on in a while. It's hard to say what exactly the problem was/is. I always use DGIndex to index my mpg for encoding. It works very well and don't recall any problems with stuttering when using it. I would stick with it. Handbrake is handy in that it allows folks that really don't want to delve too deeply into video conversion a way to transcode videos to h.264. I used to use it when I first started, but ever since learning avisynth, I don't think I could ever go back. I think you will be happy with your choice of MeGUI. I haven't personally used it, but I have read a lot of folks that swear by it.


----------



## larrs (May 2, 2005)

I am currently set on leaving DVD material in Mpeg2. As cheap as storage is, I cannot see dealing with the difficulties inherent in conversion to .h264.

For HD, I have been experimenting with conversion to 720p mpeg2 with decent success. It allows me to keep 5.1 audio for streambaby, pyTivo (push and pull) and Tivo desktop. let's say I start with a movie recorded from TV. I can use tsmuxer to convert to a Blu Ray Disc format with 1080 at somewhere around 20GB. I then use BD rebuilder to take the file from 20+GB to 8.5 (DVD-9) and then convert with VideoRedo back to 720p mpeg2. I end up at about 6GB for HD with full 5.1 Dolby Digital and it will literally play on anything. Or, I can keep the 1080 at 8.5GB.

otherwise, I can convert with MeGUI to .h264 and keep 5.1 if I use streambaby or push the file with pyTivo. However, if I want to use tivo desktop I have to convert audio to stereo.


----------

