Ask Your Question
0

GStreamer pipeline loses frames

asked 2017-07-31 04:15:15 -0600

Guy78 gravatar image

I use following GStreamer pipeline with VideoCapture class.

filesrc location=video.webm ! matroskademux ! vp9dec ! videoconvert ! appsink

Now VideoCapture::get(cv::CAP_PROP_FRAME_COUNT) returns the correct frame count, but when reading frames in loop with VideoCapture::read, less frames are got before EOF (return value false).

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-08-02 06:29:38 -0600

Guy78 gravatar image

updated 2017-08-02 06:31:07 -0600

I know that problem is in OpenCV appsink, but is there a solution?

I've tried:

videoCapture.set(CV_CAP_GSTREAMER_QUEUE_LENGTH, queue_length);

but I get error message:

(VideoProcessorTest:3673): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback 'C' locale.
GStreamer Plugin: Embedded video playback halted; module matroskademux1 reported: Internal data stream error.
OpenCV Error: Unspecified error (GStreamer: unable to start pipeline
) in icvStartPipeline, file /home/test/opencv-3.2.0/modules/videoio/src/cap_gstreamer.cpp, line 407
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/test/opencv-3.2.0/modules/videoio/src/cap_gstreamer.cpp:407: error: (-2) GStreamer: unable to start pipeline
 in function icvStartPipeline
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-07-31 04:15:15 -0600

Seen: 893 times

Last updated: Aug 02 '17