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. |
22nd May 2009, 00:53 | #1 | Link |
Registered User
Join Date: Jan 2009
Posts: 65
|
Fast Encoding Options in x264
Hi,
I am trying to test the speed of different encoding options in x264. 1-First, I tried to see the effect of the number of reference frames. I got the following results for a 1280x800 video sequence, 25fps, 250 frames: Code:
--ref 1 -> Average PSNR Y=40.79dB, Average fps= 9.7 --ref 2 -> Average PSNR Y=40.41dB, Average fps= 9.2 --ref 3 -> Average PSNR Y=40.80dB, Average fps= 8.8 --ref 4 -> Average PSNR Y=40.76dB, Average fps= 8.6 2- Is there any option for disabling/Enabling 8x16 and 8x16 macroblock partitions? 3- I used "--no-chroma-me". The encoding speed was increased but the average PSNR was decreased a little!! So, what is the reason of it? Thanks! |
22nd May 2009, 03:37 | #2 | Link |
Advanced Blogging
Join Date: May 2009
Posts: 480
|
1) You take PSNR measurements too seriously. PsyOPs work negatively against AQ.
2) No idea. 3) This should be obvious. --no-chroma-me disables checking the chroma during motion estimation, so less accurate motion vectors were found and the quality goes down. Also: you never posted your settings, particularly your rate control method. |
22nd May 2009, 03:57 | #3 | Link |
Mr. Sandman
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
|
the reason is PSNR is not an index of quality. plain and simple.
__________________
MPEG-4 ASP Custom Matrices: EQM V1(old), EQM AutoGK Sharpmatrix (aka EQM V2), EQM V3HR (updated 01/10/2004), EQM V3LR, EQM V3ULR (updated 04/02/2005), EQM V3UHR (updated 17/12/2004) and EQM V3EHR (updated 05/10/2004) Info about my ASP matrices. MPEG-4 AVC Custom Matrices: EQM AVC-HR Info about my AVC matrices My x264 builds. Mooo!!! |
22nd May 2009, 04:30 | #4 | Link |
Registered User
Join Date: Aug 2006
Posts: 2,229
|
You haven't shown your other settings! In CRF mode, you should end up with slightly smaller files. In 2-pass mode (one pass CBR should be avoided if possible, its only good for real time streamng as far as I see it), the improved encoding efficiency will be put in to quality. realistically, unless you need it for a compatibility thing around 5 ref frames is a good balance between encoding speed and end file size/quality for most materials. Animation may benefit from using a higher reference frame number.
|
22nd May 2009, 04:42 | #5 | Link |
Registered User
Join Date: Jan 2009
Posts: 65
|
Here is my settings:
Code:
x264 --bitrate 200 --ref x --mixed-ref --psy-rd 0:0 test.yuv -o test.264 1280x800 and I got the following results: Code:
--ref 1 -> Average PSNR Y=28.76dB, Average fps= 11.90 --ref 2 -> Average PSNR Y=28.69dB, Average fps= 11.68 --ref 3 -> Average PSNR Y=28.77dB, Average fps= 11.26 --ref 4 -> Average PSNR Y=28.68dB, Average fps= 11.10 Last edited by Redhat_doom; 22nd May 2009 at 05:36. |
22nd May 2009, 05:56 | #9 | Link |
Registered User
Join Date: Jan 2009
Posts: 65
|
Regarding SSIM I got the followin results:
Code:
--ref 1 -> Average PSNR Y=28.76dB,SSIM=0.9003364, Average fps= 11.90 --ref 2 -> Average PSNR Y=28.69dB,SSIM=0.8999750, Average fps= 11.68 --ref 3 -> Average PSNR Y=28.77dB,SSIM=0.9004882, Average fps= 11.26 --ref 4 -> Average PSNR Y=28.68dB,SSIM=0.9000956, Average fps= 11.10 |
22nd May 2009, 08:07 | #11 | Link |
Registered User
Join Date: Jan 2009
Posts: 65
|
I repeated the same experiments to see the influence of "--partition". Here is the results:
Code:
x264 --bitrate 200 --partition "x" --psy-rd 0:0 test.yuv -o test.264 1280x800 Code:
"p8x8" -> PSNR mean Y: 28.61dB "i8x8,p8x8"-> PSNR mean Y: 28.61dB "i4x4,p8x8"-> PSNR mean Y: 28.76dB "i4x4,i8x8,p8x8"-> PSNR mean Y: 28.76dB "p4x4,p8x8"-> PSNR mean Y: 28.64dB "p4x4p,p8x8,i8x8"-> PSNR mean Y: 28.64dB "p4x4,p8x8,i4x4"-> PSNR mean Y: 28.71dB "p4x4,p8x8,i4x4,i8x8"-> PSNR mean Y: 28.71dB |
22nd May 2009, 12:46 | #12 | Link | |
Registered User
Join Date: Jan 2007
Posts: 185
|
Quote:
Regards, Irakli |
|
22nd May 2009, 13:09 | #13 | Link |
Registered User
Join Date: Mar 2005
Location: Finland
Posts: 2,641
|
You are comparing short clips with 1-pass ABR. Did you check the resulting bitrates? For meaningful results, use 2-pass encoding and maybe a bit longer sequences, if possible (1000 frames would be ok).
|
22nd May 2009, 13:45 | #14 | Link | |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
http://mirror05.x264.nl/Dark/LosslessAzumanga.mkv It's not YUV, but lossless H.264. So you will need to use Avisynth with FFmpegSource() to feed that into x264. You may also want to have a look at this sample: http://forum.doom9.org/showpost.php?...6&postcount=47
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
|
22nd May 2009, 18:35 | #16 | Link | |
Registered User
Join Date: Jan 2009
Posts: 65
|
Quote:
Code:
x264 --bitrate 200 --pass 2 --ref x --mixed-ref test.yuv -o test.264 640x480 Code:
ref 1 -> PSNR mean Y: 36.66dB ref 2 -> PSNR mean Y: 37.08dB ref 3 -> PSNR mean Y: 37.53dB ref 4 -> PSNR mean Y: 37.66dB ref 5 -> PSNR mean Y: 37.83dB ref 6 -> PSNR mean Y: 37.95dB 1- Do you know any better setting to see this visual quality difference better? 2- Do you know why animated content needs more reference frames? 3- I tried to investigate the effect of "--partition". I think "p8x8" and "p8x8,i8x8" are equall. Right? Because if we use only "p8x8" then x264 must use the default setting for I-frames which is "i8x8" and so cases like "p8x8" and "p8x8,i8x8" are equall. Am I right? |
|
22nd May 2009, 23:52 | #17 | Link | |
Testeur de codecs
Join Date: May 2003
Location: France
Posts: 2,484
|
Quote:
Like always Sharktooth think that x264 work with magical tools ... and like always it's ridiculous ... more ref with or without psy must optimize the psnr result at same size.
__________________
Le Sagittaire ... ;-) 1- Ateme AVC or x264 2- VP7 or RV10 only for anime 3- XviD, DivX or WMV9 |
|
22nd May 2009, 23:55 | #18 | Link |
x264aholic
Join Date: Jul 2007
Location: New York
Posts: 1,752
|
If you can't see a difference, then that means a PSNR of 36.66 dB (for luma anyway) is transparent for that source for you. In other words, it means you can use higher refs with lower bitrate to get the same quality but smaller file size.
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame. |
23rd May 2009, 00:03 | #19 | Link | |
Registered User
Join Date: Jan 2009
Posts: 65
|
Quote:
Code:
x264 [warning]: Error: 2pass curve failed to converge Code:
x264 [error]: requested bitrate is too low. estimated minimum is 101 kbps. |
|
23rd May 2009, 01:02 | #20 | Link | |
Compiling Encoder
Join Date: Jan 2007
Posts: 1,348
|
Quote:
those messages appear whenever ratecontrol can't accept the given bitrate for either of the following reasons: A. too low bitrate and too low QPmax (can't quantize high enough to make low desired bitrate) B. too high bitrate and too high QPmin (can't quantize low enough to spend desired high bitrate) for A. you need to raise the qpmax (the default is 51, so if you're running into this, you're really pushing down the bitrate - likely way too much) B. you need to lower the qpmin (the default is 10, so if you're running into this, you should be already be in the transparent range and could lower the bitrate instead) |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|