[FFmpeg-user] VP9 to HEVC hdr demo conversion?

traycold traycold at gmail.com
Mon Dec 12 00:25:46 EET 2016


hi,
I tried the same (convert a vp9.2 hdr video to hevc to watch it on a samsung
smart tv).
So far, I tried this command (input.mkv contains both VP9.2 video stream and
audio stream):

ffmpeg -i input.mkv -vf
scale=out_color_matrix=bt2020:out_h_chr_pos=0:out_v_chr_pos=0,format=yuv420p10
-pix_fmt yuv420p10le -c:v libx265 -x265-params
"colorprim=bt2020:transfer=smpte-st-2084:colormatrix=bt2020nc" -crf 22 -c:a
copy output.mkv 

It works in the sense that the video is visible on smart TV. Looking with
mediainfo it seems ok to me, but the video is notably darker and color
different than original (for instance: orange becomes almost a dark red).

So probably there is something wrong. Honestly I just put that command
together looking at various forums, threads, tutorials I found on the web,
as I'm a totally noob with encoding and ffmpeg.

Hope this may help, anyway. And someone can provide a better way to convert.


$ ffmpeg -i input.mkv 
ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 6.2.1 (GCC) 20160916 (Red Hat 6.2.1-2)
  configuration: --arch=x86_64 --bindir=/usr/bin --datadir=/usr/share/ffmpeg
--disable-debug --disable-static --disable-stripping --enable-avfilter
--enable-avresample --enable-bzlib --enable-cuda --enable-cuvid
--enable-libnpp --enable-doc --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-gpl --enable-iconv --enable-libass
--enable-libbluray --enable-libcdio --enable-libdc1394 --enable-libebur128
--enable-libfdk-aac --enable-libfreetype --enable-libfribidi --enable-libgsm
--enable-libkvazaar --enable-libmfx --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264
--enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp
--enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh
--enable-libtheora --enable-libtwolame --enable-libv4l2
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxcb --enable-libxcb-shm
--enable-libxcb-xfixes --enable-libxcb-shape --enable-libxvid
--enable-libzvbi --enable-lzma --enable-nonfree --enable-openal
--enable-opencl --enable-nvenc --enable-opengl --enable-postproc
--enable-pthreads --enable-sdl2 --enable-shared --enable-version3
--enable-x11grab --enable-xlib --enable-zlib
--extra-cflags='-I/usr/include/nvenc -I/usr/include/cuda'
--incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man
--optflags='-O2 -g -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic'
--prefix=/usr --shlibdir=/usr/lib64 --enable-runtime-cpudetect
  libavutil      55. 34.100 / 55. 34.100
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.100 / 57. 56.100
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
Input #0, matroska,webm, from 'input.mkv':
  Metadata:
    ENCODER         : Lavf57.56.100
  Duration: 00:14:09.76, start: -0.007000, bitrate: 13227 kb/s
    Stream #0:0(eng): Video: vp9 (Profile 2), yuv420p10le(tv,
bt2020nc/unknown/unknown), 3840x1600, lossless, SAR 1:1 DAR 12:5, 23.98 fps,
23.98 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      DURATION        : 00:14:09.730000000
    Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      DURATION        : 00:14:09.761000000
    Stream #0:2(eng): Subtitle: webvtt
    Metadata:
      DURATION        : 00:11:26.380000000


$ ffmpeg -i output.mkv 
ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 6.2.1 (GCC) 20160916 (Red Hat 6.2.1-2)
  configuration: --arch=x86_64 --bindir=/usr/bin --datadir=/usr/share/ffmpeg
--disable-debug --disable-static --disable-stripping --enable-avfilter
--enable-avresample --enable-bzlib --enable-cuda --enable-cuvid
--enable-libnpp --enable-doc --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-gpl --enable-iconv --enable-libass
--enable-libbluray --enable-libcdio --enable-libdc1394 --enable-libebur128
--enable-libfdk-aac --enable-libfreetype --enable-libfribidi --enable-libgsm
--enable-libkvazaar --enable-libmfx --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264
--enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp
--enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh
--enable-libtheora --enable-libtwolame --enable-libv4l2
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxcb --enable-libxcb-shm
--enable-libxcb-xfixes --enable-libxcb-shape --enable-libxvid
--enable-libzvbi --enable-lzma --enable-nonfree --enable-openal
--enable-opencl --enable-nvenc --enable-opengl --enable-postproc
--enable-pthreads --enable-sdl2 --enable-shared --enable-version3
--enable-x11grab --enable-xlib --enable-zlib
--extra-cflags='-I/usr/include/nvenc -I/usr/include/cuda'
--incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man
--optflags='-O2 -g -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic'
--prefix=/usr --shlibdir=/usr/lib64 --enable-runtime-cpudetect
  libavutil      55. 34.100 / 55. 34.100
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.100 / 57. 56.100
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
Input #0, matroska,webm, from 'output.mkv':
  Metadata:
    ENCODER         : Lavf57.56.100
  Duration: 00:14:09.76, start: -0.007000, bitrate: 1509 kb/s
    Stream #0:0(eng): Video: hevc (Main 10), yuv420p10le(tv,
bt2020nc/bt2020/smpte2084, progressive), 3840x1600 [SAR 1:1 DAR 12:5], 23.98
fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
    Metadata:
      ENCODER         : Lavc57.64.101 libx265
      DURATION        : 00:14:09.724000000
    Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      DURATION        : 00:14:09.761000000



--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/VP9-to-HEVC-hdr-demo-conversion-tp4678255p4678540.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list