Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 10th October 2008, 20:13   #1  |  Link
InTrancer
Registered User
 
Join Date: Oct 2007
Posts: 17
Bitrate in new builds in CRF mode

i have test build 947 and 999 on the same source (anime 1002 frames) and result bitrate was very big
build 947: 703.60 kb/s
build 999: 1932.93 kb/s

build 947 command line
Code:
C:\Documents and Settings\SHiSH\Desktop\x264>x264.Build.947.exe --crf 14.0 --ref 16 --mixed-refs --no-fast-psk
ip --bframes 16 --b-rdo --b-pyramid --weightb --direct auto --subme 7 --trellis 1 --partitions all  --8x8dct -
-me umh --merange 32 --threads auto --thread-input --progress --no-dct-decimate --output "I:\Work\higurashi\dv
d5\dvd2\s21.build947.mkv" "I:\Work\higurashi\dvd5\dvd2\VIDEO_TS\s21.avs"
avis [info]: 848x480 @ 23.98 fps (1002 frames)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 PHADD SSE4 Cache64
x264 [info]: slice I:7     Avg QP:12.05  size: 37886  PSNR Mean Y:50.92 U:52.55 V:52.59 Avg:51.40 Global:51.35
x264 [info]: slice P:548   Avg QP:12.74  size:  5649  PSNR Mean Y:49.39 U:51.79 V:52.09 Avg:50.08 Global:50.04
x264 [info]: slice B:447   Avg QP:14.02  size:   703  PSNR Mean Y:49.33 U:51.63 V:51.73 Avg:49.98 Global:49.87
x264 [info]: consecutive B-frames: 44.8%  0.0%  2.1%  7.6%  9.0% 30.8%  2.8%  0.0%  1.8%  1.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%
x264 [info]: mb I  I16..4: 35.6% 44.1% 20.3%
x264 [info]: mb P  I16..4:  1.4%  0.5%  0.3%  P16..4: 53.0%  6.2% 11.4%  0.1%  0.0%    skip:27.0%
x264 [info]: mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 15.4%  0.2%  0.3%  direct: 0.3%  skip:83.8%  L0:45.1% L1:52.4% BI: 2.5%
x264 [info]: 8x8 transform  intra:30.3%  inter:38.0%
x264 [info]: direct mvs  spatial:98.9%  temporal:1.1%
x264 [info]: ref P L0  73.0% 10.3%  5.9%  1.8%  1.6%  1.5%  1.2%  0.5%  0.6%  0.6%  0.6%  0.5%  0.5%  0.5%  0.5%  0.3%
x264 [info]: ref B L0  76.2% 11.3%  5.1%  2.5%  1.0%  1.2%  0.7%  0.3%  0.3%  0.2%  0.2%  0.3%  0.2%  0.3%  0.1%
x264 [info]: ref B L1  93.2%  6.8%
x264 [info]: SSIM Mean Y:0.9930943
x264 [info]: PSNR Mean Y:49.373 U:51.722 V:51.930 Avg:50.043 Global:49.971 kb/s:703.44

