encoding pipeline from v4l2 usb camera with v4l2video8convert and v4l2h264enc

Constantine Elster constantine.elster at valerann.com
Sun Jan 19 10:06:55 UTC 2020


Hi devs,

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.

When I try a sw encoder, it works okay albeit I get very high 100% CPU
usage. The working pipeline based on software plugins:
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)1/1, framerate=(fraction)45/1,
colorimetry=bt709" ! videoconvert ! x264enc ! mp4mux ! filesink
location=aha.mp4

My attempt to replace sw based plugins by HW based with efficient memory
management:
gst-launch-1.0 -v v4l2src device="/dev/video9" num-buffers=200 !
"video/x-raw, format=(string)UYVY, width=(int)640, height=(int)480,
pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)45/1,
colorimetry=bt709" ! *v4l2video8convert* *output-io-mode=dmabuf-import* !
*v4l2h264enc* *output-io-mode=dmabuf-import* ! mp4mux ! filesink
location=aha.mp4

I get the following error: "WARNING: erroneous pipeline: could not link
v4l2h264enc0 to mp4mux0"

Would appreciate any ideas how to understand what's wrong, how to debug and
make it work.

Thank you very much,
  -- Constantine.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200119/02ff9f51/attachment.htm>


More information about the gstreamer-devel mailing list