Results 1 to 3 of 3

Thread: Problem processing video frame through NDI SDK

  1. #1
    Newbie Member
    Join Date
    Feb 2018
    Location
    China
    Posts
    1

    Question Problem processing video frame through NDI SDK

    Here is the thing, I want to extract video frames from a video stream through the SDK. Now I can get the video frame in c++ struct that named `NDIlib_video_frame_v2_t`. However, I couldn't find any document of processing this kind of structure. I would like to convert video frame in picture and then get the bitmap of it. Can anybody give me some hint or is there any easier way to achieve the goal. I've just use NDI SDK for quite a short time. Thank you!

  2. #2
    Registered User
    Join Date
    Aug 2015
    Location
    london
    Posts
    193
    Quote Originally Posted by Quinn0379 View Post
    Here is the thing, I want to extract video frames from a video stream through the SDK. Now I can get the video frame in c++ struct that named `NDIlib_video_frame_v2_t`. However, I couldn't find any document of processing this kind of structure. I would like to convert video frame in picture and then get the bitmap of it. Can anybody give me some hint or is there any easier way to achieve the goal. I've just use NDI SDK for quite a short time. Thank you!
    in general the pdata member of the structure is a pointer to a memory array of uncompressed UYVY pixels.
    You will find more information in the SDK examples and the headers, and the PDF for the SDK.

    Exceptions to this would be where the source of the stream is RGB - in which case you would get an array of bgra pixels instead of UYVY

  3. #3
    I suggest that you look at NDIlib_video_frame_v2_t in Processing.NDI.structs.h.

    As livepad said, p_data is a pointer to the pixel data.

    NDIlib_video_frame_v2_t has members for the resolution, stride and format (fourcc) in addition to how and when they should be displayed.

    You also have some control over the formats you receive when you create your receiver by setting your color_format and whether you allow_video_fields.
    John Perkins
    Software Engineer

    "No, it's my natural color..."

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •