mdhiggins / sonarr-sma

Sonarr docker based on linuxserver/sonarr with SMA built in using python3
MIT License
37 stars 18 forks source link

Question: Using videotoolbox for Hardware Acceleration Encoding w/Docker on MacOS #46

Closed Junto026 closed 1 year ago

Junto026 commented 1 year ago

I looked through jrottenberg/ffmpeg tags for a way to build FFMPEG with h264_videotoolbox encoding option to no avail. Has anybody explored and found a way to incorporate that codec into the container?

mdhiggins commented 1 year ago

Is that encoding option not part of the default set? I see the headers mentioned on this pull request from a while back

https://github.com/jrottenberg/ffmpeg/pull/240

This would be more of a question for jrottenberg but ultimately if this doesn't support it you'll probably have to supply a custom built binary. You can either pull this from an HTTP source by setting SMA_FFMPEG_URL which will override the default URL. You can also just provide the binary by a mounted volume in docker

The script basically runs

# ffmpeg
if [[ $(which ffmpeg) ]]
then
    :
else

so if you mount an ffmpeg/ffprobe binary somewhere in the system paths (/usr/local/bin for example) using docker volumes the system will use those binaries instead and not overwrite or bypass them

Junto026 commented 1 year ago

Sounds like what I'm trying to do is not possible. I'm using a MacOS host and passing through the MacOS device to the Linux VM in Docker to leverage hardware acceleration isn't doable. Maybe I'll find a way to do the conversions outside of the container, directly on the host. Thanks again for the help.