encoded 1002 frames, 11.82 fps, 703.60 kb/s
build 999 command line
Code:
C:\Documents and Settings\SHiSH\Desktop\x264>x264.Build.999.exe --crf 14.0 --ref 16 --mixed-refs --no-fast-psk
ip --bframes 16 --b-adapt 2 --b-pyramid --weightb --direct auto --subme 9 --trellis 1 --partitions all  --8x8d
ct --me umh --merange 32 --threads auto --thread-input --progress --no-dct-decimate --output "I:\Work\higurash
i\dvd5\dvd2\s21.build999.mkv" "I:\Work\higurashi\dvd5\dvd2\VIDEO_TS\s21.avs"
avis [info]: 848x480 @ 23.98 fps (1002 frames)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 PHADD SSE4 Cache64
x264 [info]: slice I:7     Avg QP:10.56  size: 56936  PSNR Mean Y:52.06 U:54.48 V:54.44 Avg:52.72 Global:52.69
x264 [info]: slice P:702   Avg QP:10.70  size: 12962  PSNR Mean Y:50.73 U:53.26 V:53.31 Avg:51.43 Global:51.40
x264 [info]: slice B:293   Avg QP:11.78  size:  2044  PSNR Mean Y:50.12 U:52.67 V:52.68 Avg:50.82 Global:50.69
x264 [info]: consecutive B-frames: 52.0% 20.1% 19.0%  8.4%  0.5%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%
x264 [info]: mb I  I16..4:  9.2% 76.4% 14.5%
x264 [info]: mb P  I16..4:  0.2%  0.5%  0.1%  P16..4: 65.1% 10.7% 21.7%  0.1%  0.1%    skip: 1.7%
x264 [info]: mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 27.8%  0.5%  2.1%  direct: 1.8%  skip:67.8%  L0:36.8% L1:55.4% BI: 7.8%
x264 [info]: 8x8 transform  intra:71.9%  inter:38.3%
x264 [info]: direct mvs  spatial:87.7%  temporal:12.3%
x264 [info]: ref P L0  80.7%  8.6%  3.7%  1.2%  0.9%  0.9%  0.8%  0.4%  0.4%  0.4%  0.4%  0.4%  0.3%  0.4%  0.3%  0.2%
x264 [info]: ref B L0  76.5% 16.7%  3.1%  0.9%  0.6%  0.9%  0.4%  0.2%  0.2%  0.1%  0.1%  0.1%  0.1%  0.1%  0.1%
x264 [info]: ref B L1  94.5%  5.5%
x264 [info]: SSIM Mean Y:0.9937798
x264 [info]: PSNR Mean Y:50.565 U:53.097 V:53.131 Avg:51.259 Global:51.190 kb/s:1932.77

encoded 1002 frames, 7.41 fps, 1932.93 kb/s
I want use latest build, but with waste of bitrate its imposible
Any advice?
InTrancer is offline   Reply With Quote
Old 10th October 2008, 20:31   #2  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
Please read the updates.. there's been a recent change that makes CRF allocate bits differently. You'll have to adjust your CRF to a higher value now to get the same bitrate you used to get. But you should get more or less around the same quality.
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame.
Sagekilla is offline   Reply With Quote
Old 25th October 2008, 05:23   #3  |  Link
XPecto
Registered User
 
Join Date: Jun 2007
Posts: 19
Where i should look for crf Changes?
in x.264 help or is there any help around here?
Can you please post link. Thanks.
XPecto is offline   Reply With Quote
Old 25th October 2008, 05:33   #4  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
I made a major change to ratecontrol that changed the way CRF worked. Unfortunately, despite the fact that I tried to keep the bitrate the same overall, some sources' bitrate rose a lot, while others dropped, so the only thing I could do is try to "center" things overall.

As you might notice, CRF 14 is now ridiculous overkill; you don't need such a low value for any sane purpose. IMO the new scale is much much better; there probably no longer exist sources for which one "needs" CRF14 to achieve transparency, for example.
Dark Shikari is offline   Reply With Quote
Old 25th October 2008, 14:34   #5  |  Link
lexor
Registered User
 
Join Date: Jan 2004
Posts: 849
Quote:
Originally Posted by Dark Shikari View Post
As you might notice, CRF 14 is now ridiculous overkill; you don't need such a low value for any sane purpose.
Actually, you might. Consider my use case. I would rip an anime and re-encode for both my stand alone and PS3 (ends up at about 2gigs, usually a bit less). Now I also have a PSP, and I found it to be much faster (in terms of encoding time) to re-encode that 2gig rip, than getting the source out again (which is usually blu-ray, so no mean feat to have a lot of those at a time on hdd).

In this case ~crf13 was perfect for me, producing about 150mb of video. Now obviously it is higher now, but my point is that you do have legit uses for low crf (in older builds).
__________________
Geforce GTX 260
Windows 7, 64bit, Core i7
MPC-HC, Foobar2000
lexor is offline   Reply With Quote
Old 25th October 2008, 15:54   #6  |  Link
Sagittaire
Testeur de codecs
 
Sagittaire's Avatar
 
Join Date: May 2003
Location: France
Posts: 2,502
Quote:
Originally Posted by Dark Shikari View Post
I made a major change to ratecontrol that changed the way CRF worked. Unfortunately, despite the fact that I tried to keep the bitrate the same overall, some sources' bitrate rose a lot, while others dropped, so the only thing I could do is try to "center" things overall.

