linuxserver / docker-ffmpeg

GNU General Public License v3.0
157 stars 47 forks source link

[BUG] Issue with QSV #86

Closed DatPat closed 2 months ago

DatPat commented 2 months ago

Is there an existing issue for this?

Current Behavior

whenever I try to use QSV I get spammed with errors and the encode results in a corrupted output file.

"docker run --rm -it --device=/dev/dri:/dev/dri -v $(pwd):/config linuxserver/ffmpeg -hwaccel qsv -i /config/input.mkv -c:v av1_qsv -global_quality 25 /config/output.mkv

this the command I run. and here are the errors I get (they repeat extremely frequently) [hevc_qsv @ 0x5613531e5ac0] get_buffer() failed [vist#0:0/hevc @ 0x5613531e4c40] [dec:hevc_qsv @ 0x56135322b2c0] Error submitting packet to decoder: Cannot allocate memory [hevc_qsv @ 0x5613531e5ac0] get_buffer() failed [vist#0:0/hevc @ 0x5613531e4c40] [dec:hevc_qsv @ 0x56135322b2c0] Error submitting packet to decoder: Cannot allocate memory [hevc_qsv @ 0x5613531e5ac0] get_buffer() failed [vist#0:0/hevc @ 0x5613531e4c40] [dec:hevc_qsv @ 0x56135322b2c0] Error submitting packet to decoder: Cannot allocate memory [hevc_qsv @ 0x5613531e5ac0] get_buffer() failed [vist#0:0/hevc @ 0x5613531e4c40] [dec:hevc_qsv @ 0x56135322b2c0] Error submitting packet to decoder: Cannot allocate memory [hevc_qsv @ 0x5613531e5ac0] get_buffer() failed [vist#0:0/hevc @ 0x5613531e4c40] [dec:hevc_qsv @ 0x56135322b2c0] Error submitting packet to decoder: Cannot allocate memory [hevc_qsv @ 0x5613531e5ac0] Error during QSV decoding.: device failed (-17) [vist#0:0/hevc @ 0x5613531e4c40] [dec:hevc_qsv @ 0x56135322b2c0] Error submitting packet to decoder: Input/output error

Expected Behavior

I would like a working output file.

Steps To Reproduce

docker run --rm -it --device=/dev/dri:/dev/dri -v $(pwd):/config linuxserver/ffmpeg -hwaccel qsv -hwaccel_output_format qsv -i /config/input.mkv -c:v av1_qsv -global_quality 25 /config/output.mkv

Environment

- OS:
Unraid 6.12.13

- How docker service was installed:
I used unraid, I put the registry url into the addcontainer page

Docker creation

I used the UI in unraid.

Container logs

ffmpeg version 7.0.2 Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 13 (Ubuntu 13.2.0-23ubuntu4)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-alsa --enable-cuda-llvm --enable-cuvid --enable-ffprobe --enable-gpl --enable-libaom --enable-libass --enable-libdav1d --enable-libfdk_aac --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-libkvazaar --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libplacebo --enable-librav1e --enable-librist --enable-libshaderc --enable-libsrt --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nonfree --enable-nvdec --enable-nvenc --enable-opencl --enable-openssl --enable-stripping --enable-vaapi --enable-vdpau --enable-version3 --enable-vulkan
  libavutil      59.  8.100 / 59.  8.100
  libavcodec     61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample   5.  1.100 /  5.  1.100
  libpostproc    58.  1.100 / 58.  1.100
Universal media converter
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'
**** creating video group videov6v0 with id 18 ****
**** adding /dev/dri/card0 to video group videov6v0 with id 18 ****
**** permissions for /dev/dri/renderD128 are good ****
github-actions[bot] commented 2 months ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

aptalca commented 2 months ago

No idea, but there are similar reports when running it on bare metal, which seems to be av1_qsv related: https://www.reddit.com/r/ffmpeg/comments/1blbi6i/cant_use_qsv_hardware_acceleration_decoding_with/

DatPat commented 2 months ago

No idea, but there are similar reports when running it on bare metal, which seems to be av1_qsv related: https://www.reddit.com/r/ffmpeg/comments/1blbi6i/cant_use_qsv_hardware_acceleration_decoding_with/

you are right, this happens on bare-metal as well in the same way, so the issue does not pertain to this container and can be closed. I apologize for having not tested on baremetal before opening this issue.