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 > General > Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th October 2014, 20:30   #61  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,196
Quote:
Originally Posted by fvisagie View Post
TDue to the subtlety you allude to in the first quote, --level is needed to ensure --ref is set correctly. If the command line omits --level, --ref defaults to 16. I just retested that to confirm.
Nope, it defaults to three reference frames:


You probably have been using "very slow" or "placebo" Preset, which crank up the number of reference frames
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.


LoRd_MuldeR is offline   Reply With Quote
Old 15th October 2014, 13:49   #62  |  Link
fvisagie
Registered User
 
Join Date: Aug 2008
Location: Isle of Man
Posts: 588
Quote:
Originally Posted by sneaker_ger View Post
Wrong. Two-pass encoding without --vbv-XXX is variable, not constant bit rate.
In the strict sense of the word what you say is correct, of course. However, for the purposes of that suggestion (achieving a bitrate predictable enough for level estimation) I believe two-pass encoding to be sufficient. I did use the word "roughly", BTW . Certainly, in my experience, I have not seen any bitrate swings causing problems to constrained players with correctly level-constrained two-pass encodes.
fvisagie is offline   Reply With Quote
Old 15th October 2014, 14:01   #63  |  Link
fvisagie
Registered User
 
Join Date: Aug 2008
Location: Isle of Man
Posts: 588
Quote:
Originally Posted by LoRd_MuldeR View Post
You probably have been using "very slow" or "placebo" Preset, which crank up the number of reference frames
Well spotted, I neglected to mention that, thanks.

This brings us to the more general point that --preset preselects --ref values independently of encoding level:
  • - ultrafast: --ref 1
  • - superfast: --ref 1
  • - veryfast: --ref 1
  • - faster: --ref 2
  • - fast: --ref 2
  • - medium: Default settings apply.
  • - slow: --ref 5
  • - slower: --ref 8
  • - veryslow: --ref 16
  • - placebo: --ref 16
- unless they are explicitly managed via --level.
fvisagie is offline   Reply With Quote
Old 15th October 2014, 15:21   #64  |  Link
detmek
Registered User
 
Join Date: Aug 2009
Posts: 475
Yep. Here what presets, tunings and profiles change compared to defaults:
Quote:
--profile <string> Force the limits of an H.264 profile
Overrides all settings.
- baseline:
--no-8x8dct --bframes 0 --no-cabac
--cqm flat --weightp 0
No interlaced.
No lossless.
- main:
--no-8x8dct --cqm flat
No lossless.
- high:
No lossless.
- high10:
No lossless.
Support for bit depth 8-10.
- high422:
No lossless.
Support for bit depth 8-10.
Support for 4:2:0/4:2:2 chroma subsampling.
- high444:
Support for bit depth 8-10.
Support for 4:2:0/4:2:2/4:4:4 chroma subsampling.
--preset <string> Use a preset to select encoding settings [medium]
Overridden by user settings.
- ultrafast:
--no-8x8dct --aq-mode 0 --b-adapt 0
--bframes 0 --no-cabac --no-deblock
--no-mbtree --me dia --no-mixed-refs
--partitions none --rc-lookahead 0 --ref 1
--scenecut 0 --subme 0 --trellis 0
--no-weightb --weightp 0
- superfast:
--no-mbtree --me dia --no-mixed-refs
--partitions i8x8,i4x4 --rc-lookahead 0
--ref 1 --subme 1 --trellis 0 --weightp 1
- veryfast:
--no-mixed-refs --rc-lookahead 10
--ref 1 --subme 2 --trellis 0 --weightp 1
- faster:
--no-mixed-refs --rc-lookahead 20
--ref 2 --subme 4 --weightp 1
- fast:
--rc-lookahead 30 --ref 2 --subme 6
--weightp 1
- medium:
Default settings apply.
- slow:
--b-adapt 2 --direct auto --me umh
--rc-lookahead 50 --ref 5 --subme 8
- slower:
--b-adapt 2 --direct auto --me umh
--partitions all --rc-lookahead 60
--ref 8 --subme 9 --trellis 2
- veryslow:
--b-adapt 2 --bframes 8 --direct auto
--me umh --merange 24 --partitions all
--ref 16 --subme 10 --trellis 2
--rc-lookahead 60
- placebo:
--bframes 16 --b-adapt 2 --direct auto
--slow-firstpass --no-fast-pskip
--me tesa --merange 24 --partitions all
--rc-lookahead 60 --ref 16 --subme 11
--trellis 2
--tune <string> Tune the settings for a particular type of source
or situation
Overridden by user settings.
Multiple tunings are separated by commas.
Only one psy tuning can be used at a time.
- film (psy tuning):
--deblock -1:-1 --psy-rd <unset>:0.15
- animation (psy tuning):
--bframes {+2} --deblock 1:1
--psy-rd 0.4:<unset> --aq-strength 0.6
--ref {Double if >1 else 1}
- grain (psy tuning):
--aq-strength 0.5 --no-dct-decimate
--deadzone-inter 6 --deadzone-intra 6
--deblock -2:-2 --ipratio 1.1
--pbratio 1.1 --psy-rd <unset>:0.25
--qcomp 0.8
- stillimage (psy tuning):
--aq-strength 1.2 --deblock -3:-3
--psy-rd 2.0:0.7
- psnr (psy tuning):
--aq-mode 0 --no-psy
- ssim (psy tuning):
--aq-mode 2 --no-psy
- fastdecode:
--no-cabac --no-deblock --no-weightb
--weightp 0
- zerolatency:
--bframes 0 --force-cfr --no-mbtree
--sync-lookahead 0 --sliced-threads
--rc-lookahead 0

