<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>Is anyone able to assist me with overcoming this issue? I’m currently unable to use a particular make/model of camera (ELP-USBFHD01M w/ OV2710) with the v4l2jpegdec element. I’ve had other cameras work with it. I don’t notice any errors when upping the GST_DEBUG options. Traffic is at the input pad of the element, but nothing coming from the output pad. I have some logs posted on the RPi forum issue I posted: <a href="https://forums.raspberrypi.com/viewtopic.php?p=2031632#p2031632">https://forums.raspberrypi.com/viewtopic.php?p=2031632#p2031632</a><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Josh Q<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b>From:</b> Joshua Quesenberry <engnfrc@gmail.com> <br><b>Sent:</b> Sunday, August 14, 2022 9:00 AM<br><b>To:</b> Nicolas Dufresne <nicolas@ndufresne.ca><br><b>Cc:</b> Discussion of the development of and with GStreamer <gstreamer-devel@lists.freedesktop.org>; Joshua Quesenberry <EngnFrc@gmail.com><br><b>Subject:</b> Re: Issues Using GStreamer with v4l2 Elements<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>I’m coming back to this finally. I’ve yet to find a solution to v4l2jpegdec not working with this specific make/model camera. It works fine with jpegdec. With v4l2jpegdec there’s no downstream data, observable using identity element, but I do see data upstream using identity. I’m not seeing any errors in dmesg or in the gstreamer output if I up the debug levels. What else can be done to try and figure out why things aren’t working? <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Thanks,<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Josh Q<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Fri, May 13, 2022 at 4:46 PM Nicolas Dufresne <<a href="mailto:nicolas@ndufresne.ca">nicolas@ndufresne.ca</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><p class=MsoNormal style='margin-bottom:12.0pt'>Le vendredi 13 mai 2022 à 14:28 -0400, Joshua Quesenberry a écrit :<br>> That seems very confusingly labeled, am I missing something in the below high-level description? From an element's perspective, I wouldn't expect to be outputting to my sink pad (upstream) or capturing from my src pad (downstream).<br>> <br>> Src element -> v4l2 sink using output-io-mode ... v4l2 src using capture-io-mode -> Sink element<br>> <br>> In this example, should the elements dmabuf-import be on the upstream or<br>> downstream side? Likewise with the dmabuf? I'm not certain if A) the<br>> downstream is creating the dmabuf and the upstream is importing it to dump to<br>> or B) the upstream is creating the dmabuf and the downstream is importing it<br>> for use... it seems like maybe both work when I try?<br><br>I don't see a pipeline description I could comment on. By default, all v4l2<br>srcpad are dmabuf exporters. But the sink pad are not automatically importer, as<br>this code is experimental and need some polishing and testing.<br><br>> <br>> Thanks!<br>> <br>> JQ<br>> <br>> -----Original Message-----<br>> From: Nicolas Dufresne <<a href="mailto:nicolas@ndufresne.ca" target="_blank">nicolas@ndufresne.ca</a>> <br>> Sent: Friday, May 13, 2022 8:47 AM<br>> To: Joshua Quesenberry <<a href="mailto:engnfrc@gmail.com" target="_blank">engnfrc@gmail.com</a>><br>> Cc: Discussion of the development of and with GStreamer <<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a>><br>> Subject: Re: Issues Using GStreamer with v4l2 Elements<br>> <br>> Le vendredi 13 mai 2022 à 00:52 -0400, Joshua Quesenberry a écrit :<br>> > Hi Nicolas,<br>> > <br>> > Sorry for the late reply, I got covered up with other stuff and am <br>> > just getting a minute to come back to this.<br>> > <br>> > > Just read your post, looks like you are asking about at least two <br>> > > distinct issue. In one case, v4l2jpegdec does not work at all for <br>> > > you. There isn't much information, have you considering prepending <br>> > > jpegparse in front of it ? That may help ? Jpeg V4L2 decoder is <br>> > > probably one of the least tested decoder in the v4l2 lot.<br>> > <br>> > Correct, two separate issues I'm running into.<br>> > <br>> > v4l2jpegdec works fine with one camera, but not the other. I'm setting <br>> > them both up very similarly, so it escapes me what could be different <br>> > to cause this behavior. I just tried jpegparse in the pipeline just <br>> > before v4l2jpegdec and that didn't have any effect, still the identity <br>> > just after the decode is never printed. I also tried dropping down <br>> > from 1280x720@60fps to 1024x768@30fps to lessen the load a bit and <br>> > that had no effect either.<br>> > <br>> > > In the second issue, it works, but its slow. Could it be that you <br>> > > are loading the CPU ? v4l2h264enc does not automatically do <br>> > > zero-copy. You can experimentally enable it passing output-io-mode=dmabuf-import.<br>> > <br>> > I suppose it could be GPU load? When I've looked for ways to measure <br>> > what the GPU is doing, I've unfortunately not found much of <br>> > significance. The CPU load is quite low during this testing, <10% for <br>> > the gstreamer pipeline according to htop. I have a pipeline already <br>> > with the output-io-modes set to dmabuf-import, but before my original <br>> > post I switched everything back to auto in hopes things may start <br>> > working appropriately, however that was not the case. Keep in mind <br>> > that I have an identity in between the source caps and the capssetter, <br>> > this is where I see the average framerate drop with v4l2h264enc <br>> > present.<br>> > <br>> > I've found that by adding more queues to the pipeline and then setting <br>> > all queues to have a leaky downstream that the average rate at the <br>> > source has now climbed back up to what I expected all along, so I'm <br>> > assuming the issue is a clogged up downstream affecting the upstream <br>> > as far as the source? After these changes input rate is ~30fps and <br>> > output to file ~15fps, which is what I'm asking for, and the CPU usage <br>> > is around ~30%. Playing around with the dmabuf-import option it <br>> > appears I'm able to get similar rates with a drop in CPU usage to <br>> > around ~10%, very exciting!<br>> > <br>> > How do the v4l2 elements work with queues? What do they do when stuck <br>> > in between a dmabuf-import src pad and dmabuf sink pad? They don't <br>> > have io-modes to be specified (at least at the user level) and I don't <br>> > see a v4l2queue or something of the like. Tomorrow I'll do some more <br>> > experiments to see which queues that I've added are unnecessary.<br>> <br>> M2M elements have two queues, so you have output-io-mode (the sink pad) and capture-io-mode (for the src pad).<br>> <br>> > <br>> > So now, camera #1 not getting through v4l2jpegdec is my major <br>> > roadblock. Anyone have ideas on how to debug this one or know what <br>> > could cause this behavior?<br>> > <br>> > FYI, I did dump additional information to the RPi Forums question a <br>> > few days ago, if something else is needed, just let me know.<br>> > <br>> > Thanks!<br>> > <br>> > JQ<br>> > <br>> > On Mon, May 9, 2022 at 4:15 PM Nicolas Dufresne <<a href="mailto:nicolas@ndufresne.ca" target="_blank">nicolas@ndufresne.ca</a>> wrote:<br>> > > <br>> > > Le lundi 09 mai 2022 à 12:04 -0400, Joshua Quesenberry via <br>> > > gstreamer-devel a écrit :<br>> > > > Hey Everyone!<br>> > > > <br>> > > > I’m having some trouble using the v4l2 elements on an RPi. I’ve <br>> > > > posted a detailed summary on the Raspberry Pi forum. Can anyone <br>> > > > lend a hand? I’m not sure how many of you are frequent users of <br>> > > > the RPi, so figured I’d reach out here in parallel in case the RPi forum isn’t the right audience.<br>> > > > <a href="https://forums.raspberrypi.com/viewtopic.php?t=334215" target="_blank">https://forums.raspberrypi.com/viewtopic.php?t=334215</a><br>> > > <br>> > > Just read your post, looks like you are asking about at least two <br>> > > distinct issue. In one case, v4l2jpegdec does not work at all for <br>> > > you. There isn't much information, have you considering prepending <br>> > > jpegparse in front of it ? That may help ? Jpeg V4L2 decoder is <br>> > > probably one of the least tested decoder in the v4l2 lot.<br>> > > <br>> > > In the second issue, it works, but its slow. Could it be that you <br>> > > are loading the CPU ? v4l2h264enc does not automatically do <br>> > > zero-copy. You can experimentally enable it passing output-io-mode=dmabuf-import.<br>> > > <br>> > > Nicolas<br>> > > <br>> > > > <br>> > > > Thanks,<br>> > > > <br>> > > > JQ<br>> > > > <br>> > > > <br>> > > <br>> <br>> <o:p></o:p></p></blockquote></div></div></div></body></html>