Dear All:
I am using webcam 720P from Logitech and I tried successfully mjpeg decode on iMX6. Below are the commands.
gst-launch v4l2src device=/dev/video2 ! image/jpeg,width=1280,height=720,framerate=30/1 ! queue ! jpegdec ! mfw_v4lsink
It works but jerky!
How to improve the preformance of the imx6 mjpeg decoder.
follow the imx6 codec datasheet, imx6 can decode mjpeg up to 1080p!
Thank you advance!
Solved! Go to Solution.
Not sure if that element exists. Creating a new custom element is an option but it may take you some time. Another approach is compare the mjpeg header coming from the camera with the ones expected by VPUdec. Check if there is a software to view mjpeg data, then you can compare headers between 'v4l2src - > filesink' and media file that the vpudec can decode fine.
Leo
Try using vpudec, which is a hardware decoder:
gst-launch v4l2src ! vpudec ! mfw_v4lsink
Leo
Thanks for your reply!
I have try the vpudec before! but....
I got the green screen!
and the vpudec output the error print as below:
New clock: GstSystemClock
[INFO] bitstreamMode 1, chromaInterleave 0, mapType 0, tiled2LinearEnable 0
[ERR] JpegDecodeHeader failure
[ERR] JpegDecodeHeader failure
[ERR] JpegDecodeHeader failure
[ERR] JpegDecodeHeader failure
[ERR] JpegDecodeHeader failure
[ERR] JpegDecodeHeader failure
[ERR] JpegDecodeHeader failure
[ERR] JpegDecodeHeader failure
[ERR] JpegDecodeHeader failure
[ERR] JpegDecodeHeader failure
[ERR] JpegDecodeHeader failure
[ERR] JpegDecodeHeader failure
[ERR] JpegDecodeHeader failure
>>V4L_SINK: Actually buffer status:
hardware buffer : 7
software buffer : 0
full screen size:1280x720
Please try this:
1. Base on the original pipeline, change to filesrc (with a mjpeg file) instead of v4l2src. I just want to make sure that the decoder is working as expected. Is rendering OK?
2. Base on the original pipeline, change to filesink instead of mfw_v4lsink, just to discard a video sink issue. Playback this file either with gplay or in your host with any player you want. Is playback OK?
Let me know your results.
Leo
Thanks for your reply!
I think it's the mjpeg data stream isn't the standard mjpeg type after testing.
Maybe it's relate to the compatibility of the vpu mjpeg decoder.
how can I transform the mjpeg data stream to the standard mjpeg stream?
Thanks!
Not sure if that element exists. Creating a new custom element is an option but it may take you some time. Another approach is compare the mjpeg header coming from the camera with the ones expected by VPUdec. Check if there is a software to view mjpeg data, then you can compare headers between 'v4l2src - > filesink' and media file that the vpudec can decode fine.
Leo