Page 1 of 1

help with hevc_qsv

Posted: Wed May 01, 2019 3:38 am
by leoncheong
I am able to use X264 to encode my video. However, if I change it to hevc_qsv, nothing happened and get a zero byte file. I am experimenting with intel GPU. I have an Intel Coffee Lake i3.

Here is the screen capture.

Code: Select all

D:\Videos>d:\ffmpeg\bin\ffmpeg.exe -i "Got.avi"  -c:v hevc_qsv  -c:a aac got2.avi >out.txt
ffmpeg version N-93686-g8019395889 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8.3.1 (GCC) 20190414
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-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 --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 52.100 / 58. 52.100
  libavformat    58. 27.103 / 58. 27.103
  libavdevice    58.  7.100 / 58.  7.100
  libavfilter     7. 50.100 /  7. 50.100
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, avi, from 'Got.avi':
  Metadata:
    encoder         : Lavf58.27.103
  Duration: 00:59:01.64, start: 0.000000, bitrate: 4833 kb/s
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 3283 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
    Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
File 'got2.avi' already exists. Overwrite ? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 (native) -> hevc (hevc_qsv))
  Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help

D:\Videos>

Re: help with hevc_qsv

Posted: Tue May 07, 2019 8:14 pm
by MeisterKnobi
When you have a dedicated GPU you must first enalbe the igpu in your bios when im remembering correctly.

Re: help with hevc_qsv

Posted: Tue May 07, 2019 8:52 pm
by pandy
This worked for me:

Code: Select all

@ffmpeg.exe -hide_banner -y -benchmark -loglevel 32 -stats -fflags +genpts -f lavfi -i testsrc2=s=uhd2160:r=50 -pix_fmt nv12 -flags +cgop -c:v hevc_qsv -preset:v 7 -profile:v 1 -load_plugin 2 -level:v 5.1 -b:v 38M -maxrate:v 40M-1 -minrate:v 1M -bufsize:v 19M-1 -qmin:v 4 -qmax:v 69 -g:v 250 -bf:v 3 -refs:v 5 -bitrate_limit 1 -async_depth 4 -vf "scale=s=uhd2160,pad=3840:2160:(ow-iw)/2:(oh-ih)/2,fps=fps=50,setpts=N/(50*TB)" -c:a copy -f mpegts - | ffplay.exe -hide_banner -loglevel 32 -analyzeduration 512Ki -probesize 512Ki -i - -vf "scale=iw/4:-2:sws_flags=lanczos"

Re: help with hevc_qsv

Posted: Wed May 08, 2019 1:36 am
by at2010
I think your main problem is the choice of media output container. You put "got2.avi" as output. The AVI container does not support hevc. Use got2.mkv using the Matroska format instead.
Also make sure your cpu/gpu supports hevc qsv hardware encode and that you have the latest intel graphics drivers installed.