Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

mmal fail to decode mjpeg from USB camera #32

Closed
linhuifj opened this issue Dec 23, 2020 · 0 comments
Closed

mmal fail to decode mjpeg from USB camera #32

linhuifj opened this issue Dec 23, 2020 · 0 comments

Comments

@linhuifj
Copy link

linhuifj commented Dec 23, 2020

Example of the frame:
example of frame

I have a USB camera that outputs mjpeg frames that fail to be decoded by mmal.
I have tried to use hello_mmal_jpeg, hello_mmal_video, and FFmpeg with mmal_mjpeg decoder, none of them is ok.

I finally come out with the solution to use mjpeg2jpeg converter in FFmpeg:
./ffmpeg -i ~/raw.jpg -codec copy -bsf:v mjpeg2jpeg yy.jpg
I writer a convert by referring to the code in FFmpeg mjpeg2jpeg.

My question:

  1. Is there any better solution?
  2. what's the highest framerate supported by mmal to decode video with size 3840x2160? I have tested the decoding of hello_mmal_jpeg and found that it takes about 150ms to decode the image, which is too slow.
  3. Is mjpeg video decoding faster than image decoding?
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant