BluRay backup/Handbrake issues

Joined
Oct 8, 2011
Messages
34
Anyone having problems with the newest version of Handbrake? (0.9.8) I'm trying to back up my BluRays to an MKV file format, and encoding was stopping maybe 2% in.

I went back to an older version (0.9.5) and it seems to be encoding properly, but it is going extremely slow.

I remember my previous Core i5 2500K build encoding much faster, slightly faster than realtime in fact, but now I'm averaging 17fps, or about three hours for a two hour movie.

Does anyone have any recommended settings? I wish I could remember my custom preset from my last build, but I don't remember changing much from default. Just the container used, the quality, and the audio stream.

Source and destination drives are different physical drives. Source is a 5400rpm drive, destination is an SSD. Process priority is set to Above Normal. Input file is an .m2ts file, approximately 35gb in size.

I can't fathom why my encode times are so slow, and what the issue is with the latest version.
 
I've been using the latest with no problems. Core i7-930. I don't have an SSD and the source and destination are the same drive. Perhaps it has a problem with one of those things.
 
I went ahead and downloaded the latest "nightly build," and despite crashing the first time opening, I was able to encode my copy of Dark Knight Rises at nearly 100fps. The output is just under 9 gb, full 1080p, DTS Passthru audio, and looks phenomenal. Maybe it was just a weird fluke, but I'm glad I got it working. I know nightly builds are frequently unstable, but I'll stick with this. I also switched from a constant quality setting to an average bitrate setting, although I may increase the bitrate a little. I have it at 6,000kbps. I'd be happy with a 12-15gb file. I'm more concerned about quality than file size.

I also apologize if this topic is against any forum rules, but I can assure everyone, my intentions are to have personal digital copies of legally purchased BluRays.

Anyone else use Handbrake, and care to share some recommended settings?
 
OK, let's start.

First, i would say to use Vidcoder x64 instead of Handbrake. Vidcoder is based on Handbrake and uses the handbrake CLI, but it's better and stable. You need to have NET Framework 4 or higher installed.

Now, there are 3 factors when you encode: quality, size and speed. You can't have them all... Quality means low speed, but also usually lower size.

A "very good" quality encode should look like that:

