Hi again,
I've returned to investigating this issue after some time. I'm currently using the v5.4.70_2.3.1 BSP and I'm still running into the same problem.
My final goal is to be able to transcode a JPEG camera feed into an H.264 format with the least possible amount of CPU overhead. As reference, I'm using the example in section 9.1 of the i.MX 8 GStreamer user guide, which is supposed to accomplish what I'm looking for:
gst-launch-1.0 v4l2src device=/dev/video3 ! jpegparse ! v4l2jpegdec ! queue ! videoconvert ! v4l2h264enc ! h264parse ! matroskamux ! filesink location=out.mkv
However, this pipeline doesn't work on my i.MX8QXP device.
The following pipeline does seem to go through, but no video stream is stored in the out.mkv file and the gst-launch-1.0 app blocks when stopping the stream:
gst-launch-1.0 v4l2src device=/dev/video3 ! jpegparse ! v4l2jpegdec ! imxvideoconvert_g2d ! v4l2convert ! v4l2h264enc ! h264parse ! matroskamux ! filesink location=out.mkv
Setting pipeline to PAUSED ...
[ 49.299976] uvcvideo: Failed to query (GET_DEF) UVC control 12 on unit 2: -32 (exp. 4).
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[ 49.926396] [VPU Decoder] firmware version is 1.7.0
Redistribute latency...
[ 49.960932] bypass csc
[ 49.963307] input fmt YUYV
[ 49.966092] output fmt NV12
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:03.492342625
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
^C^C^C^C^C
I've also tried piping the stream to the waylandsink, but I'm unable to see anything on screen. I've also tried the suggestion of hardcoding a 1280x720 resolution in the pipeline, but that doesn't work.
Is there a pipeline that will allow me to transcode a JPEG feed to H.264 while avoiding CPU overhead (e.g. using the VPU when possible or zero-copy methods like the ones suggested in the GStreamer user guide)?