I have a desktop application that captures the content of the screen. The result are DirectX 11 2D textures with RGBA8 format.

My goal is to stream that captured content to a mobile device with Android OS (let's say, at least 7.0). I noticed Android supports H.264 decoder (and even H.265 if I'm not mistaken) out of the box, so having bandwidth and latency in mind, I'll go with that.

To achieve the maximum performance, I want to used dedicated media SDKs for GPU-based encoding (Codec SDK from NVidia and AMD's AMF). I have a few questions about what should I do to properly approach that task.

(1) What is the best (in terms of encoding performance) format of data I should supply to the encoder? I'm asking about the pixel format, colorspace, etc.

(2) I remember, that H.264 is about analysing group of frames to achieve best compression results. Will encoding single frames be efficient enough?

(3) And lastly - any ideas/comments/samples/suggestions on how to properly use these encoders in a per-frame basis?

Thank you for your time!

  • 1
    \$\begingroup\$ @Bilkokuya Thank you. After some additional research, I decided to go for H.264/H.265 encoding, as that seems the best way to do that. So now my question is about some specifics related to that. If there is anything you could clarify - thank you in advance. \$\endgroup\$ – Mateusz Grzejek Oct 8 '19 at 10:06
  • 3
    \$\begingroup\$ While this does not appear to be off-topic for this site, per se, I do wonder if you'd find a bigger audience for the problem on StackOverflow itself or the Computer Graphics beta site. \$\endgroup\$ – user1430 Oct 9 '19 at 15:18
  • \$\begingroup\$ Have you considered using FFmpeg ? \$\endgroup\$ – ColdSteel Oct 9 '19 at 17:17
  • \$\begingroup\$ @ColdSteel I am not sure if FFmpeg uses the GPU for the encoding process. I'd like to stay at the GPU level as much as possible. Also, isn't FFmpeg on some kind of GPL license? Anything which forces me to make the source public is not an option. \$\endgroup\$ – Mateusz Grzejek Oct 10 '19 at 5:33
  • \$\begingroup\$ I thought H264/H265 are GPL... To answer the sub question - yes it has directx hardware acceleration on Windows. \$\endgroup\$ – ColdSteel Oct 10 '19 at 6:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.