Hello all! This is my first post after lurking here for several years. Don't go too hard on me
I have a question regarding the two x265 parameters in the title. I've been encoding my UHD Bluray collection using ffmpeg/x265 for about 2 years now, and until a few weeks ago, I never included these parameters in my HDR encodes. I was aware that they were enabled from the --uhd-bd parameter, but I assumed they weren't required as I am encoding for personal streaming, and not UHD BD authoring (and I also don't want a GOP length of 24 frames). That changed after reading some posts over on doom9, where several respectable members said that they are used as metadata tags for HDR, and they should be enabled.
I've read through the x265 docs about 100 times now, but I'm still unsure about the exact purpose of these parameters. Now I am worried that I will need to re-encode roughly 50 Blurays that do not have these parameters included. I have always included all of the 'mandatory' HDR metadata parameters, and my typical 4K HDR command line goes something like this (depending on the mastering display colors, etc.):
So I guess my question is twofold; what exactly do these parameters signal, and are they truly necessary for HDR? I can (and will) re-encode them at some point to compare, but I figured I would ask first before committing to a 10-20 hour encode. I should also mention that my TVs do trigger HDR during playback; I'm just concerned that the metadata may not be transmitted correctly without --aud and --hrd.Code:ffmpeg -i input.mkv -color_range tv -pixel_fmt yuv420p10le -preset slow -c:v libx265 -x265-params "master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L($($maxLuma),$($minLuma)):chromaloc=2:color_space=bt2020nc:color_primaries=bt2020:transfer=smpte2084:cll=$($maxCLL),$($maxFAL):hdr10-opt=1:repeat-headers=1" output.mkv
I have been planning on asking the doom9 folks this very question, but I can't ever seem to get the verification email needed to complete the registration process
I'm hoping some of you knowledgeable folks can shed some light on this issue for me. I apologize if this isn't the correct category to post this question; this could seemingly go into a few different categories, but I felt 'Video Conversion' was the most applicable. Thanks in advance to those who respond![]()
+ Reply to Thread
Results 1 to 6 of 6
-
-
--aud is not needed for file based formats like mkv and mp4. Mkvtoolnix even removes them during the muxing process if they are present in the ES. They are needed for transports streams (.ts) and mandatory for BluRay m2ts. I know ffmpeg can insert them back in streams that don't have them or remove them with hevc/h264_metadata filter.
--hrd is hypothetical reference decoder which is vbv related and is mandatory for blu-ray. It inserts buffering and timing information in the stream. Again, this is not needed for mkv or even ts. Your decoder can decode picture just fine without it. Also. when you open video that is encoded with hrd information in mediaInfo you'll see that files on blu-ray have "bitrate" property that shows "variable" value. it can also be "constant" if you use --hal-hrd cbr parameter (in x264 days)
So don't bother re-encoding your movies. Just think of all that electricity spent so that h265 encoded streams have some additional information that is not even part of the picture. Useless if you ask me. -
Very relieving as I really did not want to re-encode all of those movies.
Thank you for your detailed response; this is something that I have not been able to find so far in my searches over the past few days. Considering that I mux all of my titles using the mkv* tools, it sounds like the --aud is worthless to me regardless.
I just checked all of the titles I did encode with --hrd in mediainfo and I don't even see the metadata you're referencing (although I think I know what you're talking about), so my guess is that it's getting thrown away anyway. For example, I just did 'The Dark Knight" recently:
HTML Code:General Unique ID : 180889976407025718925432178227967847526 (0x881624688AAA422298B2DE00C7C26C66) Complete name : P:\Movies\The Dark Knight (2008) 2160p HDR\The Dark Knight (2008).mkv Format : Matroska Format version : Version 4 File size : 19.0 GiB Duration : 2 h 32 min Overall bit rate mode : Variable Overall bit rate : 17.9 Mb/s Movie name : The Dark Knight (2008) Encoded date : UTC 2021-02-02 18:07:49 Writing application : [url=https://www.videohelp.com/software/MKVToolNix]mkvmerge[/url] v52.0.0 ('Secret For The Mad') 64-bit Writing library : libebml v1.4.1 + libmatroska v1.6.2 / Lavf58.65.101 Video ID : 1 Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@L5.1@High HDR format : SMPTE ST 2086, HDR10 compatible Codec ID : V_MPEGH/ISO/HEVC Duration : 2 h 32 min Bit rate : 14.0 Mb/s Width : 3 840 pixels Height : 2 160 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 (Type 2) Bit depth : 10 bits Bits/(Pixel*Frame) : 0.070 Stream size : 14.8 GiB (78%) Title : x265 - The Dark Knight Writing library : x265 3.4+31-681c05e83:[Windows][GCC 10.2.0][64 bit] 10bit Encoding settings : cpuid=1111039 / frame-threads=4 / numa-pools=20 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=3840x2160 / interlace=0 / total-frames=0 / level-idc=51 / high-tier=1 / uhd-bd=0 / ref=4 / no-allow-non-conformance / repeat-headers / annexb / aud / hrd / info / hash=0 / no-temporal-layers / no-open-gop / min-keyint=12 / keyint=120 / gop-lookahead=0 / bframes=5 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=48 / lookahead-slices=4 / scenecut=40 / hist-scenecut=0 / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=3 / limit-refs=3 / limit-modes / me=3 / subme=4 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / no-weightb / no-analyze-src-pics / deblock=-3:-3 / no-sao / no-sao-non-deblock / rd=4 / selective-sao=0 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=1.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=17.0 / qcomp=0.68 / qpstep=4 / stats-write=0 / stats-read=0 / vbv-maxrate=160000 / vbv-bufsize=160000 / vbv-init=0.9 / min-vbv-fullness=50.0 / max-vbv-fullness=80.0 / crf-max=0.0 / crf-min=0.0 / ipratio=1.40 / pbratio=1.30 / aq-mode=2 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=9 / transfer=16 / colormatrix=9 / chromaloc=1 / chromaloc-top=2 / chromaloc-bottom=2 / display-window=0 / master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(40000000,50) / cll=500,200 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / hist-threshold=0.03 / no-opt-cu-delta-qp / no-aq-motion / hdr10 / hdr10-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=0 / analysis-save-reuse-level=0 / analysis-load-reuse-level=0 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / no-field / qp-adaptation-range=1.00 / no-scenecut-aware-qpconformance-window-offsets / right=0 / bottom=0 / decoder-max-rate=0 / no-vbv-live-multi-pass Language : English Default : Yes Forced : No Color range : Limited Color primaries : BT.2020 Transfer characteristics : PQ Matrix coefficients : BT.2020 non-constant Mastering display color primaries : Display P3 Mastering display luminance : min: 0.0050 cd/m2, max: 4000 cd/m2 Maximum Content Light Level : 500 cd/m2 Maximum Frame-Average Light Level : 200 cd/m2
There seems to be a lot of misinformation out there regarding these parameters (at least relative to what I have been reading these past few days on all forums related to A/V compression) so hopefully, your post will help someone else who might be wondering the same things I was.
Thanks againThe x264/x265 docs can be a bit...overwhelming sometimes, so it's nice to have someone break it down as you did.
-
Good call! Somehow it slipped past me.
I think it's been decided that there isn't a noticeable benefit to using these parameters in a Matroska file, but is there any real negative impact to leaving them in? I'm thinking in terms of encoding performance and any (non-trivial) bitrate consumption. If not, I may just leave the parameters in my script, in case I do decide to use a different format down the line.
Similar Threads
-
Can someone guide how to set video player for x265 HDR films
By lorcav123 in forum Software PlayingReplies: 19Last Post: 24th Mar 2021, 10:48 -
4K x265 remove HDR but, keep HDR settings as a backup.
By Someonecool in forum Video ConversionReplies: 4Last Post: 22nd Oct 2018, 22:04 -
x265 Encoding
By yukukuhi in forum Video ConversionReplies: 5Last Post: 28th Feb 2018, 11:41 -
tool to view x265 encoding parameters
By vhelp in forum Video ConversionReplies: 14Last Post: 28th Oct 2017, 08:34 -
x265 parameters to retain image grain
By vhelp in forum Video ConversionReplies: 8Last Post: 8th Oct 2016, 20:39