Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

Compressing ARGB32 to H.264

Steven_M_3
Beginner
794 Views

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
794 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

0 Kudos
Steven_M_3
Beginner
794 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

 

0 Kudos
Reply