m1k1o / go-transcode

On-demand transcoding origin server for live inputs and static files in Go using ffmpeg. Also with NVIDIA GPU hardware acceleration.
Apache License 2.0
212 stars 39 forks source link

Auto-detect hardware acceleration #6

Closed klahaha closed 2 years ago

klahaha commented 2 years ago

We can detect hardware acceleration in program. Using ffmpeg cli

ffmpeg -init_hw_device list 2> /dev/null
Supported hardware device types:
vdpau
vaapi
qsv
drm
opencl

then no need for profiles config just print what profiles are used on startup

what outputs the command with nvidia proprietaire driver?

m1k1o commented 2 years ago

For nvidia it prints:

Supported hardware device types:
vdpau
cuda
vaapi

So it's cuda.

klahaha commented 2 years ago

now in repo via #3