Opening a GStreamer pipeline from OpenCV with VideoWriter

后端 未结 1 715
醉话见心
醉话见心 2021-01-03 18:47

I am capturing and processing video frames with OpenCV, and I would like to write them as a h265 video file. I am struggling to get a proper Gstreamer pipeline to work from

相关标签:
1条回答
  • 2021-01-03 19:16

    I encountered a similar problem before. Since the pipe/file name ends with .mkv, OpenCV interprets it as a video file instead of a pipe.

    You can try ending it with a dummy spacing like after mkv

    video.open("appsrc ! autovideoconvert ! omxh265enc ! matroskamux ! filesink location=test.mkv ", 0, (double)25, cv::Size(1024, 1024), true);
    

    or with a dummy property like

    video.open("appsrc ! autovideoconvert ! omxh265enc ! matroskamux ! filesink location=test.mkv sync=false", 0, (double)25, cv::Size(1024, 1024), true);
    
    0 讨论(0)
提交回复
热议问题