Last edited by detmek; 15th October 2014 at 15:26.
detmek is offline   Reply With Quote
Old 16th October 2014, 11:44   #65  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
Someone knows if x264 supports level 5.2 ? (x264 doesn't complain if I type --level 5.2 in the command line, but I'm not sure it's an evidence that it has been really implemented.)

And if it's the case, what values should be used for the --vbv-bufsize and --vbv-maxrate arguments to force x264 to be compatible with level 5.2 ? (The table given by sneaker_ger in post #25 stops at level 5.1 and I have been unable to find the information on the internet.)
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 16th October 2014, 12:44   #66  |  Link
fvisagie
Registered User
 
Join Date: Aug 2008
Location: Isle of Man
Posts: 588
http://www.itu.int/rec/T-REC-H.264/en (and the direct link to the latest publicly available version).
fvisagie is offline   Reply With Quote
Old 16th October 2014, 14:25   #67  |  Link
detmek
Registered User
 
Join Date: Aug 2009
Posts: 475
Quote:
Originally Posted by r0lZ View Post
Someone knows if x264 supports level 5.2 ? (x264 doesn't complain if I type --level 5.2 in the command line, but I'm not sure it's an evidence that it has been really implemented.)

And if it's the case, what values should be used for the --vbv-bufsize and --vbv-maxrate arguments to force x264 to be compatible with level 5.2 ? (The table given by sneaker_ger in post #25 stops at level 5.1 and I have been unable to find the information on the internet.)
Yes, x264 does support level 5.2. Here are specs. Your 1080p video must be over 120fps to be level 5.2.
You can use --vbv-maxrate 300000. --vbv-bufsize is your choice.
P.S. I already gave you a link to that Wikipedia page (DPB). Did you read that page?

Last edited by detmek; 16th October 2014 at 14:30.
detmek is offline   Reply With Quote
Old 16th October 2014, 15:59   #68  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,570
Quote:
Originally Posted by detmek View Post
You can use --vbv-maxrate 300000. --vbv-bufsize is your choice.
Maximum --vbv-bufsize is 300000 as well for level 5.2. (See tables on pages 292 and 295 in the document linked by fvisagie)

Last edited by sneaker_ger; 16th October 2014 at 16:01.
sneaker_ger is offline   Reply With Quote
Old 16th October 2014, 16:40   #69  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
Thanks!
Quote:
Originally Posted by detmek View Post
Your 1080p video must be over 120fps to be level 5.2.
Why? The table on that page shows the maximum property values, but there are no minimum values.
Quote:
Originally Posted by detmek View Post
Did you read that page?
Yes, but it lists the max bitrate and frame size, not the max buffer size. It is somewhat difficult to compute it with the formula that uses several concepts that I don't understand well. (For example, it seems that the macroblocks are 16x16 pixels, but I'm not sure it's always the case. And searching for each bit of information in the jungle of the h264 doc is not easy, when you are a noob like me! Each concept refers to another concept, and it seems that it's an endless quest.)

I'll use 300000, at least if it makes sense to use level 5.2 with 1080p@23.976fps. Can you confirm that? And can you confirm it also when the resolution is the double of 1080p (for Full-SBS or Full-T&B) ?
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 16th October 2014, 17:49   #70  |  Link
detmek
Registered User
 
Join Date: Aug 2009
Posts: 475
Quote:
Originally Posted by sneaker_ger View Post
Maximum --vbv-bufsize is 300000 as well for level 5.2. (See tables on pages 292 and 295 in the document linked by fvisagie)
Thanks. I'll try to read that info.
Quote:
Originally Posted by r0lZ View Post
Thanks!

Why? The table on that page shows the maximum property values, but there are no minimum values.

Yes, but it lists the max bitrate and frame size, not the max buffer size. It is somewhat difficult to compute it with the formula that uses several concepts that I don't understand well. (For example, it seems that the macroblocks are 16x16 pixels, but I'm not sure it's always the case. And searching for each bit of information in the jungle of the h264 doc is not easy, when you are a noob like me! Each concept refers to another concept, and it seems that it's an endless quest.)

