View Full Version : MPEG2 -> H.264 - does a "sweet spot" bitrate exist?
odditory
23rd January 2008, 21:12
I'm running countless tests on MPEG2 (DVD) source material converted to H.264 with Mainconcept Reference, source material being 720x480, 16:9 ratio, and 6Gb of VOBs at 6000kbps bitrate.
I've been outputting H.264 test files at 720x480 / 16:9 / 29.97fps, with bitrates at 1000k, 1500k, 2000k, 2500k, 3000k, 3500k, 4000k, 4500k, 5000k.
I'm really not thrilled with any of the results when comparing to the original (obviously). With the assumption that NO output will ever look the same as the source, my question is if there's a "sweet spot" in terms of bitrate and resolution, or is it completely dependent on source material as I'm thinking.
Or to put the question another way, is it better to drop the resolution before dropping bitrate? or better to drop bitrate before dropping resolution? or a little of both?
My GOAL is to end up with H.264 files that are 50% the filesize of the source material while still 1:1 with source at 720x480, merely to save harddrive space among hundreds of DVD's. At a certain point of A/B comparing different test files for image quality your brain starts to get numb, so I'm hoping someone else has some advice as far as common practices go, i.e. "reducing the bitrate AND resolution by 25% results in better IQ than reducing either bitrate or resolution by 50% alone".
Hope that makes sense!
audyovydeo
23rd January 2008, 22:34
...
I've been outputting H.264 test files at 720x480 / 16:9 / 29.97fps, with bitrates at 1000k, 1500k, 2000k, 2500k, 3000k, 3500k, 4000k, 4500k, 5000k.
...
At a certain point of A/B comparing different test files for image quality your brain starts to get numb,...
I know the feeling, alas.
CRF 18 is generally considered the level where the you cannot tell the difference between source and encoded file.
I'd suggest you do some partial encodes with --crf18, check the results, and if you're satisfied you can then play with the remaining x264 options to achieve greater compression.
One of the things I learned the hard way is that bitrate, in x264, is not necessarily the best indicator of a clip's quality.
search around this forum even on oldish threads.
Also check my own x264 page, where I tried to condense as much scattered info as possible :
http://mapage.noos.fr/manamba/x264/manambas_x264_page.html
(http://mapage.noos.fr/manamba/x264/manambas_x264_page.html)
cheers
audyovydeo
Sagekilla
23rd January 2008, 22:36
Short answer is no, there is no "sweet spot" for video. Each video is unique, no two videos compress exactly the same way (though some are VERY similar) and require varying amounts of bitrate to get "good" quality. If you're looking for good, constant quality, try using crf 18 with x264. I easily end up ripping DVDs @ 1400 kbps using constant quality (crf) and store it with the original AC3 track @ 448 kbps at near identical quality to the source DVD. You can probably manage even better compression @ 720x### (I'm assuming you will crop as well, to cut down on bitrate further) since I encode non-anamorphic @ 864x###.
If you want to see how "good" of quality I get on my encodes, download Dark Shikari's AQ (http://mirror05.x264.nl/Dark/force.php?file=./x264_AQ_RDRC_0.45.exe) build of x264 and use the following settings on a short clip (15 seconds, 30 seconds tops) to see if you like it. Please be aware that the settings used are fairly slow, running at 5-8 fps on my Opteron 170.
x264_aq --level 4.1 --crf 18 --ref 4 --mixed-refs --no-fast-pskip --bframes 16 --bime --weightb --b-pyramid --b-rdo --8x8dct --subme 7 --me umh --trellis 1 --aq-strength 1 --threads auto --thread-input --progress --output "video.264" "source.avs"
pause
Blue_MiSfit
23rd January 2008, 22:38
If you're not thrilled with the quality, it's most likely because you're using the Mainconcept reference encoder. Please use x264, with some of its more advanced features on, and love it!
~MiSfit
Dark Shikari
23rd January 2008, 23:43
If you're not thrilled with the quality, it's most likely because you're using the Mainconcept reference encoder. Please use x264, with some of its more advanced features on, and love it!
~MiSfitAnd of course note that there is no such thing as a "Mainconcept reference encoder"--the reference encoder is JM, not Mainconcept.
cogman
24th January 2008, 00:07
Just want to echo what everyone else is telling you. There is no such thing as a sweetspot bitrate. However, CRF mode does a pretty good job at keeping the quality at a level you expect or are happy with.
My advice would be to encode a small portion of video (using avisynth and x264) and adjust the crf to a level that you like. Personally I find 20 to do a fairly decent job for me, Heck, I've even been satisfied with 21 and 22. You might be different though and so you should be the one that chooses that number.
After you have chosen a good CRF mode, I would say to start playing with the rest of the settings to your hearts content. Personally I like Uber-Ridiculous settings (ESA, 16 ref frames, 16 b frames ect) but the speed drop might not be acceptable to you.
Atak_Snajpera
24th January 2008, 00:28
Personally I like Uber-Ridiculous settings (ESA, 16 ref frames, 16 b frames ect) but the speed drop might not be acceptable to you.
...and someday you will be crying that your PS3 ,XBox360 or other player cannot play this file due to ridiculous number of ref frames :)
odditory
24th January 2008, 00:50
If you're not thrilled with the quality, it's most likely because you're using the Mainconcept reference encoder. Please use x264, with some of its more advanced features on, and love it!
~MiSfit
*roll eyes* -- here we go again with the "anything that isn't x264 sucks" sentiment, as I was pointing out in another thread :) http://forum.doom9.org/showthread.php?t=134034
Aside from the fact the latest Mainconcept H.264 encoder inside of Reference 1.1.1 is quite good relative to x264, my bigger issue is I have hundreds of DVD's I want to send to H.264, so for the sake of argument, taking a slight hit in IQ and not using x264, but being able to use the batching and "watch folder" features of Reference, makes the difference in the project being feasible or not.
I have several 8-core xeon systems ready to crunch 24x7, so I don't care how low the FPS is during encode, but I gotta be able to batch and not have to deal with intermediary files (and demuxing, etc.)
I will try a few x264 based encode just for comparison sake, but so far I haven't found a "one click" x264 based tool the way Mainconcept and Nero each provide in their programs, nor any x264 based GUI that does batch encoding.
Dark Shikari
24th January 2008, 00:54
*roll eyes* -- here we go again with the "anything that isn't x264 sucks" sentiment, as I was pointing out in another thread :) http://forum.doom9.org/showthread.php?t=134034
Aside from the fact the latest Mainconcept H.264 encoder inside of Reference 1.1.1 is quite good relative to x264, my bigger issue is I have hundreds of DVD's I want to send to H.264, so for the sake of argument, taking a slight hit in IQ and not using x264, but being able to use the batching and "watch folder" features of Reference, makes the difference in the project being feasible or not.
I have several 8-core xeon systems ready to crunch 24x7, so I don't care how low the FPS is during encode, but I gotta be able to batch and not have to deal with intermediary files (and demuxing, etc.)
I will try a few x264 based encode just for comparison sake, but so far I haven't found a "one click" x264 based tool the way Mainconcept and Nero each provide in their programs, nor any x264 based GUI that does batch encoding.Uh, MeGUI does batch encoding, and I'm pretty StaxRip, Ripbot264, and many other similar programs offer batch functionality... :rolleyes:
Also, note that with (the new) AQ, x264 vastly outperforms Mainconcept.
Sagekilla
24th January 2008, 02:08
Well now.. Mainconcept doesn't support a "constant quality" mode, I believe. So you'll be stuck having to tweak the bitrate for each movie if you want decent quality. But that would go against your batch encoding.. Unless Mainconcept included a crf-like mode, there's no such thing as what you're asking for. Either go with one of the GUI based programs like StaxRip, MeGUI, RipBot264, SUPER, etc and use the AutoCrop functionality of Avisynth or be stuck with trying to find individual bitrate for each movie.
Edit: You should be able to do batch encoding with StaxRip very easily. It can do all the intermediary steps needed to produce an output file, mux it to a mkv or mp4, and jump to the next one. Only necessary step would be to clean up files afterwards and store all your movies in one folder, unless you really don't have the time for this.
odditory
24th January 2008, 02:11
I'll check those out, Dark Shikari - thanks.
CruNcher
24th January 2008, 02:18
Atemes Encoder had the most efficient visual representation of input>output since a long time now (1-2 year ahead of X264 allready with the 1.4 core) but with Dark Shikaris new AQ im not sure anymore if this is still the case, but Ateme is now above core 1.7 i think :D
delacroixp
24th January 2008, 03:14
My GOAL is to end up with H.264 files that are 50% the filesize of the source material while still 1:1 with source at 720x480, merely to save harddrive space among hundreds of DVD's.
Not only is there no "sweet spot" for bitrate, neither is there a "sweet spot" for resolution... and even the goal of achieving a "50% of original filesize" is a recipe for automated disapointment.
Movies are notoriously unique with an incredible range of quality, number of scene-changes, colour, resolution and bitrate requirements.
That said, using "1-pass Constant Quality CRF" will go a long way in balancing out the unknown variables from one movie to another... only
experience and your preferred range of material, will tell you what settings are right for you.
Aiming at a single encoding resolution will also limit the professionalism of your output...
It doesn't take long to notice that certain movies (eg, animations) are quite happy at lower resolutions (3D computer animations a little higher) and
some photo-realistic movies (eg, Band of Brothers (http://en.wikipedia.org/wiki/Band_of_Brothers)) would prefer all the resolution you can spare.
B&W, older or newer movies will add a further dimension.
As to the '50%-of-orginal-filesize target'...
A few movies encoded with equal resolution and quantizer... will show a significant swing in proportions.
X264 is more efficient with certain movies, others demand a larger chunk of the pie.
To maintain a 50% filesize consistency over encodes is to overlook the merits of each movie.
Your priorities will also affect and change from one project to another.
I generally encode at 800 width and Q20 (http://forum.doom9.org/showthread.php?p=1088567#post1088567) (PAL 16:9)... with variations for animation, documentaries, 4:3, NTSC and year-of-release.
It's probably the most efficient use of resolution, bitrate and time.
As to audio, HE-AAC v2 @ 90 kbps (http://forum.doom9.org/showthread.php?p=1088432#post1088432) complements the overall efficiency very nicely.
:):devil::D
Pascal
odditory
24th January 2008, 19:05
Not only is there no "sweet spot" for bitrate, neither is there a "sweet spot" for resolution... and even the goal of achieving a "50% of original filesize" is a recipe for automated disapointment.
Movies are notoriously unique with an incredible range of quality, number of scene-changes, colour, resolution and bitrate requirements.
That said, using "1-pass Constant Quality CRF" will go a long way in balancing out the unknown variables from one movie to another... only
experience and your preferred range of material, will tell you what settings are right for you.
Aiming at a single encoding resolution will also limit the professionalism of your output...
It doesn't take long to notice that certain movies (eg, animations) are quite happy at lower resolutions (3D computer animations a little higher) and
some photo-realistic movies (eg, Band of Brothers (http://en.wikipedia.org/wiki/Band_of_Brothers)) would prefer all the resolution you can spare.
B&W, older or newer movies will add a further dimension.
As to the '50%-of-orginal-filesize target'...
A few movies encoded with equal resolution and quantizer... will show a significant swing in proportions.
X264 is more efficient with certain movies, others demand a larger chunk of the pie.
To maintain a 50% filesize consistency over encodes is to overlook the merits of each movie.
Your priorities will also affect and change from one project to another.
I generally encode at 800 width and Q20 (http://forum.doom9.org/showthread.php?p=1088567#post1088567) (PAL 16:9)... with variations for animation, documentaries, 4:3, NTSC and year-of-release.
It's probably the most efficient use of resolution, bitrate and time.
As to audio, HE-AAC v2 @ 90 kbps (http://forum.doom9.org/showthread.php?p=1088432#post1088432) complements the overall efficiency very nicely.
:):devil::D
Pascal
Good points - thanks for the info. I had a feeling that there were too many variables from movie to movie to be able to put them through "one size fits all" encoder settings.
Perhaps the real answer to the dilemmma is NOT to transcode at all. :) Instead, to wait for harddrives to reach the cost/Gb ratio where there's no more point in transcoding to save space. :) Having just picked up 24 x 1Tb drives at $269 a piece, which means cost per gigabyte is .27 cents, perhaps I'm at that point already.
DeathTheSheep
24th January 2008, 20:03
Mainconcept Reference has a constant quality mode--"better" or "best" should be just what you're looking for, since each of these is reportedly tweaked to be the best bitrate per quality setting.
Reportedly.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.