<div dir="ltr"><div>Hi devs,<br></div><div><br></div><div>I'm trying to construct a pipeline that captures frames from a USB camera (YUV) and encodes them with HW encoder and saves into a file. My setup is iMX6 board running Ubuntu 18.04 on 4.20 mainline kernel.</div><div><br></div><div>When I try a sw encoder, it works okay albeit I get very high 100% CPU usage. The working pipeline based on software plugins:</div><div><span style="font-family:monospace">gst-launch-1.0 -v v4l2src device="/dev/video2" num-buffers=200 ! "video/x-raw, format=(string)UYVY, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)</span><span style="font-family:monospace">1/1, framerate=(fraction)45/1, colorimetry=bt709" ! videoconvert ! x264enc ! mp4mux ! filesink location=aha.mp4</span><br></div><div><span style="font-family:monospace"><br></span></div><div>My attempt to replace sw based plugins by HW based with efficient memory management:<br></div><div><span style="font-family:monospace">gst-launch-1.0 -v v4l2src device="/dev/video9" num-buffers=200 ! "video/x-raw, format=(string)UY</span><span style="font-family:monospace">VY, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)</span><span style="font-family:monospace">1/1, framerate=(fraction)45/1, colorimetry=bt709" ! <b>v4l2video8convert</b> <b>output-io-mode=dmabuf-import</b> ! <b>v4l2h264enc</b> <b>output-io-mode=dmabuf-import</b> ! mp4mux ! filesink location=aha.mp4</span><br></div><div><span style="font-family:monospace"><br></span></div><div><font face="arial, sans-serif">I get the following error: "</font><span style="background-color:rgb(255,229,153)">WARNING: erroneous pipeline: could not link v4l2h264enc0 to mp4mux0"</span></div><div><br></div><div>Would appreciate any ideas how to understand what's wrong, how to debug and make it work.</div><div><br></div><div>Thank you very much,</div><div>  -- Constantine.</div><div><br></div><div><br></div></div>