LiTr icon indicating copy to clipboard operation
LiTr copied to clipboard

Render frames concurrently

Open vertify-mldev1 opened this issue 3 years ago • 2 comments

Hello! As far as i can see, it is not possible to render multiple frames concurrently when transcoding a video. Is it on the roadmap to support concurrency? Or did anyone implement anything in this direction? Thanks for your help.

vertify-mldev1 avatar May 24 '22 14:05 vertify-mldev1

Hi. Can you clarify what is meant by concurrent frame rendering? Do you mean transcoding different sets of I and B frames? For example, keyframe 1 and following B frames would be transcoded at the same time as keyframe 2 and its following B frames. To be honest, this is not something on the road map. We didn't have a use case for that so far, and introducing concurrency would complicated transcoding logic quite a bit. I don't know if anyone out there is doing this. I can see this being more relevant to transcoding on a backend, since concurrency is more relevant and doable there. On mobile devices, hardware capacity is limited and transcoding might fail if we hit the limit.

izzytwosheds avatar May 25 '22 13:05 izzytwosheds

Oh, let me clarify my use case a bit:

I send the decoded frames into a mediapipe graph (which is able to process multiple frames concurrently). The output of the graph is fed to the encoder.

To achieve this i implemented a custom LiTr Renderer and noticed that renderFrame gets called serially, thus there can only be one frame in the graph at a time.

To feed multiple frames into the graph i would need to have access to multiple decoded frames at once.

vertify-mldev1 avatar May 27 '22 07:05 vertify-mldev1