[FFmpeg-trac] #10844(ffmpeg:new): VideoToolBox HEVC encoding does work not for HDR
FFmpeg
trac at avcodec.org
Sun Feb 4 12:15:53 EET 2024
#10844: VideoToolBox HEVC encoding does work not for HDR
-------------------------------------+-------------------------------------
Reporter: Atarikid | Type: defect
Status: new | Priority: normal
Component: ffmpeg | Version: git-
Keywords: | master
hevc_videotoolbox | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
When encoding to HEVC using VideoToolbox - the HDR metadata () is not
copied.
/Users/atari/Movies/ffmpeg -i /Users/atari/Desktop/StarWarsHDR.mov -c:a
copy-c:v hevc_videotoolbox -q:v 40 -pix_fmt yuv420p10le -color_primaries
bt2020 -color_trc smpte2084 -colorspace bt2020_ncl -tag:v hvc1 -y
/Users/atari/Movies/StarWarsHDR2.mov
**The original HDR file**
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10 at L5.1@High
**HDR format : SMPTE ST 2086, HDR10
compatible**
Codec ID : hvc1
Codec ID/Info : High Efficiency Video Coding
Duration : 2 min 20 s
Bit rate : 717 kb/s
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 24.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0 (Type 0)
Bit depth : 10 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.032
Stream size : 12.0 MiB (78%)
Writing library : x265 3.5+1-f0c1022b6:[Mac OS
X][clang 13.1.6][64 bit] 10bit
Encoding settings : cpuid=2 / frame-threads=3 / wpp
/ no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 /
input-res=1280x720 / interlace=0 / total-frames=0 / level-idc=51 / high-
tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / repeat-headers /
annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop /
min-keyint=24 / keyint=240 / gop-lookahead=0 / bframes=4 / b-adapt=0 /
b-pyramid / bframe-bias=0 / rc-lookahead=15 / lookahead-slices=4 /
scenecut=40 / hist-scenecut=0 / radl=0 / no-splice / no-intra-refresh /
ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-
depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=0 / dynamic-rd=0.00 /
no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-
constrained-intra / strong-intra-smoothing / max-merge=2 / limit-refs=3 /
no-limit-modes / me=1 / subme=2 / merange=57 / temporal-mvp / no-frame-dup
/ no-hme / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / sao
/ no-sao-non-deblock / rd=2 / selective-sao=4 / no-early-skip / rskip /
fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip
/ rdpenalty=0 / psy-rd=2.00 / psy-rdoq=0.00 / no-rd-refine / no-lossless /
cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=25.0 / qcomp=0.50 / 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=51 / qpmin=3 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 /
range=0 / colorprim=9 / transfer=16 / colormatrix=9 / chromaloc=1 /
chromaloc-top=0 / chromaloc-bottom=0 / display-window=0 / master-
display=G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(10000000,0)
/ cll=1000,400 / 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 / scenecut-
aware-qp=0conformance-window-offsets / right=0 / bottom=0 / decoder-max-
rate=0 / no-vbv-live-multi-pass
Encoded date : 2024-02-04 07:56:59 UTC
Tagged date : 2024-02-04 07:56:59 UTC
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : BT.2020
Mastering display luminance : min: 0.0000 cd/m2, max: 1000
cd/m2
Maximum Content Light Level : 1000 cd/m2
Maximum Frame-Average Light Level : 400 cd/m2
Codec configuration box : hvcC
**This is de info of the encoded file with VideoToolBox**
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10 at L5@Main
Codec ID : hvc1
Codec ID/Info : High Efficiency Video Coding
Duration : 19 s 917 ms
Bit rate : 341 kb/s
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 24.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.015
Stream size : 830 KiB (63%)
Encoded date : 2024-02-04 10:07:19 UTC
Tagged date : 2024-02-04 10:07:19 UTC
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Codec configuration box : hvcC
As you see the Mastering display is not copied. This is needed for marking
it as a HDR file.
Please improve/fix this.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10844>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list