-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Add hardware acceleration for FFmpeg #190
Comments
What is missing to make it possible? |
Isn't passing the |
I am not an expert but I assume some hardware acceleration related arguments need to be added to the ffmpeg command: https://trac.ffmpeg.org/wiki/Hardware/QuickSync (In addition to passing the device to the container) |
I added FFMPEG_ARGS as en env variable, set it to "-hwaccel qsv" and pass the gpu to the container. Hopefully it works, I dont have an intel cpu but I tested with vulkan. |
When trying to convert something I'm getting this error:
Here is my docker compose: convertx:
user: "701:701"
image: "ghcr.io/c4illin/convertx:main"
container_name: "convertx"
restart: "unless-stopped"
devices:
- "/dev/dri:/dev/dri"
environment:
- "FFMPEG_ARGS=-hwaccel qsv"
- "TZ=*****"
- "JWT_SECRET=*******"
volumes:
- "./convertx:/app/data"
networks:
- external Output of crw-rw---- 1 root 701 226, 1 dec 9 11:40 card1
crw-rw-rw- 1 root 701 226, 128 dec 9 11:40 renderD128 And inside the container crw-rw---- 1 root 701 226, 1 Dec 9 11:40 card1
crw-rw-rw- 1 root 701 226, 128 Dec 9 11:40 renderD128 Hardware acceleration is working fine in other containers with the same setup. |
Does ffmpeg work with hardware acceleration outside the container? Maybe some more args is needed |
It should be enough I think. This works outside the container |
Ok, if the command works by itself but not in the container with the same input there is only two possibilities: you added the wrong device or the alpine version of ffmpeg doesn't inclue qsv |
Maybe try again and add |
You could also test |
Hello Everyone. To make it work on my synology with intel celeron J4125 that uses i965 intel video driver (vaapi):
I also downloaded the i965 driver file : i965_drv_video.so and mapped it inside the container. Compose file:
This worked with my synology and converts with hardware accelerated ffmpeg just fine. In any case i would like to say thank you to the developer since its a great and handy tool! |
Thanks for taking a look at this. I added it! :) |
I have just started using this software and it seems great. However, using FFmpeg for conversion of large video files can take a lot of time if using CPU only for transcoding. Using e.g. Intel Quick Sync for hardware acceleration would probably speed things up a lot.
The text was updated successfully, but these errors were encountered: