process video stream from memory buffer

前端 未结 2 821
被撕碎了的回忆
被撕碎了的回忆 2020-12-01 03:47

I need to parse a video stream (mpeg ts) from proprietary network protocol (which I already know how to do) and then I would like to use OpenCV to process the video stream i

2条回答
  •  被撕碎了的回忆
    2020-12-01 04:23

    Code to do similar to the above, for opencv 4.2.0 is on: https://github.com/jcdutton/opencv Branch: 4.2.0-jcd1

    Load the entire file into RAM pointed to by buffer, of size buffer_size. Sample code:

    VideoCapture d_reader1;
    d_reader1.open_buffer(buffer, buffer_size);
    d_reader1.read(input1);
    

    The above code reads the first frame of video.

提交回复
热议问题