Streampunk / beamcoder

Node.js native bindings to FFmpeg.
GNU General Public License v3.0
392 stars 76 forks source link

Hardware accelerated filters are not working #99

Closed fda0 closed 5 months ago

fda0 commented 2 years ago

Hardware accelerated filters like overlay_cuda are not working in Beamcoder. The filters are expecting hardware frame contexts to be allocated and filled with data. Instead these fields remain initialized to null so most filters just exit with an error.

AVFilterLink *inlink;
// ...

// these fields should be initialized:
inlink->hw_frames_ctx;
(AVHWFramesContext*)inlink->hw_frames_ctx->data;

I'll submit our solution as an example in a PR but perhaps you might have other ideas on how to solve this.