i.MX 6 gstreamer v4l2jpegdec with v4l2h264enc

Gerbaum jakob.ruisinger at gmail.com
Tue Jan 5 11:13:39 UTC 2021


Hi,

I'm using an i.MX6 quad on a Gateworks board. 

My problem is, that I try to get a MPJEG stream from a USB camera, decode
it, encode it to h264 and set up RTSP Server on Top
What's the best way to do it? RAW stream from USB camera would work, but
cause of USB limitiation the fps (3) at 1080p is too low.

My ideas:


*gst-launch-1.0 v4l2src -v device=/dev/video13 ! 
image/jpeg,width=1920,height=1080,framerate=30/1 ! v4l2jpegdec !  fakesink*
Working with low CPU load


*gst-launch-1.0 v4l2src -v device=/dev/video13 ! 
image/jpeg,width=1920,height=1080,framerate=30/1 ! v4l2jpegdec ! 
v4l2h264enc ! fakesink*
ERROR           v4l2videodec
gstv4l2videodec.c:751:gst_v4l2_video_dec_handle_frame:<v4l2jpegdec0> not
negotiated
I guess that's because V4l2h264enc needs NV12


*gst-launch-1.0 v4l2src -v device=/dev/video13 ! 
image/jpeg,width=1920,height=1080,framerate=30/1,colorimetry=bt709 !
v4l2jpegdec !  v4l2convert !  fakesink*
Works, low CPU and no lost frames


*gst-launch-1.0 v4l2src -v device=/dev/video13 ! 
image/jpeg,width=1920,height=1080,framerate=30/1,colorimetry=bt709 !
v4l2jpegdec !  v4l2convert !
video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1,colorimetry=bt709
! v4l2h264enc ! fakesink*
ERROR         v4l2bufferpool
gstv4l2bufferpool.c:909:gst_v4l2_buffer_pool_start:<v4l2h264enc0:pool:src>
we received 1 buffer from device '/dev/video8', we want at least 2
ERROR             bufferpool
gstbufferpool.c:559:gst_buffer_pool_set_active:<v4l2h264enc0:pool:src> start
failed
Maybe I'm using too much of my Coda960 pipes?


*gst-launch-1.0 v4l2src -v device=/dev/video13 ! 
image/jpeg,width=1920,height=1080,framerate=30/1,colorimetry=bt709 !
v4l2jpegdec !  videoconvert !  x264enc ! fakesink*
Works, but maxes out CPU and loses too much frames


*gst-launch-1.0 v4l2src -v device=/dev/video13 ! 
image/jpeg,width=1920,height=1080,framerate=30/1,colorimetry=bt709 !
v4l2jpegdec !  v4l2convert !  x264enc ! fakesink*
Work, but again way and too much CPU and lost frames

Any idea? Running Kernel 5.4 Gstreamer 1.16.

Is it possible to V4l2jpegdec to NV12? So I could skip v4l2convert...

What's the best way to limit FPS? Maybe I could work with 15 fps...

Thx




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list