<div dir="ltr"><div>Not only does it work on two laptops with built-in cameras, but it even works using the same camera (Logitech C920) on another computer. A very frustrating and probably not solvable problem.<br><br></div><div>Thanks for the help,<br></div><div>Hjalmar<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Mar 28, 2015 at 6:47 PM, Hjalmar Turesson <span dir="ltr"><<a href="mailto:hturesson@gmail.com" target="_blank">hturesson@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi,<br><br></div>I tested the same code on my laptop using the in-built camera, and it worked fine. The camera supports the same formats except for H264. <br></div>I.e. (laptop webcam):<br><span style="font-family:monospace,monospace"><font size="1"><span class="">$ v4l2-ctl --list-formats<br>ioctl: VIDIOC_ENUM_FMT<br> Index : 0<br> Type : Video Capture<br> Pixel Format: 'YUYV'<br> Name : YUV 4:2:2 (YUYV)<br><br> Index : 1<br> Type : Video Capture<br></span> Pixel Format: 'MJPG' (compressed)<br> Name : MJPEG</font></span><br><div><br>However, the camera I want to use is a Logitech C920 webcam. What is the difference? Why does it work on one camera but not on the other (even though it works when streaming h264)?<br><br></div><div>Best regards,<br></div><div>Hjalmar<br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 27, 2015 at 12:12 PM, Hjalmar Turesson <span dir="ltr"><<a href="mailto:hturesson@gmail.com" target="_blank">hturesson@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Thanks for the advice Arjen.<br><br>I tried setting the format. It doesn't seem to help. I used <span style="font-family:monospace,monospace">format=YUV2</span>, which I think corresponds to <span style="font-family:monospace,monospace">Pixel Format: 'YUYV'</span>. In either case, it doesn't seem critical, bc when I change sink to a filesink (encode and save the stream), it works fine.<br><br></div><span style="font-family:monospace,monospace"><font size="1">$ v4l2-ctl --list-formats<br>ioctl: VIDIOC_ENUM_FMT<br> Index : 0<br> Type : Video Capture<br> <b>Pixel Format: 'YUYV'</b><br> Name : YUV 4:2:2 (YUYV)<br><br> Index : 1<br> Type : Video Capture<br> Pixel Format: 'H264' (compressed)<br> Name : H.264<br><br> Index : 2<br> Type : Video Capture<br> Pixel Format: 'MJPG' (compressed)<br> Name : MJPEG</font><br></span></div><span style="font-family:monospace,monospace"><br></span><span style="font-family:arial,helvetica,sans-serif">I've looked at the debug output but it doesn't say much (at least not to me). GST_DEBUG='3' does nothing. At 4 I see a lot, but no errors or warnings. The last line is completely normal:<br><font size="1"><span style="font-family:monospace,monospace">0:00:11.181339628 13055 0x2f6e850 INFO v4l2src gstv4l2src.c:737:gst_v4l2src_create:<v4l2src0> sync to 0:00:00.133333332 out ts 0:00:00.287874714</span></font><br><br></span></div><span style="font-family:arial,helvetica,sans-serif">At debug threshold 5 I just don't understand much anymore. The last few lines look like this:</span><br><div><span style="font-family:arial,helvetica,sans-serif"><font size="1"><span style="font-family:monospace,monospace">0:00:31.297802714 12103 0x3d79c50 DEBUG basesink gstbasesink.c:2114:gst_base_sink_wait_clock:<appsink0> sync disabled<br>0:00:31.297813795 12103 0x3d79c50 DEBUG basesink gstbasesink.c:2489:gst_base_sink_do_sync:<appsink0> clock returned 4, jitter 0:00:00.000000000<br>0:00:31.297828235 12103 0x3d79c50 DEBUG basesink gstbasesink.c:3411:gst_base_sink_chain_unlocked:<appsink0> rendering object 0x3aa0780<br>0:00:31.297840457 12103 0x3d79c50 DEBUG basesink gstbasesink.c:936:gst_base_sink_set_last_buffer_unlocked:<appsink0> setting last buffer to 0x3aa0780<br>0:00:31.297853893 12103 0x3d79c50 DEBUG appsink gstappsink.c:710:gst_app_sink_render:<appsink0> pushing render buffer 0x3aa0780 on queue (0)<br>0:00:31.297892613 12103 0x3d79c50 DEBUG appsink gstappsink.c:1181:gst_app_sink_pull_sample:<appsink0> trying to grab a buffer<br>0:00:31.297907333 12103 0x3d79c50 DEBUG appsink gstappsink.c:656:dequeue_buffer:<appsink0> dequeued buffer 0x3aa0780<br>0:00:31.297919138 12103 0x3d79c50 DEBUG appsink gstappsink.c:1196:gst_app_sink_pull_sample:<appsink0> we have a buffer 0x3aa0780<br>0:00:31.298086959 12103 0x3d79c50 DEBUG basesink gstbasesink.c:3450:gst_base_sink_chain_unlocked:<appsink0> object unref after render 0x3aa0780<br>0:00:31.298110134 12103 0x3d79c50 DEBUG basesrc gstbasesrc.c:2441:gst_base_src_get_range:<v4l2src0> calling create offset 18446744073709551615 length 4096, time 0<br>0:00:31.298126123 12103 0x3d79c50 DEBUG v4l2 gstv4l2bufferpool.c:1146:gst_v4l2_buffer_pool_acquire_buffer:<v4l2src0:pool:src> acquire</span></font><br><br></span><div><div><br></div></div></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 27, 2015 at 6:09 AM, Arjen Veenhuizen <span dir="ltr"><<a href="mailto:arjen.veenhuizen@tno.nl" target="_blank">arjen.veenhuizen@tno.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dome pointers:<br>
* Did you check the GST debug logs (e.g. export GST_DEBUG-3 or 4).<br>
* Perhaps you need to specify the stream format as well in the capsfilter.<br>
(E.g. I420 or something)<br>
<br>
Hjalmar Turesson wrote<br>
<span>> I tried using videoparse, but this crashes python<br>
<br>
</span>This is not what I would have expected. I guess the pipeline stalls and the<br>
python program becomes unresponsive, possibly due to a caps negotiation<br>
problem.<br>
Please inspect and/or share your GStreamer logs.<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/Appsink-stops-pauses-freezes-after-2-frames-tp4671355p4671356.html" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/Appsink-stops-pauses-freezes-after-2-frames-tp4671355p4671356.html</a><br>
Sent from the GStreamer-devel mailing list archive at Nabble.com.<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>