[FFmpeg-trac] #7355(avcodec:new): No MJPEG input with MMAL decoder
FFmpeg
trac at avcodec.org
Mon Aug 13 17:39:03 EEST 2018
#7355: No MJPEG input with MMAL decoder
-------------------------------------+-------------------------------------
Reporter: | Type:
Serveurperso | enhancement
Status: new | Priority: normal
Component: avcodec | Version: git-
Keywords: | master
Blocking: | Blocked By:
Analyzed by developer: 0 | Reproduced by developer: 0
-------------------------------------+-------------------------------------
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
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7355>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list