Video Codec Approaches

I have worked with two video compression standards for IP cameras: H.264 and MJPEG.

H.265 is not widely supported. We don’t use  WMV.

H.264 is by far the most popular.

Why transcoding: to overlay scoreboard info and commercials in the streamed sports game.

 SDK: Mainconcept 9.1.0 (MC), in both pure software and hardware accelerated.

 bufstream_tt is the key class from MC

The difference: DXVA2 is used for HW acceleration, DirectX Video Acceleration from Microsoft

Steps SW:

Setup: pass frame_tt to bufstream_tt to receive decoded frame

Retrieval after decoding: bufstream_tt.auxinfo(GET_PIC)

Steps HW:

Setup: IDirect3DDeviceManager9 -> dxva2_config -> bufstream_tt

Retrieval after decoding:

bufstream_tt.auxinfo(HWACC_GET_PIC) -> dxva_surface_t -> LockRect -> pBits

To check if DXVA2 is supported: IDirectXVideoDecoderService

MJPEG takes more space, but easy to decode.

SDK: IJG.lib from Independent JPEG Group


              JPEG image buffer -> jpeg_decompress_struct with JCS_YCbCr -> jpeg_read_scanlines -> fill YUV buffer

Other Image process such as muxing, overlay, scaling

Why: to transform from to interlaced to progressive, Picture in Picture, Video side by side



Comments are closed.
%d bloggers like this: