View Single Post
Old 10th February 2018, 05:45   #1  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 540
how to use ffmpeg to encode to mp4-avc-HDR-4k

OK, call me stupid.

Googled for a couple of hours, found a plethora of semi-conflicting information, and am still not much clearer on what ffmpeg commandline switches to use to convert (re-encode) a 4K HDR webm video, eg vp9.2, (and other similar samples in various formats from across the web) into

an mp4 container as avc/HDR/4k, presmably profile high10 level 5.1
an mkv container as avc/HDR/4k, presmably profile high10 level 5.1

an mp4 container as hevc/HDR/4k
an mkv container as hevc/HDR/4k
equivalent in quality to the avc

I'd prefer to use ffmpeg rather than x264 and x265 if possible.

Any example commandlines and/or link(s) would be very greatly appreciated.

So far I've seem something like this
Code:
ffmpeg_10bit.exe -i <infile.i420.bt2020nc.yuv420p10le.webm> -input-depth 10 -c:a libopus -c:v libx265 -tag:v hvc1 -crf 15 -pix_fmt yuv420p10le -x265-params "colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc" -f mp4 -y "outfile.mp4"
and this which I'm fairly sure isn't right
Code:
ffmpeg.exe -i <infile.i420.bt2020nc.yuv420p10le.webm> --input-depth 10 -c:a libopus -c:v libx264 --preset slow -crf 15 -no-open-gop -profile high10 -level:v 5.1 -level-idc 5.1 -pix_fmt yuv420p10le -colorprim bt2020 -colormatrix bt2020nc -transfer smpte-st-2084 -x264opts "" -movflags faststart  -f mp4 -y "output.mp4"

Last edited by hydra3333; 10th February 2018 at 05:48.
hydra3333 is offline   Reply With Quote