Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

roidy

macrumors 65816
Dec 30, 2008
1,027
22
Nottingham, UK
I just assumed that the OP was encoding from a Blu-ray rip and that when he said the source file was only 13GB that it was from the internet and had already been compressed. We really need to know from the OP what his source is and weather it's been re-encoded already.

A HDDVD rip is going to be smaller that a Blu-ray rip simply because the physical disk holds less data, 15/30GB for HDDVD vs 25/50GB for Blu-ray. Early HDDVD films were more heaverly compresed to fit on a cheaper single layer disk. I have yet to see a Blu-ray rip thats under about 18GB.

I agree the Handbrake encoder does a wonderful job of deciding which areas of a file need more or less bitrate, but you've still gotta give the encoder a fighting chance by setting a sensible bitrate/CQ to start with. Set it too low and I don't care how good the encoded is your gonna get poor results. Until we know the bitrates of the OP's source and final output files we're just guessing as to his problem.

The smallest HD encode I have has a bitrate of 4600kbps and a file size of 4.13GB. I would never go any lower than that because the results just don't look as good, but thats just my own personnal preference:)
 

NightStorm

macrumors 68000
Jan 26, 2006
1,860
66
Whitehouse, OH
I just assumed that the OP was encoding from a Blu-ray rip and that when he said the source file was only 13GB that it was from the internet and had already been compressed. We really need to know from the OP what his source is and weather it's been re-encoded already.
Agreed; a copy of the activity log would go a long way (and is why we require one on the Handbrake forums).

A HDDVD rip is going to be smaller that a Blu-ray rip simply because the physical disk holds less data, 15/30GB for HDDVD vs 25/50GB for Blu-ray. Early HDDVD films were more heaverly compresed to fit on a cheaper single layer disk. I have yet to see a Blu-ray rip thats under about 18GB.
This could be true, if the studio actually took the time to go back and re-encode from the master for the Bluray release. Unfortunately, I've seen quite a few examples where they simply reused what they had already produced for the HDDVD release and left the majority of the disc empty.

I agree the Handbrake encoder does a wonderful job of deciding which areas of a file need more or less bitrate, but you've still gotta give the encoder a fighting chance by setting a sensible bitrate/CQ to start with. Set it too low and I don't care how good the encoded is your gonna get poor results. Until we know the bitrates of the OP's source and final output files we're just guessing as to his problem.
I would never suggest using ABR with any source, except maybe old concert footage. Using a lower RF value will always get to better quality, but if you set it too low, you'll continuously (and frankly unnecessarily) hit the VBV limits.

