I am trying to encode to HEVC codec. While it works no problem using libx265, I am struggling with hevc_qsv. When I try to run the following, all I get is an empty output file (0 bytes). It gives no errors, the command takes only approx. 1 second and the result is empty file.
Code: Select all
ffmpeg -loglevel verbose -y -i in.mp4 -load_plugin hevc_hw -c:v hevc_qsv -c:a copy out.mp4
ffmpeg version N-92722-gf22fcd4483 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 8.2.1 (GCC) 20181201
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enabl
e-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amr
wb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enab
le-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --
enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc -
-enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --e
nable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil 56. 24.101 / 56. 24.101
libavcodec 58. 42.102 / 58. 42.102
libavformat 58. 24.101 / 58. 24.101
libavdevice 58. 6.101 / 58. 6.101
libavfilter 7. 46.101 / 7. 46.101
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
[h264 @ 0000020b3a13d4c0] Reinit context to 1920x1088, pix_fmt: yuv420p
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'in.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.24.101
Duration: 00:02:30.88, start: 0.000000, bitrate: 2640 kb/s
Stream #0:0(und): Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(left), 1920x1080 (1920x1088) [S
AR 1:1 DAR 16:9], 2504 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> hevc (hevc_qsv))
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[h264 @ 0000020b3a1fdb00] Reinit context to 1920x1088, pix_fmt: yuv420p
[graph 0 input from stream 0:0 @ 0000020b3b789dc0] w:1920 h:1080 pixfmt:yuv420p tb:1/12800 fr:25/1 sar:1/1 sws_param:fla
gs=2
[auto_scaler_0 @ 0000020b3a62c600] w:iw h:ih flags:'bicubic' interl:0
[format @ 0000020b3c3c9540] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_null_0' and the filter 'for
mat'
[auto_scaler_0 @ 0000020b3a62c600] w:1920 h:1080 fmt:yuv420p sar:1/1 -> w:1920 h:1080 fmt:nv12 sar:1/1 flags:0x4
[hevc_qsv @ 0000020b3a770980] Initialized an internal MFX session using hardware accelerated implementation
[hevc_qsv @ 0000020b3a770980] Using the average variable bitrate (AVBR) ratecontrol method
Just for curiosity, I also tried h264_qsv codec, but the result is the same — empty file.
Any help?