I'll use 300000, at least if it makes sense to use level 5.2 with 1080p@23.976fps. Can you confirm that? And can you confirm it also when the resolution is the double of 1080p (for Full-SBS or Full-T&B) ?
x264 will try to flag your video with lowest possible level it can. If your 1080p video has 16 reference frames and less then 120,5fps it fits more to Level 5.1 so, x264 will flag it as Level 5.1.
Usually it does not make sense to use 16 reference frames with any video resolution because it take way too much time to compress and it offers almost none quality improvement but makes video incopatible with a lot of hardware players. Gain of using so much reference frames is less then 1% most of the time.
My advice, do some tests with different settings at the same bitrate and use SSIM to measure difference. You will be surprised how low gain is when you use settings from placebo or veryslow preset compared to slow or slower.
detmek is offline   Reply With Quote
Old 16th October 2014, 18:30   #71  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
I see. That means that using level 5.2 is not recommended for 1080p@23.976fps, but theoretically not impossible, if you are crazy enough to push the limits to their maximums. Right?

BTW, what do you use for SSIM measurement?
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 16th October 2014, 18:47   #72  |  Link
detmek
Registered User
 
Join Date: Aug 2009
Posts: 475
x264 itself. Just add --tune ssim --ssim into command line and you will get ssim values in x264 log after encoding is done. Then compare values from two different encodes and you will get % of changes. Formula for comparing SSIM is:

((1-old ssim)/(1-new ssim)-1)*100

Or use this Excel file.

NB! Always use 2-pass and same bitrate.
detmek is offline   Reply With Quote
Old 16th October 2014, 19:30   #73  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
OK, thanks.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 18th October 2014, 00:21   #74  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,566
Quote:
Originally Posted by r0lZ View Post
I see. That means that using level 5.2 is not recommended for 1080p@23.976fps, but theoretically not impossible, if you are crazy enough to push the limits to their maximums. Right?
5.2 is exactly the same in terms of bitrate and frame-size as 5.1, it only exists to support full-speed 3K and 4K video (or 1080p at more than 120fps). 5.1 supports 4K @ 30, 5.2 supports 4K @ 60. Specifying 5.2 at 1080p is pointless unless you want all hardware players to reject your encodes.
foxyshadis is offline   Reply With Quote
Old 18th October 2014, 10:45   #75  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
I understand. Thanks. BTW, I did a placebo encode of a Full-SBS movie (3840x1080, 23.976 fps), without forcing any other option, and x264 has printed level 5.2. I suppose it's because the placebo preset uses a large number of ref frames. But that means that level 5.2 must be supported by my program, although I will not recommend to use it.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 18th October 2014, 11:30   #76  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,570
5.1 and 5.2 have the same DPB (for references) size. Technically your encode is neither 5.1 nor 5.2 because it is exceeded.
sneaker_ger is offline   Reply With Quote
Old 18th October 2014, 13:23   #77  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,393
Quote:
Originally Posted by sneaker_ger View Post
Technically your encode is neither 5.1 nor 5.2 because it is exceeded.
Why? Afaik, level 5.0 is sufficient for the image size and frame rate of Full-SBS or Full-T&B (3840x1080 or 1920x2160, at 23.976 fps). Right?
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 18th October 2014, 13:28   #78  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,570
DPB size is exceeded, you can't use 16 references with 3840x1080.
sneaker_ger is offline   Reply With Quote
Reply

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 22:58.


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