This is a sample output of FFmpeg 8-bit full hardware encoding with Nvidia HEVC. This is possible with NVIDIA GeForce GTX 950 (Maxwell GM206) and all Pascal based GPUs. Running NVIDIA driver version: nvidia-381, and latest FFmpeg-snapshot!

~/Videos$ ffmpeg -hwaccel cuvid -c:v h264_cuvid -i 'avc input.mp4' -c:v hevc_nvenc -g 25 -b:v 1500k -c:a aac -metadata:s:a language=eng -metadata creation_time=now -loglevel verbose 'hevc output.mp4'

ffmpeg version N-85767-gdec2fa8-1build2 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.0 (Ubuntu 6.3.0-12ubuntu2) 20170406
  configuration: --prefix=/usr --extra-version=1build2 --toolchain=hardened --libdir=/usr/local/lib --incdir=/usr/local/include --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared --enable-nonfree --enable-libfdk-aac
  libavutil      55. 61.100 / 55. 61.100
  libavcodec     57. 93.100 / 57. 93.100
  libavformat    57. 72.101 / 57. 72.101
  libavdevice    57.  7.100 / 57.  7.100
  libavfilter     6. 88.100 /  6. 88.100
  libavresample   3.  6.  0 /  3.  6.  0
  libswscale      4.  7.101 /  4.  7.101
  libswresample   2.  8.100 /  2.  8.100
  libpostproc    54.  6.100 / 54.  6.100
[h264 @ 0x55c238f79660] Reinit context to 1280x544, pix_fmt: yuv420p
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'avc input.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2017-05-09T14:15:02.000000Z
  Duration: 00:04:59.72, start: 0.000000, bitrate: 1703 kb/s
    Stream #0:0(und): Video: h264 (Main), 1 reference frame (avc1 / 0x31637661), yuv420p(tv, bt709, left), 1280x540 (1280x544) [SAR 1:1 DAR 64:27], 1574 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2017-05-09T14:15:02.000000Z
      handler_name    : ISO Media file produced by Google Inc.
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
    Metadata:
      creation_time   : 2017-05-09T14:15:02.000000Z
      handler_name    : ISO Media file produced by Google Inc.
File 'hevc output.mp4' already exists. Overwrite ? [y/N] y
[h264_cuvid @ 0x55c238f96680] Initializing cuvid hwaccel
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (h264_cuvid) -> hevc (hevc_nvenc))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[h264_cuvid @ 0x55c238f96680] Initializing cuvid hwaccel
[h264_cuvid @ 0x55c238f96680] Formats: Original: cuda | HW: cuda | SW: nv12
[graph 0 input from stream 0:0 @ 0x55c23911aa20] w:1280 h:540 pixfmt:cuda tb:1/90000 fr:25/1 sar:1/1 sws_param:flags=2
[hevc_nvenc @ 0x55c239118600] Loaded Nvenc version 8.0
[hevc_nvenc @ 0x55c239118600] Nvenc initialized successfully
[graph_1_in_0_1 @ 0x55c2391243e0] tb:1/44100 samplefmt:fltp samplerate:44100 chlayout:0x3
Output #0, mp4, to 'hevc output.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : now
    encoder         : Lavf57.72.101
    Stream #0:0(und): Video: hevc (hevc_nvenc) (Main), 1 reference frame ([35][0][0][0] / 0x0023), cuda(progressive, left), 1280x540 [SAR 1:1 DAR 64:27], q=-1--1, 1500 kb/s, 25 fps, 12800 tbn, 25 tbc (default)
    Metadata:
      creation_time   : 2017-05-09T14:15:02.000000Z
      handler_name    : ISO Media file produced by Google Inc.
      encoder         : Lavc57.93.100 hevc_nvenc
    Side data:
      cpb: bitrate max/min/avg: 0/0/1500000 buffer size: 3000000 vbv_delay: -1
    Stream #0:1(eng): Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz, stereo, fltp, delay 1024, 128 kb/s (default)
    Metadata:
      creation_time   : 2017-05-09T14:15:02.000000Z
      handler_name    : ISO Media file produced by Google Inc.
      encoder         : Lavc57.93.100 aac
*** 5 dup!2 fps=319 q=22.0 size=   59463kB time=00:04:54.56 bitrate=1653.7kbits/s speed=12.8x    
No more output streams to write to, finishing.
frame= 7498 fps=321 q=21.0 Lsize=   59739kB time=00:04:59.88 bitrate=1631.9kbits/s dup=5 drop=0 speed=12.8x    
video:54737kB audio:4813kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.318227%
Input file #0 (avc input.mp4):
  Input stream #0:0 (video): 7493 packets read (59002620 bytes); 7493 frames decoded; 
  Input stream #0:1 (audio): 12908 packets read (4705214 bytes); 12908 frames decoded (13217792 samples); 
  Total: 20401 packets (63707834 bytes) demuxed
Output file #0 (hevc output.mp4):
  Output stream #0:0 (video): 7498 frames encoded; 7498 packets muxed (56050957 bytes); 
  Output stream #0:1 (audio): 12908 frames encoded (13217792 samples); 12909 packets muxed (4928097 bytes); 
  Total: 20407 packets (60979054 bytes) muxed
[hevc_nvenc @ 0x55c239118600] Nvenc unloaded
[aac @ 0x55c239119ba0] Qavg: 571.508

Leave a Reply

Your email address will not be published. Required fields are marked *