Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Steven_M_3
Beginner
42 Views

Compressing ARGB32 to H.264

I  have a filter graph that decodes data from a source filter, scales the video and  writes some graphics to the video Using a custom transform filter)  and outputs the ARGB32 image to the renderer.  I would like to in addition save the new video in h.264 compression to a file using an MP4 muxer and file writer.

                To do this I added an infinite Tee filter before the renderer and tried to use the Intel Media SDK H.264 Encoder to do the compression.  This fails as the encoder  insists (for the encoding) on at least  11 frame buffers (while the infinite tee provides only  1 ).  Does anyone have a suggestion on how to modify the encoder to get around this problem or some sample code that takes an ARGB32 input frame (that is output one frame at a time as the video is streamed) and then compresses it to an H.264 bitstream  using  QuickSync.

   Thanks   Mags

0 Kudos
2 Replies
Roman_T_
New Contributor I
42 Views

Hi,

If current configuration of H.264 encoder has been set to use B2 frames and some GOP size (11 frames for example), you will not be able to write anything to H.264 elementary stream until you will have all frames from current GOP.

May be you will try to use MJPEG compression instead of H.264?

Best regards,

Roman

Steven_M_3
Beginner
42 Views

Hi  Roman:

   Thanks for the suggestion.  I tried the FFmpeg encoder;  however the compression is not nearly as good as for H264  (an order of magnitude worse).  Is that expected or am I doing something wrong?

   Mags

 

Reply