- High Profile (always use that for Blue Rays)
- Disable both Decomb and Detelecine (they cut down speed making extra analysis of the source).
- Constant quality: 18 (CRF). This is what most people consider "transparent", meaning they can't tell the difference from the source. Some people go as low as 16. 16 will give more quality (but barely visible or not visible at all), at the cost of higher size and slower speed.
- Preset: Slow (for "excellent" quality, you need to go "Slower" or "Very Slow", as this will add Trellis 2 and raise reference frames. Slow is still "very good".
- Tune: Film


Advanced settings:

- Reference frames: 4 for 1080p. If you do 720p, you can go higher, depending on how the movie is cropped, but 5 should be "very good". Going above 6 is IMHO not worth it. The more ref frames, the higher the quality and slower the speed. Can also in some sources reduce the size a bit.

- Max B-Frames: 5 should be good. If you want max compression, put 6. It's the factor that mostly influences the final size. The more B-frames, the lower the size of the movie. More b-frames slow the encoding though. 3 b-frames shoudl be your minimum value, unless you want to throw away tons of HDD space uselessly, just to encode faster.

- Adaptive B-Frames: Optimal.
- Adaptive Direct Mode: Automatic
- Motion Estimation Method: Uneven Multi-hexagon.
- Subpixel motion estimation: 9 (this is the value that gives the most benefits in the order of quality and speed and takes advantage of all the PSY-RD optimizations done as well as the PSY-RD aware deblocking feature). The lower, the fastest the encode, but lower the quality.
- Motion Estimation Range: 24 for regular movies, 32 for action packed movies, where things move very fast on the screen.
- Partition Type: You can leave it on default for most movies, might help a bit to "ALL" for movies with small, fast moving particles.
- Trellis: Encode Only (default). This uses Trellis 1. "Always" activates Trellis 2, which helps in size a bit, some claim it gives a little bit more quality, but it's much slower. IMHO, it's not worth it, if you have sumbe 9 and Trellis 1 and Tune Film. At least, i can't tell the difference. Trellis 2 will cut something like 200 off the final bitrate and thus size, but the speed hit is too high to worth it.
- Deblocking: Depends on taste. Negative values, sharpen more, but can can introduce blocks or ringing. Higher values, smoothen the picture, eliminating blocks, but also blurring fine detail. If you use Tune Film, the deblocking will be autoset to -1-1. I prefer -2-2. Never go below -3-3. The lower the deblocking, the sharper the picture, but also a little higher bitrate needed, thus size.


Now, the best way to speed things up, is to use the presets. You can use preset "medium" if you find the above too slow. If you find the medium still slow, go for faster. But faster presets, trade speed for lower quality.


I mean, when i saw that you encode at 100 fps, i laughed so hard... I encode at 720p and usually, on a clean source i get about 17 fps with a 1090T. And i use something like:

5-6 ref frames and 5-6 b-frames.

Encoding at 100 fps and calling that "quality" is a joke, no offense intended. There are people that use preset "very slow" or even "placebo" in MeGUI, because what i posted above is still not high enough quality for them.

My advice. If you want to backup your blue rays, encode at 720p. This will help speed up things. At 1080p with good quality settings like the above, you will have to settle for 10 fps if you 're lucky. A bit more if you overclock. But that's how things are. Quality requires time. Most people can't tell the difference between 720p or 1080p with a 40" inch monitor at a reasonable viewing distance. And you save much space and encoding time with 720p. Besides, if for some reason in the future you need absolutely the 1080p version, put your original disk back and re-encode it to 1080p. By that time CPUs will also be more powerful. My encode of "The Dark Knight rises" at 720p, ended up 2,9 GB and i am pretty sure it beats yours in quality hands down.

Also: Clean sources, take less size and encode faster. Grainy or noise sources, take more size and encode slower, because they eat up more bitrate, because of the extra grain.
 
Last edited:
To continue: Viewing the log, you can assess some things about your encode. For example, this is one log of mine:



x264 [warning]: --psnr used with psy on: results will be invalid!
x264 [warning]: --tune psnr should be used if attempting to benchmark psnr!
x264 [info]: using cpu capabilities: MMX2 SSE2
x264 [info]: profile High, level 3.1
x264 [info]: frame I:13 Avg QP:15.15 size:122052 PSNR Mean Y:50.97 U:53.14 V:54.30 Avg:51.67 Global:47.78
x264 [info]: frame P:393 Avg QP:19.45 size: 45520 PSNR Mean Y:51.52 U:54.26 V:55.56 Avg:52.28 Global:45.46
x264 [info]: frame B:1381 Avg QP:20.13 size: 28108 PSNR Mean Y:43.32 U:46.70 V:48.85 Avg:44.26 Global:43.58
x264 [info]:
x264 [info]: mb I I16..4: 14.7% 71.5% 13.8%
x264 [info]: mb P I16..4: 1.4% 13.4% 2.3% P16..4: 28.0% 20.6% 13.4% 1.2% 0.3% skip:19.4%
x264 [info]: mb B I16..4: 0.1% 2.9% 0.3% B16..8: 41.6% 15.8% 6.4% direct: 9.0% skip:24.0% L0:43.9% L1:42.9% BI:13.2%
x264 [info]: 8x8 transform intra:81.5% inter:52.7%
x264 [info]: direct mvs spatial:99.5% temporal:0.5%
x264 [info]: coded y,uvDC,uvAC intra: 93.8% 87.5% 70.5% inter: 47.5% 44.7% 18.2%
x264 [info]: i16 v,h,dc,p: 45% 14% 13% 28%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 9% 8% 5% 11% 15% 13% 15% 11% 13%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 8% 3% 10% 15% 14% 15% 11% 15%
x264 [info]: i8c dc,h,v,p: 48% 22% 14% 16%
x264 [info]: Weighted P-Frames: Y:11.2% UV:8.4%
x264 [info]: ref P L0: 43.1% 12.1% 23.3% 10.6% 9.2% 1.6%
x264 [info]: ref B L0: 72.4% 19.9% 5.9% 1.8%
x264 [info]: ref B L1: 91.3% 8.7%
x264 [info]: SSIM Mean Y:0.9664094 (14.738db)
x264 [info]: PSNR Mean Y:45.180 U:48.407 V:50.367 Avg:46.076 Global:43.948 kb/s:6257.01


CRF values, influence the average QP (quantizers) for P,I, B-frames. Lower quantizers, mean better quality usually and lower CRF, ends up with lower quantizers. B-frames are paramount in reducing an encode's size, exactly because they are smaller frames, which though, give the same quality but with higher quantizers. So the more b-frames you put, the more quality you pack in smaller size, but at the cost of speed hit.

So avg QP of b-frames is higher than P, but B-frames are made in such way that they look as if they were P-frames of lower quantizers. Usually your avgQP for P frames should be between 18 and 20. This in conseguence, should lead to QP for B-frames between 20 and 22. when you see these values, you are usually certain enough that you got a good quality, provided the rest of your settings were "high quality".

. Looking at the max consecutive B-frames:

consecutive B-frames: 3.7% 1.3% 2.9% 12.3% 30.2% 49.6%

You can see, that in 3,7% of cases, 0 consecutive were used, in 1,3% 1 consecutive was used and so on. In 49,6% of cases, 5 were used. I had set 5 max. With this particular, 6 would have helped a bit more in size, since when you see high percentage at the end, most probably a 6th frame, would get another 5-10%. But depends on the source. 95% of cases, 5 b-frames will get the most "hits". If the final value was very low, like 5%, it would be waste of time putting 6 b-frames.


direct mvs spatial:99.5% temporal:0.5%

This is the result of "direct auto". If i had left it to default, it would have been 100% spatial. But in this case, auto chose temporal for 0.5%. Which is better, since auto selects the optimal each time.

SSIM Mean Y:0.9664094

This is a measurement of how much the encode is similar to the source. Ideally, you would like 0.99xxx all the time. But this depends much on the source. With very noisy sources, you can easily find yourself to 0.95x. On clean sources, if you are below 0.97x , then you use too low quality settings. A very clean source, should hit upper 0.98 (like 0.9888) easily. Unfortunately, it's not an absolute measurement of quality, since psy-rd (psychovisual features), lower that, while the result is better to the human eye.But SSIM can't "see" the psycovisual enhancements, it's just an algorithm that compares images for similarity, so reduces SSIM instead of increasing it with psychovisual optimization. For this reason, there can't be an absolute quality measurement other than your own eyes. Subme 9 and trellis increase visual quality, working a lot with psycovisual distortion, but this hurts SSIM, although the end result is better to the viewer. However, still, the SSIM should be above 0.97 for clean to medium sources and 0.96 for grainy and 0.95 for very grainy sources.
 
Last edited:
Last note: Usually, the sources that are worth the time spent for 6 b-frames instead of 5, are the grainy or noisy sources, specially if they have small croppable area. On clean sources, the difference in size gain between 5 and 6 b-frames, is neglibile.
 
Hi All,

I have a few questions for encoding the Dark Knight Rises. I'd like to convert this to 720p, but noticed that the entire movie has the black bars on top and the bottom. I set the picture to anamorphic of loose with the width of 1280. On my TV downstairs which is 1080p, it goes to fullscreen after a few minutes into the movie using the Blu Ray disc. Is this because the TV is 1080p, or am I doing something wrong with the encoding.

Also If I run DTS passthrough my Sony net player (SMP-N100) says "Audio format not supported". Does this mean it doesn't have a DTS decoder? In the sound settings for the net player it shows DTS as an option. I've been able to play DTS through my DVDs in the past with my audio system but I am unable to hear anything with the encoded file.

I would appreciate any help.

Thanks
 
Last edited:
Hi All,

I have a few questions for encoding the Dark Knight Rises. I'd like to convert this to 720p, but noticed that the entire movie has the black bars on top and the bottom. I set the picture to anamorphic of loose with the width of 1280. On my TV downstairs which is 1080p, it goes to fullscreen after a few minutes into the movie using the Blu Ray disc. Is this because the TV is 1080p, or am I doing something wrong with the encoding.

Thanks

I don't know how your tv works, but normally, i would expect that a movie with black bars, will be presented also with black bars.

Try in Handbrake settings to do : Anamorphic none, set width to 1280, leave height empty and check "keep aspect ratio". See if this helps. If black bars aren't displayed, there is a chance that the picture is slightly dirtorted, but only you can verify that...
 
I am using the nightly version. It looks different then the current "stable" version. It supports subtitles on Bluray which is why I started using it.

https://build.handbrake.fr/job/Windows/

On my i7-3770 I get about 13-18 FPS when doing Bluray to 1080p MP4. My i7-920 only musters about 8-12 FPS. Thats with Video Codec H.264. I can get about 3 times the FPS if I use Video Codec: MPEG-4 (FFmpeg). But the FFmpeg videos have weird anomolies when played on AppleTV so until I figure out whats going on I don't use it. But I can go from 90FPS on a DVD on my 3770 with H264 to close to 300FPS with FFmpeg, and it doesn't even use all the CPU. Now the caveat to that is that at higher bitrates like 4Mbs(DVD) & 16Mbs(Bluray) that I use you won't see a difference between H264 and FFmpeg, but you go down to like 0.7-1.1Mbs (700kb/s - 1100kb/s) and you will definently see the difference with H264 being less "blocky".
 
Source and destination drives are different physical drives. Source is a 5400rpm drive, destination is an SSD. Process priority is set to Above Normal. Input file is an .m2ts file, approximately 35gb in size.

I wanted to add that drives add very very little if any overhead to the encode speed. It will make a difference when doing a "foriegn audio scan" as that is much more speed dependent, but when it comes to encoding even a DVD/Bluray drive can keep up with the bandwidth (17 FPS of even a 24FPS 30Mb/s bluray still only comes out to about 2-3MB/s.
 
Back
Top