Opened 4 years ago

Last modified 3 years ago

#8896 new defect

hevc_amf fails with error 10

Reported by: regulus Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: amf
Cc: drokergeek@gmail.com Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Hi,

I'm trying to use the hevc_amf encoder to transcode some h264 videos I have. Even though the h264_amf encoder works, hevc_amf always fails with the error code 10 no matter what I do. I compiled my ffmpeg build from the git-master with vulkan, amf and openCL enabled. The GPU is a 5700XT and I tried it in both Ubuntu and Arch but the error didn't go away.

Here is the command and the output, sample.mp4 was a h264 encoded file that was also produced by ffmpeg. I tried a vp8 webm as an input as well but the error was the same.

VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/amd_pro_icd64.json ffmpeg -v 9 -loglevel 99 -i sample.mp4 -vcodec hevc_amf o.mkv

ffmpeg version N-99044-gd1f3d721df Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.2.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
  libavutil      56. 58.100 / 56. 58.100
  libavcodec     58.105.100 / 58.105.100
  libavformat    58. 54.100 / 58. 54.100
  libavdevice    58. 11.101 / 58. 11.101
  libavfilter     7. 87.100 /  7. 87.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
[h264 @ 0x563a411bc040] Reinit context to 528x336, pix_fmt: yuv420p
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sample.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : swastika_biker
    encoder         : Lavf58.54.100
  Duration: 00:00:40.55, start: 0.000000, bitrate: 639 kb/s
    Stream #0:0(und): Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(left), 516x326 (528x336) [SAR 1:1 DAR 258:163], 504 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
File 'o.mkv' already exists. Overwrite? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> hevc (hevc_amf))
  Stream #0:1 -> #0:1 (aac (native) -> vorbis (libvorbis))
Press [q] to stop, [?] for help
[h264 @ 0x563a411d2580] Reinit context to 528x336, pix_fmt: yuv420p
[graph_1_in_0_1 @ 0x563a414feb80] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x3
[graph 0 input from stream 0:0 @ 0x563a41224200] w:516 h:326 pixfmt:yuv420p tb:1/12800 fr:25/1 sar:1/1
[hevc_amf @ 0x563a411d4840] AMF initialisation succeeded via Vulkan.
[hevc_amf @ 0x563a41270340] CreateComponent(AMFVideoEncoderHW_HEVC) failed with error 10
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[AVIOContext @ 0x563a411c0940] Statistics: 0 seeks, 0 writeouts
[libvorbis @ 0x563a411cb640] 41 frames left in the queue on closing
[AVIOContext @ 0x563a411c3180] Statistics: 163096 bytes read, 2 seeks
Conversion failed!

Is this caused by my configuration being faulty or is there a problem with the hevc_amf encoder? Since h264_amf encoder works and hevc_amf gets successfully initialized I don't think it is an issue with my Linux installation.

Change History (1)

comment:1 by Akrai, 3 years ago

Cc: drokergeek@gmail.com added

I can confirm the same error both using the official Arch Linux ffmpeg package, and the community git ffmpeg-amd-full-git.

Note: See TracTickets for help on using tickets.