As you might notice, CRF 14 is now ridiculous overkill; you don't need such a low value for any sane purpose. IMO the new scale is much much better; there probably no longer exist sources for which one "needs" CRF14 to achieve transparency, for example.
Not more simple to use always quant at N in average for Pframe if you use crf N ?
__________________
Le Sagittaire ... ;-)

1- Ateme AVC or x264
2- VP7 or RV10 only for anime
3- XviD, DivX or WMV9
Sagittaire is offline   Reply With Quote
Old 25th October 2008, 17:09   #7  |  Link
cogman
The Crazy Idahoan
 
Join Date: Jun 2007
Location: Idaho
Posts: 249
Quote:
Originally Posted by lexor View Post
Actually, you might. Consider my use case. I would rip an anime and re-encode for both my stand alone and PS3 (ends up at about 2gigs, usually a bit less). Now I also have a PSP, and I found it to be much faster (in terms of encoding time) to re-encode that 2gig rip, than getting the source out again (which is usually blu-ray, so no mean feat to have a lot of those at a time on hdd).

In this case ~crf13 was perfect for me, producing about 150mb of video. Now obviously it is higher now, but my point is that you do have legit uses for low crf (in older builds).
What do you gain by using CRF 14? CRF 18 will look visually the same as the input for 99.99% of people. Even on a second generation encode you won't see any blocking that wasn't already present in the orgional.

I could see a potential case for 17 in this situation, but 14 and 13 are ridiculous, they aren't gaining you anything other then big files.
cogman is offline   Reply With Quote
Old 25th October 2008, 17:14   #8  |  Link
ajp_anton
Registered User
 
ajp_anton's Avatar
 
Join Date: Aug 2006
Location: Stockholm/Helsinki
Posts: 807
Quote:
Originally Posted by lexor View Post
Actually, you might. Consider my use case. I would rip an anime and re-encode for both my stand alone and PS3 (ends up at about 2gigs, usually a bit less). Now I also have a PSP, and I found it to be much faster (in terms of encoding time) to re-encode that 2gig rip, than getting the source out again (which is usually blu-ray, so no mean feat to have a lot of those at a time on hdd).

In this case ~crf13 was perfect for me, producing about 150mb of video. Now obviously it is higher now, but my point is that you do have legit uses for low crf (in older builds).
Of course it depends on what you're doing with your encode. You didn't think DS meant we should all drop lossless encoding because x264's crf=18 is perfect for everything?
ajp_anton is offline   Reply With Quote
Old 25th October 2008, 17:41   #9  |  Link
lexor
Registered User
 
Join Date: Jan 2004
Posts: 849
Quote:
Originally Posted by ajp_anton View Post
You didn't think DS meant we should all drop lossless encoding because x264's crf=18 is perfect for everything?
Huh? Who claimed that? I don't think anyone claimed crf18 was perfect for everything, it's always been merely a guide to start searching for high quality.

DS made a blanket statement that there is no sane use for low crf, I merely pointed out that there is. Nothing more.
__________________
Geforce GTX 260
Windows 7, 64bit, Core i7
MPC-HC, Foobar2000
lexor is offline   Reply With Quote
Old 25th October 2008, 17:47   #10  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
lossless compression exists for your supposed reason...
low crf's as visually transparant as they are, still don't retain all the information like a lossless.
And then since you're encoding from an h.264 source file, you now have to worry about frame determinism, based on the decoder you're using and how you use it to make a new re-encode.
all in all, people use losslesses for the reason you state, not low crf encodes
__________________
custom x264 builds & patches | F@H | My Specs
kemuri-_9 is offline   Reply With Quote
Old 25th October 2008, 19:28   #11  |  Link
lexor
Registered User
 
Join Date: Jan 2004
Posts: 849
People most definitely don't use Lossless for the reason I state, because PSP doesn't do lossless. The reason I used crf so low is because any higher in older builds used to crush the bitrate for some reason (in this use case) and produce poor results (I always assumed it was a price of re-encoding from relatively low bitrate source to even lower bitrate).
__________________
Geforce GTX 260
Windows 7, 64bit, Core i7
MPC-HC, Foobar2000
lexor is offline   Reply With Quote
Old 25th October 2008, 20:38   #12  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
what? you appeared to have greatly misunderstood what i was saying at all.
I wasn't stating that people use lossless on PSP, i was stating that people use lossless files when they have a necessity to encode a single file to multiple formats.