The smallest HD encode I have has a bitrate of 4600kbps and a file size of 4.13GB. I would never go any lower than that because the results just don't look as good, but that just my own personnal preference:)
That is what is both great and maddening about video encoding... what looks great to you can look like complete crap to someone else. But in the end, it's really all about how it looks to you and the compromises you've chosen to make (speed, quality, size). Given the limitations on the playback device (AppleTV), bandwidth (streaming via 802.11n), and my output device (46" 720p DLP), I'm content with the settings that I'm using. :)
 

roidy

macrumors 65816
Dec 30, 2008
1,027
22
Nottingham, UK
That is what is both great and maddening about video encoding... what looks great to you can look like complete crap to someone else. But in the end, it's really all about how it looks to you and the compromises you've chosen to make (speed, quality, size). Given the limitations on the playback device (AppleTV), bandwidth (streaming via 802.11n), and my output device (46" 720p DLP), I'm content with the settings that I'm using. :)

Agreed, when I started out doing my first encodes I'd spent hours encoding a chapter of a movie then tweaking a setting and encoding it again just to get it perfect. But after awhile there comes a time when you just have to accept it's never gonna be 100% perfect and you have to stop tinkering. Luckly the current ATV preset gives you a really good starting point to experiment from. Even before tweaking the ATV preset given the right CQ setting it's hard to tell the difference between an encode and a regular DVD.
 

Number6

macrumors member
Original poster
Jul 29, 2008
47
1
Umm... The fact that your original 1080p source file is only 13.23Gb means it's already been heaverly compressed to start with so getting a good re-encode from it may be difficult, plus 2.63Gb for a encoded HD movie seems very small to me. Use 'Get info' in iTunes to see what the actual bitrate for the file is. iTunes purchased HD content usually has a bitrate of about 4500kbps, all of my HD encodes have a bitrate of about 6000-6500kbps. Looking at your file size I think your bitrate maybe too low. Post all the settings your using.

Sorry I wasn't specific enough, here's what I know: the 13,23 GB file is a re-encoded Blu-ray rip and in Quicktime (with Perian installed) it shows to have a data rate of 13,87 Mbit/s. My iTunes encode has a total bit rate of 2749 kbps - quite a difference!
I also checked the nfo that came with the mkv and it has some info which I cannot interpret but maybe it is of help to you guys:

Size: 12.3GB (DVD9+DVD5)
Runtime: 2:07:06
Res: 1920x1040
Codec: x264, 2pass - L4.1
Bitrate: 12364 Kbps
Audio: DTS 5.1 1.5Mbps, English
Subtitles: English (SRT)

avis [info]: 1920x1040 @ 23.98 fps (182841 frames)
x264 [info]: using cpu capabilities: MMX MMXEXT SSE SSE2 SSE3 3DNow!
x264 [info]: slice I:3146 Avg QP:15.66 size:255681
x264 [info]: slice P:116112 Avg QP:17.73 size: 89273
x264 [info]: slice B:63583 Avg QP:22.14 size: 9684
x264 [info]: mb I I16..4: 0.6% 99.1% 0.4%
x264 [info]: mb P I16..4: 0.0% 7.2% 0.0% P16..4: 46.7% 31.3% 14.3% 0.0% 0.0% skip: 0.5%
x264 [info]: mb B I16..4: 0.0% 0.2% 0.0% B16..8: 11.9% 1.0% 1.6% direct: 1.3% skip:84.1%
x264 [info]: 8x8 transform intra:99.5% inter:90.5%
x264 [info]: direct mvs spatial:98.2% temporal:1.8%
x264 [info]: ref P 64.7% 17.7% 10.6% 7.0%
x264 [info]: ref B 77.2% 16.2% 6.6%
x264 [info]: kb/s:12363.8

encoded 182841 frames, 2.34 fps, 12364.27 kb/s

My Handbrake settings for this encode were the same as yours roidy, at least the advanced settings that you posted. My main video settings are the ones from the Apple TV preset of the nightly build svn3293 x86_64 (2010051301), as Night Storm suggested. Only the resolution was raised to 1280x(in this case)688. The constant quality is left untouched at RF 20. The percentage counter seems to be gone.

I'm sorry but I cannot locate any log files from my encodes. Where would these be?

I would be interested in how you achieve the higher bitrates and larger file sizes that satisfy you. Do you set an average bitrate and if so, which one? You wrote that your encodes have an average bitrate of 6000-6500kbps. Isn't that asking for trouble since Apple states "Up to 5 Mbps" in the Apple TV video specs? Is it possible to push that limit?

Of course I am still thinking about my initial stutter problems regarding this.

Ironically I seem to have more problems the higher quality my source is. The best looking encodes seem to come from rather small mkv's to begin with. I have a Blu-ray drive and for months I have tried to encode some of my own discs with horrible results. Sometimes Handbrake states "no valid source found" when I load an uncompressed mkv or ts. I does not make any difference wether it was created with makemkv on the Mac side or AnyDVD HD+tsMuxeR on the Windows side :eek: Go figure...

Thanks again for all the helpful input from all of you guys!
 

Number6

macrumors member
Original poster
Jul 29, 2008
47
1
Agreed, when I started out doing my first encodes I'd spent hours encoding a chapter of a movie then tweaking a setting and encoding it again just to get it perfect. But after awhile there comes a time when you just have to accept it's never gonna be 100% perfect and you have to stop tinkering. Luckly the current ATV preset gives you a really good starting point to experiment from. Even before tweaking the ATV preset given the right CQ setting it's hard to tell the difference between an encode and a regular DVD.

Just a quick addition. I believe I've been in this tinkering phase for quite some time now. The only problem is that I cannot let go (yet) :D
 

roidy

macrumors 65816
Dec 30, 2008
1,027
22
Nottingham, UK
Sorry I wasn't specific enough, here's what I know: the 13,23 GB file is a re-encoded Blu-ray rip and in Quicktime (with Perian installed) it shows to have a data rate of 13,87 Mbit/s. My iTunes encode has a total bit rate of 2749 kbps - quite a difference!
I also checked the nfo that came with the mkv and it has some info which I cannot interpret but maybe it is of help to you guys:

........

The fact that the source has already been compressed may be why your having problems getting a good quality encode from it, I would try decreasing the RF value (remember that decreasing the RF actually increase the quality), aim for a bitrate of about 4000kbps minimum.

Recent versions of Handbrake now have the ability to encode a section of a file between a start and end time. I would play your encoded file and make a note of the time at which one the the low quality parts is then encode again from your source file using a start and end time of about 30 seconds before and after the problem part. This way you can do multiple encodes with different RF values to see if the quality increses and the encodes wont take long to do.

I would be interested in how you achieve the higher bitrates and larger file sizes that satisfy you. Do you set an average bitrate and if so, which one? You wrote that your encodes have an average bitrate of 6000-6500kbps. Isn't that asking for trouble since Apple states "Up to 5 Mbps" in the Apple TV video specs? Is it possible to push that limit?

First never use average bitrate as it's very wasteful. Getting a higher bitrate is as simple as lowering the RF value. Don't worry too much about the apple specs, I have files of 6500kbps that play fine and I think I read somewhere that the opening movie that plays when you first turn on your ATV has a bitrate of about 10000kbps and that plays fine:) The most important thing is too keep your peek bitrate under control and thats what the vbv-maxrate and vbv-bufsize options are there for.

Of course I am still thinking about my initial stutter problems regarding this.

After see that your output file only has a bitrate of 2749kbps then I can't see that being the source of your stuttering problem. Are you using 'same as source' for your Handbrake fps setting, some people have better luck forcing a framerate, so for your file you could try setting it to 23.976 and see if it helps, I've never had any problem using 'same as source' but some people report that forcing a framerate solves there stuttering problem.
 

Number6

macrumors member
Original poster
Jul 29, 2008
47
1
Recent versions of Handbrake now have the ability to encode a section of a file between a start and end time. I would play your encoded file and make a note of the time at which one the the low quality parts is then encode again from your source file using a start and end time of about 30 seconds before and after the problem part. This way you can do multiple encodes with different RF values to see if the quality increses and the encodes wont take long to do.

That was good advice as I was already tempted to try the complete file a fourth time. I took only the worst part (the one with the "busy" walls) and encoded it several times going from an RF value of 20 down to 16 with several steps in between. The data rate increased, as you said it would but the artifacts remained no matter how high the data rate went.

I also tried a 2-pass encode set at 5500kbps average bitrate just for the fun of it and that brought back the stutter (all files were streamed), although I did not change the other settings regarding limiting peak bitrate etc. Still it did not improve the walls.

I'm just gonna give up on that one but this was still a very interesting experiment. At RF 17 the data rate was similar to what I get from the iTunes store with HD material and I will encode some better source files in that way now. Hopefully some Blu-rays that have been giving me problems will work with the new settings...
 

roidy

macrumors 65816
Dec 30, 2008
1,027
22
Nottingham, UK
At RF 17 the data rate was similar to what I get from the iTunes store with HD material and I will encode some better source files in that way now. Hopefully some Blu-rays that have been giving me problems will work with the new settings...

Be aware that the data rate for a small 30 second segment of a film wont nesseceraly be the same as for a whole film. For example:-

Lets say you encode a full film with a RF of 20 and you get a bitrate of say 4000kbps.

Now if you just encode a small 30 second protion of the film using a RF of 20 then if that section of film contains hardly any detail like a nightime scene, the resulting bitrate may be really low like only 1000kbps. However if the 30 section contains lots of details then the bitrate will be much higher. Thats how CQ encoding works it gives more bitrate to the areas of the film that need it.

My point is you can't rely on the bitrate of a small section of film to give you the overall bitrate for the whole film:)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.