Page 1 of 1

[2.2] Rendering Ogre output as video

Posted: Thu Mar 25, 2021 10:20 pm
by Lax
Hi folks,

has somebody some experience in streaming an Ogre 2.x scene as video?

I found this old thread, but thats for Ogre1.x:
viewtopic.php?t=65825

Best Regards
Lax

Re: [2.2] Rendering Ogre output as video

Posted: Fri Mar 26, 2021 1:26 am
by dark_sylinc
It would be the opposite direction of viewtopic.php?p=548127#p548127
  1. Use 3 AsyncTicket (1 per frame, call map() 3 frames after you've created the ticket to avoid any stall) to download the render from GPU to CPU
  2. Optionally use an MRT pixel shader to convert from RGB to either YUV444 or YUV420 which is much faster to do in GPU than CPU (and YUV420 will lower bandwidth requirements), and use one AsyncTicket per Y/U/V plane. If you've got a 1920x1080 RGBA target, then for YUV420 you need to create 2 textures: one 960x540 RGBA8_UNORM (to contain Y in blocks of 2x2) and two 960x540 R8_UNORM (one for U, another for V). If you use YUV444 then you just need three 1920x1080 R8_UNORM textures (1 for Y, 1 for U, 1 for V). Wikipedia has a very good explanation of the YUV420 arrangement