How to let imx6 decode mjpeg(720p) smoothly

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

How to let imx6 decode mjpeg(720p) smoothly

Jump to solution
3,495 Views
huangjacky
Contributor III

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!

Labels (3)
0 Kudos
Reply
1 Solution
1,728 Views
LeonardoSandova
Specialist I

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

View solution in original post

0 Kudos
Reply
5 Replies
1,728 Views
LeonardoSandova
Specialist I

Try using vpudec, which is a hardware decoder:

gst-launch v4l2src ! vpudec ! mfw_v4lsink

Leo

0 Kudos
Reply
1,728 Views
huangjacky
Contributor III

Thanks for your reply!

I have try the vpudec before!  but....

IMG_0005.JPG

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

0 Kudos
Reply
1,728 Views
LeonardoSandova
Specialist I

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

0 Kudos
Reply
1,728 Views
huangjacky
Contributor III

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!

0 Kudos
Reply
1,729 Views
LeonardoSandova
Specialist I

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

0 Kudos
Reply