[FFmpeg-user] Transcode video problem with h264_nvenc

Gabor Alsecz alseczg at gmail.com
Wed Oct 19 12:46:33 EEST 2016


Dear All,

I try to transcode a video with h264_nvenc codec with the following command
(including stdout/pipe, Windows):
ffmpeg -i perspective1440.mp4 -c:v h264_nvenc -profile:v high -vf
format=nv12 -qp 0 -f h264 - > perspective1440_out_nvenc.mp4

*Output:*
ffmpeg version N-81960-g1bda0ee Copyright (c) 2000-2016 the FFmpeg
developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth
--enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
--enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264
--enable-libopenjpeg --enable-libopus --enable-librtmp
--enable-libschroedinger --enable-libsnappy --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg
--enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 32.100 / 55. 32.100
  libavcodec     57. 61.100 / 57. 61.100
  libavformat    57. 51.103 / 57. 51.103
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 63.100 /  6. 63.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  2.100 /  2.  2.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'perspective1440.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.51.103
  Duration: 00:07:27.92, start: 0.000000, bitrate: 4157 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
2560x1440 [SAR 1:1 DAR 16:9], 4154 kb/s, 29.97 fps, 29.97 tbr, 30k tbn,
59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler
Codec AVOption qp (Constant quantization parameter rate control method)
specified for output file #0 (pipe:) has not been used for any stream. The
most likely reason is either wrong type (e.g. a video option with no video
streams) or that it is a private option of some encoder which was not
actually used for any stream.
Output #0, h264, to 'pipe:':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.51.103
    Stream #0:0(eng): Video: h264 (h264_nvenc) (High), nv12, 2560x1440 [SAR
1:1 DAR 16:9], q=-1--1, 2000 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc57.61.100 h264_nvenc
    Side data:
      cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 4000000 vbv_delay:
-1
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_nvenc))
Press [q] to stop, [?] for help
frame=13424 fps=266 q=26.0 Lsize=  104655kB time=00:07:27.91
bitrate=1914.1kbits/s speed=8.88x
video:104655kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.000000%


So far this seems fine, the process executed, video file created. But when
tried to play with any video player it does nothing.

*Than i have checked with ffprobe:*
$ ffprobe perspective1440_out_nvenc.mp4
ffprobe version N-81960-g1bda0ee Copyright (c) 2007-2016 the FFmpeg
developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth
--enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
--enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264
--enable-libopenjpeg --enable-libopus --enable-librtmp
--enable-libschroedinger --enable-libsnappy --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg
--enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 32.100 / 55. 32.100
  libavcodec     57. 61.100 / 57. 61.100
  libavformat    57. 51.103 / 57. 51.103
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 63.100 /  6. 63.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  2.100 /  2.  2.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, h264, from 'perspective1440_out_nvenc.mp4':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuv420p, 2560x1440 [SAR 1:1 DAR 16:9],
29.97 fps, 29.97 tbr, 1200k tbn, 59.94 tbc


*While the ffprobe of the original input media is:*
$ ffprobe perspective1440.mp4
ffprobe version N-81960-g1bda0ee Copyright (c) 2007-2016 the FFmpeg
developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth
--enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
--enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264
--enable-libopenjpeg --enable-libopus --enable-librtmp
--enable-libschroedinger --enable-libsnappy --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg
--enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 32.100 / 55. 32.100
  libavcodec     57. 61.100 / 57. 61.100
  libavformat    57. 51.103 / 57. 51.103
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 63.100 /  6. 63.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  2.100 /  2.  2.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'perspective1440.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.51.103
  Duration: 00:07:27.92, start: 0.000000, bitrate: 4157 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
2560x1440 [SAR 1:1 DAR 16:9], 4154 kb/s, 29.97 fps, 29.97 tbr, 30k tbn,
59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler



What i've missed here? Thanks!

br,
Gabor


More information about the ffmpeg-user mailing list