<html><head><style>pre,code,address {
  margin: 0px;
}
h1,h2,h3,h4,h5,h6 {
  margin-top: 0.2em;
  margin-bottom: 0.2em;
}
ol,ul {
  margin-top: 0em;
  margin-bottom: 0em;
}
blockquote {
  margin-top: 0em;
  margin-bottom: 0em;
}
</style></head><body><div>Hi,</div><div><br></div><div>Le mercredi 26 juillet 2023 à 18:48 +0300, Антон Шаров via gstreamer-devel a écrit :</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div>Hi.</div><div> </div><div>Where I can find example of reading mp4 file frame by frame, so it was equivalent to OpenCv code like:</div></blockquote><div><br></div><div>The question is ambiguous, since MP4 containers can contains multiple streams and metadata. Do you want to read each video frame of the first video frame ? Do you want these to be coded or decoded ? All this is important, because before pulling this data into your application (I would suggesting using appsink element), you will have to design the right pipeline.</div><div><br></div><div>Nicolas</div><div><br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div><div><div> </div><div>while(cap.isOpened()):</div><div>  # Capture frame-by-frame</div><div>   ret, frame = cap.read()</div></div></div><div> </div><div>I saw this frame stepping example <a href="https://fossies.org/linux/gstreamer/tests/examples/stepping/framestep1.c">https://fossies.org/linux/gstreamer/tests/examples/stepping/framestep1.c</a></div><div>and .  I’ve tried to recreate this example on gstreamer-sharp and here is my approach:</div><div><a href="https://gist.github.com/sharov-am/78949b8866235ca14112818385893152">https://gist.github.com/sharov-am/78949b8866235ca14112818385893152</a></div></blockquote><div><br></div><div>Frame stepping is unlikely what you are a looking for.</div><div><br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div> </div><div>And of course it doesn’t work. I’ve read this doc (<a href="https://gstreamer.freedesktop.org/documentation/additional/design/framestep.html?gi-language=c#frame-stepping">https://gstreamer.freedesktop.org/documentation/additional/design/framestep.html?gi-language=c#frame-stepping</a>)</div><div>and got from it that there are two main very important parameters like flush and intermediate and sequnce of events:</div><div>2 step start and 1 step done. Also I expected that appsink preroll or new-sample event would be raised, but nothing</div><div>happens.</div><div> </div><div>My expectations are: I raise step event, some machinery happens and eventually I handle appsink preroll or new-sample</div><div>events with needed frame buffer with actual frame. And it continues till EOS (end of file).</div><div><font face="Arial">So, what I’m doing wrong?</font></div><div> </div><div>Also, I’ve noticed that my pipe has WARN messages like</div><div><div> </div><div>WARN                 basesrc gstbasesrc.c:3132:gst_base_src_loop:<filesrc> error: Internal data stream error.</div><div>WARN                 basesrc gstbasesrc.c:3132:gst_base_src_loop:<filesrc> error: streaming stopped, reason not-linked (-1)</div></div><div><pre style="-webkit-text-stroke-width:0px; background-color:#ffffff; color:#000000; font-style:normal; font-variant-caps:normal; font-variant-ligatures:normal; font-weight:400; letter-spacing:normal; orphans:2; padding-bottom:0.5em; padding-top:0.5em; text-align:start; text-decoration-color:initial; text-decoration-style:initial; text-decoration-thickness:initial; text-indent:0px; text-transform:none; widows:2; word-spacing:0px"><font face="Arial">but I’m not sure that this is the cause…</font></pre><div><font face="Arial">Thanks in advance.</font></div></div><div> </div><div> </div><div> </div></blockquote><div><br></div><div><span></span></div></body></html>