How do I get playback video stream data from SDK? (h.264)

Hi Wei Wei,

I’m not sure if there is sample showing how to get raw video streams (live and playback) .

Although it is possible.

In order to get to know how to work with the playback at all, you could look at “MediaPlaybackViewer” from component samples.

There you could replace “JPEGVideoSource” with “RawVideoSource”.

In this way you will receive the video data, as it is written in the RS.

So if camera is set-up to provide H.264. you will get H.264.

(If of course camera streams MJPEG or H.265 - you will get those).

Same thing for live is available trough “RawLiveSource”.

Please bear in mind that there is a GBD header in the beginning of the data.

This is Milestone internal structure that caries additional data for the frame.

You can find a lot of info in the forum but in general is 32 bytes long and has following structure:

public struct GBDHeader

{

public ushort CodecType;

public ushort DataType;

public ushort Flags;

public uint Reserved;

public ushort SequenceNumber;

public ulong TimestampPic;

public ulong TimestampSync;

public uint TotalLength;

}