Kodi Community Forum

Full Version: Handbrake settings for DVD encoding to MKV (h.264 + AC3 or DTS)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I've been using XBMC for several months for movie rips encoded by others. I'm now starting the task of encoding my DVD collection to MKV using h.264 video compression and pass through of the existing primary AC3 or DTS audio tracks. The software is easy to use and I'm getting files that seem passable at first, but then seem to have a major flaw.

When I check playback in MPC-HC everything seems to work, though I'll have pockets of dropped frames, usually 10-20, here and there but always at the same location for a particular file (though in different spots from file to file). In MPC-HC, playback will continue through the problem sections. When I import the files into XBMC and play them back, these problem areas seem to choke the player and playback stops and exits back out to the library.

My basic Handbrake settings are Single Pass video, Loose Anamorphic with Automatic Crop, Audio pass through of AC3 or DTS, and target file size of 1.5gb for AC3 or 2gb for DTS audio.

Obviously I'm doing something wrong with my video encoding. Are there any Handbrake settings I need to change, or supplemental codecs or splitters I need to install outside of Handbrake?

Thanks in advance.
I use a constant quality of 20 and the rest on normal setting and get no problems (knock on wood) Also try downloading the latest handbrake version.
I have the latest version. What file sizes are you getting, and using what type of audio?

Thanks!
I'd use constant quality rather than a target file size. I use CQ 19.25 and always keep the original audio (use AC3 or DTS passthru), High Profile but change anamorphic to strict.

My file sizes for movies primarily range from about 1-2 gigs, I'd say average movie is around 1.3 gigs, some are as high as 2.5 gigs and some as low as 900meg with the settings I use.
CQ 60%/RF:20.25 seemed to do the trick and yielded Gladiator with AC3 right at 1.5gb. Any idea why target file size was giving clumps of dropped frames? I'm not burning to disc, so absolute file size accuracy isn't crucial. Storage may be cheap, but I have enough DVDs that even at 2gb each, I could fill a handful of 1 TB drives (and that's before you factor in a TB or two of 720p and 1080p rips).

Thanks guys!
Not sure why but you usually don't want to do single pass with target size, target size is usually done with 2-pass so maybe that had something to do with it.
That sounds like a reasonable explanation. Now I just need to dial in the CQ percentage a little more to decrease some blocking I'm seeing. Thanks again.
IsleOfMan Wrote:That sounds like a reasonable explanation. Now I just need to dial in the CQ percentage a little more to decrease some blocking I'm seeing. Thanks again.

I've found 19.25 to be pretty much transparent to the source DVD on my 55" 1080p DLP and 40" 1080p lcd sets. I've found any lower CQ than that just pretty much makes the file size larger with no benefit.
On my Panasonic AX200u projector on 100" screen at around 14' I'm seeing some blocking, mainly in CG opening title sequences like the Dreamworks clouds, though I'm not seeing much on live action.

Are you using any "Deblock" in the Video Filters? I have it set to off, but I may try varying levels of that depending on any other side-effects. Thanks again.

EDIT: Scratch that, the blocking was specific to Gladiator and in the source (original 2-disc version, will rip the BD when I get a BD drive).
IsleOfMan Wrote:On my Panasonic AX200u projector on 100" screen at around 14' I'm seeing some blocking, mainly in CG opening title sequences like the Dreamworks clouds, though I'm not seeing much on live action.

Have you verified you don't see the blocking when using the source?

IsleOfMan Wrote:Are you using any "Deblock" in the Video Filters? I have it set to off, but I may try varying levels of that depending on any other side-effects. Thanks again.

I've never enabled deblocking. For a preset I use Regular, High Profile and only adjustment is change anamorphic from loose to strict.

Curious to see your results playing around with deblocking if it has any affect.
I edited right before you posted, but the blocking was in the source (to my surprise). Other than having about 200 discs qued up to be ripped (after major prioritization of my ~ 1000 disc collection), everything is now going well. Thanks again!
I also use the lastest unstable handbrake build find less crashin on encode on BD . My file sizes are usually 2-4gb which is fine for a 1080 blu ray highest is 6gb but still fine )
What are your steps for encoding BD? Will it recognize a decrypted BD source just like it will for a DVD? Or do you have to rip the M2TS first, then re-encode? Thanks!
Be careful with the strict setting and auto crop. It will crop to the exact dimensions without making the dimensions mod8 or mod16. I have found on linux with software render that it will not scale to fit the screen even though XBMC says that it is. Its about 10 or so pixels short of the full screen.

If you use VDPAU render it will scale properly to fit the screen.

I use 2 pass encoding even though it is longer since it will result in a smaller file size.

I also change the high profile parameters a bit, and use

Motion estimation: uneven-hexagon
Subpixel motion estimation: 9
No-fast-pskip
Trellis: 2
Analysis: all
Pyramidal B-frames: yes

I turn-on decomb also

Also as mentioned above, consider using the development releases at
http://handbrake.fr/snapshot.php
I primarily use the CLI version of Handbrake but I know that these translate to settings in the GUI. Here is the video related settings that I use:
-e x264 -x ref=3:mixed-refs=1:bframes=3:me=hexConfusedubq=7:b-adapt=2:weightb=0:trellis=0:weightp=0 -q .62

This creates a version that is hard to tell from the original DVD. I also use AC3 passthrough with a Dolby Pro Logic II mixdown as a second audio track for watching on devices that don't decode AC3. My movies come out between 1.3G and 2.0G. Depends on the length of the movies (of course)
Pages: 1 2