mdhiggins / radarr-sma

MIT License
25 stars 13 forks source link

Issue with conversion #46

Closed TravisRoy closed 1 year ago

TravisRoy commented 1 year ago

Pulled the latest image last night, now getting the following error:

FFmpeg command:

/usr/local/bin/ffmpeg -i "Mulan (1998) {tmdb-10674} - Bluray-1080p.mkv" -vcodec hevc_vaapi -map 0:0 -field_order progressive -metadata:s:v title=FHD -metadata:s:v handler_name=FHD -preset slower -tag:v hvc1 -qp 28 -vaapi_device /dev/dri/renderD128 -vf "format=nv12|vaapi,hwupload" -c:a:0 ac3 -map 0:1 -ac:a:0 6 -b:a:0 768k -metadata:s:a:0 BPS=768000 -metadata:s:a:0 BPS-eng=768000 -metadata:s:a:0 "title=5.1 Channel" -metadata:s:a:0 "handler_name=5.1 Channel" -metadata:s:a:0 language=eng -disposition:a:0 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -f mp4 -threads 0 -metadata:g encoding_tool=SMA -y "/media/USB-7/Movies/Mulan (1998)/Mulan (1998) {tmdb-10674} - Bluray-1080p.mp4"

[ ] 0% Error converting file, FFMPEG error. Traceback (most recent call last): File "/usr/local/sma/resources/mediaprocessor.py", line 2292, in convert for timecode, debug in conv: File "/usr/local/sma/converter/init.py", line 329, in convert for timecode, debug in self.ffmpeg.convert(outfile, File "/usr/local/sma/converter/ffmpeg.py", line 795, in convert raise FFMpegConvertError('Exited with code %d' % p.returncode, cmd, converter.ffmpeg.FFMpegConvertError: /usr/local/bin/ffmpeg -i Mulan (1998) {tmdb-10674} - Bluray-1080p.mkv -vcodec hevc_vaapi -map 0:0 -field_order progressive -metadata:s:v title=FHD -metadata:s:v handler_name=FHD -preset slower -tag:v hvc1 -qp 28 -vaapi_device /dev/dri/renderD128 -vf format=nv12|vaapi,hwupload -c:a:0 ac3 -map 0:1 -ac:a:0 6 -b:a:0 768k -metadata:s:a:0 BPS=768000 -metadata:s:a:0 BPS-eng=768000 -metadata:s:a:0 title=5.1 Channel -metadata:s:a:0 handler_name=5.1 Channel -metadata:s:a:0 language=eng -disposition:a:0 +default-dub-original-comment-lyrics-karaoke-forced-hearing_impaired-visual_impaired-captions -f mp4 -threads 0 -metadata:g encoding_tool=SMA -y /media/USB-7/Movies/Mulan (1998)/Mulan (1998) {tmdb-10674} - Bluray-1080p.mp4 ffmpeg version 6.0-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2023 the FFmpeg developers built with gcc 8 (Debian 8.3.0-6) configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg libavutil 58. 2.100 / 58. 2.100 libavcodec 60. 3.100 / 60. 3.100 libavformat 60. 3.100 / 60. 3.100 libavdevice 60. 1.100 / 60. 1.100 libavfilter 9. 3.100 / 9. 3.100 libswscale 7. 1.100 / 7. 1.100 libswresample 4. 10.100 / 4. 10.100 libpostproc 57. 1.100 / 57. 1.100 Unrecognized option 'vaapi_device'. Error splitting the argument list: Option not found

There was an error processing file Mulan (1998) {tmdb-10674} - Bluray-1080p.mkv, no output data received

Docker compose:

radarr: image: mdhiggins/radarr-sma container_name: radarr volumes:

TravisRoy commented 1 year ago

Conversion works fine if I go into my sonarr container and convert it manually there.

mdhiggins commented 1 year ago

This error would suggest that your build of FFMPEG in the radarr container is missing VAAPI

Can you check the binary and see if that's the case?

docker exec radarr bash

ffmpeg -hwaccels

On my latest pull I'm getting it

Hardware acceleration methods:
vdpau
vaapi
drm
vulkan
mdhiggins commented 1 year ago

Also not sure why you are manually installing INSTALL_PIP_PACKAGES=tmdbsimple|guessit|mutagen|qtfaststart those are all handled by the container already

TravisRoy commented 1 year ago

Hardware acceleration methods: vdpau

It is missing vaapi, not sure why

mdhiggins commented 1 year ago

Not sure, I just did a fresh pull and used SMA_USE_REPO and mine has VAAPI. The container won't replace FFMPEG once its there so you might need a fresh container rebuild. FFMPEG is installed on first launch and maybe it pulled a different version.

TravisRoy commented 1 year ago

Adding this fixed the issue.

build: context: https://github.com/mdhiggins/radarr-sma.git#build args: ffmpeg_tag: 4.4-vaapi2004

mdhiggins commented 1 year ago

Additionally the intel libva-intel-driver and mesa-va-gallium drivers (not the dri one though) are installed when the SMA_HWACCEL option is enabled

Any difference between mesa-dri-gallium? I can add that if its a valuable package

The fix you posted should not be needed since the repo does include VAAPI but the build version is a viable option as well

mdhiggins commented 1 year ago

None of those pip packages are needed at the system level as long as you use the correct python installation which may be why you were finding the need to manually add them, be cautious as future dependencies won't work since they are installed in the python virtual environment

/usr/loca/sma/venv/bin/python3

TravisRoy commented 1 year ago

Yah, I don't bother with the virtual environment when I console into the container to manually do conversions. Adding those packages just make it easier for me.

I had to add the gallium package previously to fix something, it might not be needed any longer.

mdhiggins commented 1 year ago

Eh I'll add it to the collection, can't hurt to have more hardware support

You shouldn't need to do anything special other than call that version of python but to each their own