Read frame by frame mp4 file, need example.
Антон Шаров
sharov_am at mail.ru
Wed Jul 26 15:48:23 UTC 2023
Hi.
Where I can find example of reading mp4 file frame by frame, so it was equivalent to OpenCv code like:
while(cap.isOpened()):
# Capture frame-by-frame
ret, frame = cap.read()
I saw this frame stepping example https://fossies.org/linux/gstreamer/tests/examples/stepping/framestep1.c
and . I’ve tried to recreate this example on gstreamer-sharp and here is my approach:
https://gist.github.com/sharov-am/78949b8866235ca14112818385893152
And of course it doesn’t work. I’ve read this doc ( https://gstreamer.freedesktop.org/documentation/additional/design/framestep.html?gi-language=c#frame-stepping )
and got from it that there are two main very important parameters like flush and intermediate and sequnce of events:
2 step start and 1 step done. Also I expected that appsink preroll or new-sample event would be raised, but nothing
happens.
My expectations are: I raise step event, some machinery happens and eventually I handle appsink preroll or new-sample
events with needed frame buffer with actual frame. And it continues till EOS (end of file).
So, what I’m doing wrong?
Also, I’ve noticed that my pipe has WARN messages like
WARN basesrc gstbasesrc.c:3132:gst_base_src_loop:<filesrc> error: Internal data stream error.
WARN basesrc gstbasesrc.c:3132:gst_base_src_loop:<filesrc> error: streaming stopped, reason not-linked (-1)
but I’m not sure that this is the cause…
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230726/a5b12be7/attachment.htm>
More information about the gstreamer-devel
mailing list