GStreamer i.MX8QM mjpeg camera to H264

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GStreamer i.MX8QM mjpeg camera to H264

798 Views
alexstefan
Contributor III

Hi,

I've been battling with this for quite a while now. Essentially I'm running an i.MX8QM board with gstreamer. I have a USB video camera connected to this board that can output (according to v4l2-ctl) 60FPS of MJPEG at 1920x1080. My end goal is to have two of these cameras feeding into an OpenCV application, then encode the result in H264 and send it to an RTMP server.

As such, the first step that I thought of was to create a test pipeline, without the OpenCV application and simply decode the MJPEG from the camera and encode it with h264.  Starting from the base pipeline described in the i.MX8 GStreamer User Guide document:

gst-launch-1.0 v4l2src device=/dev/video0 ! jpegparse ! v4l2jpegdec ! queue ! videoconvert !  v4l2h264enc ! h264parse ! matroskamux ! filesink location=out.mkv

The log file is attached. Problem is that nothing in the log looks like it could be the source of the error, the only thing that actually has the ERROR tag being this line. I've tried including setting cap filters to the exact format of both the jpeg decoder and the h264 encoder. No success.

v4l2videodec gstv4l2videodec.c:656:gst_v4l2_video_dec_loop:<v4l2jpegdec0> not negotiated

The second question, is the i.MX8QM powerful enough to decode two MJPEG cameras at 1080@60FPS , lightly process the image using OpenCV, then encode it with H264? I would hate to go through all this pain only to  discover the chip is not powerful enough. I'd be surprised if that's the case. 

Thank you!

0 Kudos
0 Replies