it's the concept of taking and filtering the source into a single lossless, then encoding that lossless to all the formats desired.
so for your case it would look something like:
Code:
                  /-> PSP
source -> lossless -> standalone
                  \-> PS3
all the lossy encodes take from the lossless, not from re-encoding one lossy encode into another.
and because you're encoding from the lossless, there's no quality loss from doing such a lossy -> lossy re-encode
__________________
custom x264 builds & patches | F@H | My Specs
kemuri-_9 is offline   Reply With Quote
Old 25th October 2008, 21:51   #13  |  Link
STaRGaZeR
4:2:0 hater
 
Join Date: Apr 2008
Posts: 1,302
Quote:
Originally Posted by cogman View Post
What do you gain by using CRF 14? CRF 18 will look visually the same as the input for 99.99% of people.
I need CRF 16-16.5 to consider it transparent, depending of the source.
__________________
Specs, GTX970 - PLS 1440p@96Hz
Quote:
Originally Posted by Manao View Post
That way, you have xxxx[p|i]yyy, where xxxx is the vertical resolution, yyy is the temporal resolution, and 'i' says the image has been irremediably destroyed.
STaRGaZeR is offline   Reply With Quote
Old 25th October 2008, 21:52   #14  |  Link
lexor
Registered User
 
Join Date: Jan 2004
Posts: 849
Last I tested, Lossless was frequently larger than blu-ray source. So, no, I don't see advantage of that middle man. Just use source, the whole point of using lossy encode is to speed up encoding. That certainly won't happen with a lossless source, it's just as big image dimension wise and probably even larger in bitrate. If anything it will slow things down.
__________________
Geforce GTX 260
Windows 7, 64bit, Core i7
MPC-HC, Foobar2000
lexor is offline   Reply With Quote
Old 25th October 2008, 22:17   #15  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
Low CRF values are still handy for extremely minimal lossy encoding. I used CRF 12 for encoding a particularly difficult sequence (720p60) and managed to cut the bitrate by 1/3 (source was ... 100 mbps lagarith?). It was enough bitrate to make sure the picture didn't suffer too much, but there were still some changes because of the inherent complexity of my source.


Either way, we have CRF 0 to 51 to give the luser enough rope to hang himself
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame.
Sagekilla is offline   Reply With Quote
Old 25th October 2008, 23:09   #16  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
Quote:
Originally Posted by lexor View Post
Last I tested, Lossless was frequently larger than blu-ray source. So, no, I don't see advantage of that middle man. Just use source, the whole point of using lossy encode is to speed up encoding. That certainly won't happen with a lossless source, it's just as big image dimension wise and probably even larger in bitrate. If anything it will slow things down.
if you're going from source -> lossless without filtering, then there is no point/need for a lossless, just encode all the pieces from the source.
lossless is there to save the filtering done without data loss to a lossy encode.
so if there's no to very minimal filtering, then there is no point in having a lossless.
__________________
custom x264 builds & patches | F@H | My Specs
kemuri-_9 is offline   Reply With Quote
Old 25th October 2008, 23:41   #17  |  Link
Kurth
Registered User
 
Kurth's Avatar
 
Join Date: Mar 2006
Posts: 51
I have been encoding my animes using --crf 18 --qpmin 18 and the quality is very good to my eyes (I watch anime on a LCD monitor with DVI) and the final file size is very good. (640x480 and 704x400 at 80MB~140MB depends on each anime episode)
Some times I add a weak deblock and weak denoise and it help some more too and don't destroy the image.
Im always encoding using the latest x264 build.
Oh and turn off the Psy-RDO this thing like to fuck the image and double the amount of bitrate used.

Last edited by Kurth; 25th October 2008 at 23:45.
Kurth is offline   Reply With Quote
Old 26th October 2008, 00:11   #18  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
@Kurd PSY-RD works better on real life imagery. It's better to turn it off for anime and then use it at a small strength (0.5:0.5 to 0.7:0.7) on films. If you adjust CRF accordingly (or if use 2-pass) too, using PSY-RD produces a better result than without.
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame.
Sagekilla is offline   Reply With Quote
Reply

Tags
bitrate, crf

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:07.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.