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
208 stars 38 forks source link

VAAPI support #34

Closed noideaman closed 2 years ago

noideaman commented 2 years ago

Updated hls_h264 and http to support vaapi detection Updated readme on how to add dri devices to containers added helper vaapi script to detect supported encoders/decoders updated Dockerfile to use alpine edge to get access to drivers and utilities added alpine edge testing repo to get access to drivers and utilities

m1k1o commented 2 years ago

I split basic dependencies and vdpau dependencies in dockerfile. So that they can be separated.

m1k1o commented 2 years ago

Maybe using this for vaapi and cuvid encoders:

ffmpeg -hide_banner -encoders | grep _vaapi | cut -d ' ' -f3
ffmpeg -hide_banner -encoders | grep _cuvid | cut -d ' ' -f3
m1k1o commented 2 years ago

I moved hardware acceleration to a singe file, with various check if encoders are available, if hw device exists etc. Can you please review if I did not miss something, sine i don't have VAAPI to test it on? Thanks.