Closed jpietek closed 4 years ago
OK, most of the problems were due to multiple decoder (re)initialization + encoder flushing. Reencoding in a single dec/enc instance makes BC peformance comparable to ffmpeg, but still about 1/3 slower. FFmpeg utilizes about ~45% GPU, BC ~36%.
Is there any way to achieve gpu accelerated (de/en)coding with beamcoder, similar to:
ffmpeg -c:v h264_cuvid -i x.ts -c:v h264_nvenc y.ts
I've compiled the ffmpeg according to Nvidia's instructions and did npm install with a proper ffmpeg compilaton.
beamcoder.decoders() & encoders() lists appropriate codecs, but the performance of the whole flow is around 4 times slower then expected (aws g4 instance). The GPU utilization is around few percent, instead of ~45% with ffmpeg.
Seems like BC is copying the frames back and forth from gpu to ram and to gpu again, which is a huge bottleneck?
thanks in advance for any hints!