ksvideosrc dropping frames?

philippe renon philippe_renon at yahoo.fr
Sat Apr 25 09:20:01 PDT 2015


I have been able to build gstreamer using cerbero! I am building 1.4 with mingw on windows 7. Build had only two minor hiccups:

1- problem with certificates which I worked around with this change:

diff --git a/cerbero/bootstrap/windows.py b/cerbero/bootstrap/windows.py
index 71010f9..9d11456 100644
--- a/cerbero/bootstrap/windows.py
+++ b/cerbero/bootstrap/windows.py
@@ -136,7 +136,7 @@ class WindowsBootstrapper(BootstrapperBase):
         else:
             inst_path = os.path.join(self.prefix, 'x86_64-w64-mingw32/include/GL/wglext.h')
         gl_header = 'http://www.opengl.org/registry/api/GL/wglext.h'
-        shell.download(gl_header, inst_path)
+        shell.download(gl_header, inst_path, False, False)

     def install_bin_deps(self):
         # FIXME: build intltool as part of the build tools bootstrap

2- failure to build libtag which I simply skipped.

I then did a number of tests around ksvideosrc:Using gst-launch I ran this simple pipeline : ksvideosrc ! fpsdisplaysink

----------------------------------------
ksvideosrc 1.4 branch
----------------------------------------

A lot of buffers are being dropped. (gstbasesink.c(2794): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:fps-display-video_sink/GstD3DVideoSink:fps-display-video_sink-actual-sink-d3dvideo:
There may be a timestamping problem, or this computer is too slow.)

ksvideosrc has a clock.

fpsdisplaysink reports: rendered: 164, dropped: 136, fps 13.13, drop rate: 7.50
----------------------------------------
ksvideosrc 1.4 branch + patch
----------------------------------------

A lot of buffers are being dropped. (gstbasesink.c(2794): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:fps-display-video_sink/GstD3DVideoSink:fps-display-video_sink-actual-sink-d3dvideo:
There may be a timestamping problem, or this computer is too slow.)

ksvideosrc has a clock.

fpsdisplaysink reports: rendered: 0, dropped: 129, fps 0.00, drop rate: 15.83
----------------------------------------
ksvideosrc master branch
----------------------------------------

Fails to acquire a clock:
WARN : 0:00:03.072565684  5372   08FEAA40 WARN              ksvideosrc gstksvideosrc.c:456:gst_ks_video_src_open_device:<ksvideosrc0> failed  to create/open KsClock

fpsdisplaysink reports: rendered: 328, dropped: 92, fps 3.38, drop rate: 6.76

----------------------------------------
ksvideosrc master branch + patch
----------------------------------------

Same clock warning as master.

fpsdisplaysink reports: rendered: 0, dropped: 192, fps 0.00, drop rate: 28.27

----------------------------------------
clock issue
----------------------------------------

The clock issue that appears in master comes from this addition:

+    /* Enumerate only capture devices */
+    if_alias_data.cbSize = sizeof (SP_DEVICE_INTERFACE_DATA);
+    success = SetupDiGetDeviceInterfaceAlias (devinfo, &if_data, &KSCATEGORY_CAPTURE,
+        &if_alias_data);
+    if (!success)
+      continue;

----------------------------------------
other
----------------------------------------

In all test scenario above, I always receive one qos event:
qos event: live: 1; running time: 0; stream time: 0; timestamp: 1741382649; duration: 33333333 jitter: 1756806371; proportion: -1; quality: 1000000; format: ; processed: 0; dropped: 1;

What is strange is that in all test cases, the video visually seems to run at ~30fps.
Forcing the frame rate to 10fps makes a big difference (i.e. you can see it runs at 10fps).
Pipeline used for 10fps: ksvideosrc ! video/x-raw, framerate=10/1 ! fpsdisplaysink
 


     Le Mercredi 22 avril 2015 15h40, Sebastian Dröge <sebastian at centricular.com> a écrit :
   
 

 On Mo, 2015-04-20 at 23:52 +0000, philippe renon wrote:
> Looking at the attached debug log I see a few things that might be interesting (or not...):- ksvideosrc fails to create a clock (might not be important...).- latency is reported as 0:00:00.033333333 (which is good given the expected 30fps)- later, the gstbasesrc.c reports GST_QOS_TYPE_UNDERFLOW qos events.- there are also lock failed messages- and probably a lot of stuff that makes sense to an expert eye.
>  
> Please note that I am building ksvideosrc myself and registering it statically. Problem might be at my end...Again this ksvideosrc is based on latest master + provided patch. Rest of gstreamer is from the official 1.4.5 binary distribution for Windows.

Please report this on Bugzilla, with your debug log and my patch :)
Thanks!

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com

 
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150425/a6349dd9/attachment.html>


More information about the gstreamer-devel mailing list