View Single Post
Old 10th September 2019, 17:19   #33  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Quote:
Originally Posted by Loomes View Post
That's what I just tried using
Code:
ffmpeg -i input.mkv -c:v libx265 -x265-params crf=20:no-sao=yes:hdr=yes -pix_fmt yuv420p10le -bsf hevc_mp4toannexb -f rawvideo output.h265
but none of the HDR metadata got taken to the transcoded videofile. Maybe I am missing something? Is there a way to extract metadata from an HDR10 file (non plus) to a json file (like hdr10plus_parser does) and import it back in while piping with ffmpeg? The HDR Info in the source file are:
Code:
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.0001 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 1000 cd/m2
Maximum Frame-Average Light Level        : 288 cd/m2
I mean like:

Code:
ffmpeg.exe -i foo.mov -pix_fmt yuv420p10le -strict -1 -f yuv4mpegpipe - | x265.exe - --y4m --profile main10 --colorprim bt2020 --transfer smpte2084 --colormatrix bt2020nc --hdr --hdr-opt --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1)" --max-cll "1005,894" -o foo.hevc
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote