asticode / go-astiav

Golang ffmpeg and libav C bindings
MIT License
351 stars 38 forks source link

Add hardware frame context for hardware video encoding #70

Open l0rem1psum opened 2 weeks ago

l0rem1psum commented 2 weeks ago

With the addition of hardware frame context, hardware video encoding can be achieved. The official vaapi_encode.c example can now be implemented in Go. I personally tried with CUDA (h264_nvenc to be exact) and it works similar to h264_vaapi, with a very slight field change.

This PR does not have UTs yet. Please help review the changes before I can proceed to write some UTs.

l0rem1psum commented 2 weeks ago

Thanks for such a detailed review! I will make the relevant changes once I get back.

asticode commented 2 weeks ago

Thanks for such a detailed review! I will make the relevant changes once I get back.

No problem. Don't forget to add a comment here once you're done as I won't get notified by Github otherwise 👍

l0rem1psum commented 1 week ago

@asticode All above comments were fixed. Please review when you have time.

l0rem1psum commented 1 week ago

Is the vaapi_encode.c Go example required for this pr to get merged? Or should we do it in a separate one?

asticode commented 5 days ago

Did you have the chance to finalize this PR by any chance?

l0rem1psum commented 5 days ago

Did you have the chance to finalize this PR by any chance?

I will have to find some time next week for this.