Opened 13 months ago

Last modified 6 weeks ago

#7355 new enhancement

No MJPEG input with MMAL decoder

Reported by: Serveurperso Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: mmal
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Can you add the MJPEG input to MMAL decoder ?

https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/mmaldec.c

Line 376 I can't see the MJPEG format :

switch (avctx->codec_id) {
case AV_CODEC_ID_MPEG2VIDEO:

format_in->encoding = MMAL_ENCODING_MP2V;
break;

case AV_CODEC_ID_MPEG4:

format_in->encoding = MMAL_ENCODING_MP4V;
break;

case AV_CODEC_ID_VC1:

format_in->encoding = MMAL_ENCODING_WVC1;
break;

case AV_CODEC_ID_H264:
default:

format_in->encoding = MMAL_ENCODING_H264;
break;

}

(From 6by9 on rpi-firmware)

"The Pi supports hardware accelerated MJPEG via IL or MMAL, but FFMPEG doesn't.
Having said that, the MMAL decoder would probably only need a half-dozen lines of code added to support it, mainly setting up format_in->encoding in ffmmal_init_decoder, and a FFMMAL_DEC definition at the end of the file. (libavcodec/mmaldec.c).
I'm not sure how well FFMPEG differentiates between MJPEG and JPEG, so there may be minor issues. A couple of ffmpeg-dev list posts recently have been about adding some MJPEG codecs and were discussing it."

I'm free to make any testing for you on my ready Raspberry PI + MJPEG capture hardware. I run 24/7 with FFMpeg git-master and raw YUYV but there is few USB2 bandwitch problem:(

Thanks

Change History (1)

comment:1 Changed 6 weeks ago by cehoyos

  • Keywords mmal added
  • Priority changed from normal to wish
Note: See TracTickets for help on using tickets.