Code Monkey home page Code Monkey logo

Comments (10)

apeman76 avatar apeman76 commented on May 25, 2024 1

Yes ofcourse:

[Converter]
hwaccel-decoders = hevc_qsv, h264_qsv, hevc_vaapi, h264_vaapi, h264_cuvid, mjpeg_cuvid, mpeg1_cuvid, mpeg2_cuvid, mpeg4_cuvid, vc1_cuvid
hwdevices = qsv:/dev/dri/renderD128
hwaccel-output-format = vaapi:vaapi

[Video]
codec = hevc_vaapi

It is currently running privileged, and with the 'devices' block added to the docker container

This gives me no errors at all 👍

from sonarr-sma.

mdhiggins avatar mdhiggins commented on May 25, 2024

Are you using a build of FFMPEG that supports hardware acceleration in these containers? The base FFMPEG binaries included in sonarr-sma/radarr-sma do not and it looks like hwaccel options aren't being applied to your final command which would happen if the build doesn't support it (the script checks against your current FFMPEG build before applying those options)

This error check is done at the decoder level previously but not encoders but I just included an update that checks the encoders you've chosen as well and puts up a warning if not supported

9cef08221d35622a85b44c800fc6e20f9d002e0e

You'll need to use the build tag which will build your docker container locally and also build FFMPEG for you to support whichever hardware acceleration you're trying to achieve (QSV in this case)

from sonarr-sma.

apeman76 avatar apeman76 commented on May 25, 2024

Hello,

I have tried building a new docker container with the example docker-compose file:

services:
  sonarr:
    container_name: sonarr
    build:
      context: https://github.com/mdhiggins/sonarr-sma.git#build
      args:
        - ffmpeg_tag=4.2-vaapi

This all works and everything is functioning except I get a different error now:

2022-01-28 02:24:37 - SonarrPostProcess - INFO - Sonarr extra script post processing started.
2022-01-28 02:24:42 - SonarrPostProcess - INFO - Sonarr extra script post processing started.
2022-01-28 02:34:04 - SonarrPostProcess - INFO - Sonarr extra script post processing started.
2022-01-28 02:34:04 - resources.readsettings - INFO - /usr/local/sma/venv/bin/python3
2022-01-28 02:34:04 - resources.readsettings - INFO - Loading config file /usr/local/sma/config/autoProcess.ini.
2022-01-28 02:34:04 - resources.mediaprocessor - INFO - File /tv/The Simpsons/Season 33/The.Simpsons.S33E05.WEB.x264-TORRENTGALAXY[TGx].mkv is not valid
2022-01-28 02:34:04 - SonarrPostProcess - INFO - Processing returned False.
2022-01-28 02:34:04 - SonarrPostProcess - ERROR - Error processing file.
Traceback (most recent call last):
  File "/usr/local/sma/postSonarr.py", line 322, in <module>
    sys.exit(1)
SystemExit: 1
2022-01-28 02:39:00 - SonarrPostProcess - INFO - Sonarr extra script post processing started.
2022-01-28 02:39:00 - resources.readsettings - INFO - /usr/local/sma/venv/bin/python3
2022-01-28 02:39:00 - resources.readsettings - INFO - Loading config file /usr/local/sma/config/autoProcess.ini.
2022-01-28 02:39:00 - resources.mediaprocessor - INFO - File /tv/The Simpsons/Season 32/The.Simpsons.S32E22.WEB.x264-PHOENiX[TGx].mkv is not valid
2022-01-28 02:39:00 - SonarrPostProcess - INFO - Processing returned False.
2022-01-28 02:39:00 - SonarrPostProcess - ERROR - Error processing file.
Traceback (most recent call last):
  File "/usr/local/sma/postSonarr.py", line 322, in <module>
    sys.exit(1)
SystemExit: 1

Sorry i am not really that familiar with docker-compose and building containers :/

from sonarr-sma.

mdhiggins avatar mdhiggins commented on May 25, 2024

Looks like your build probably isn't working, if you bash into the container and try to run ffprobe or ffmpeg I'm betting you're going to get a compile error

This is usually a result of using different versions of ubuntu/linux across the FFMPEG build container and the host (sonarr) container.

You can bash into your sonarr container and run

cat /etc/issue which should show you the Ubuntu version, for me its 20.04

In which case adjust your build tag to match

services:
  sonarr:
    container_name: sonarr
    build:
      context: https://github.com/mdhiggins/sonarr-sma.git#build
      args:
        sonarr_tag: develop
        ffmpeg_tag: 4.4-vaapi2004

and while VAAPI and QSV are similar, they aren't exactly the same so you may need to choose your encoders/decoders to support VAAPI instead of quicksync specifically (h265vaapi instead of h265qsv/hevcqsv) though you can check your specific build of FFMPEG to be certain by running ffmpeg -encoders and see if its listed

Edit: Quick check - looks like the develop version of sonarr is on 2004 and the latest tag is still on 1804 so match accordingly and check your own setup, updated example, also arg syntax shouldn't have - on newer versions of docker-compose so I updated that as well

from sonarr-sma.

apeman76 avatar apeman76 commented on May 25, 2024

Yes, thank you so much!! It works perfectly now after rebuilding the image!

from sonarr-sma.

mdhiggins avatar mdhiggins commented on May 25, 2024

Out of curiosity just in case I encounter this in the future, could you share your final settings for hwaccel related options and which encoder your chose?

Thanks

from sonarr-sma.

mdhiggins avatar mdhiggins commented on May 25, 2024

Your setting hwdevices = qsv:/dev/dri/renderD128 is probably not being applied here, should change that to

hwdevices = vaapi:/dev/dri/renderD128

since you switched to VAAPI (though the default device is /dev/dri/renderD128 which is why its probably still working though you might be getting some warnings)

from sonarr-sma.

apeman76 avatar apeman76 commented on May 25, 2024

Thank you, I have edited that and it still works!
I have 1 issue left that I cant seem to fix, I have really bad quality output but havent set any limitations or changes to the source's quality. Any idea why this could be?

[Video]
codec = hevc_vaapi
max-bitrate = 0
bitrate-ratio = 
crf = -1
crf-profiles = 
preset = 
codec-parameters = 
dynamic-parameters = True
max-width = 0
profile = 
max-level = 0.0
pix-fmt = 
filter = 
force-filter = False

This is from a 1080p 1.02GB h264 file to a 170MB h265 file
https://i.postimg.cc/kMfYxQHX/Screenshot-2022-02-01-181200.png

from sonarr-sma.

mdhiggins avatar mdhiggins commented on May 25, 2024

I mean you basically have no quality settings chosen here and FFMPEG in general defaults to pretty poor settings
Try setting your crf (which for VAAPI gets translated to the -qp parameter) to something like 22 to 25 though these are more basic FFMPEG questions you should really be researching on your own

You can also mess around with the crf-profiles / profile / and bitrate-ratio options if you want to fine tune things, see the wiki for how these work

from sonarr-sma.

apeman76 avatar apeman76 commented on May 25, 2024

I will try out some settings and see the result. Thanks for all the help!!

from sonarr-sma.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.