[FFmpeg-user] MJPEG encoder large memory allocation issue

Tithi Patel tithi.patel at einfochips.com
Thu Sep 4 13:24:09 CEST 2014

I am using FFMPEG to stitch 4 jpeg images using 'tile=2x2' filter.

Following are the steps for this use case :

1. Create tile=2x2 filter
2. Decode input jpeg i.e get YUV data (Do this for all 4 JPEGs)
3. Feed this YUV data to the input of the filter (Do this for all 4 YUV buffers)
4. Output of the filter is stitched image in YUV format.
5. Encode this output image using MJPEG encoder of FFMPEG.

In this step 5, (i.e  Encode this output image using MJPEG encoder of FFMPEG) I am getting the following error
[mjpeg @ 0x69d40] Failed to allocate packet of size 144935000

Here my question is,
Why is MJPEG encoder attempting to allocate this high (~140 MB)memory.. ??

Note : The expected size of output JPEG is of the range of 0.5 - 3 MB.

************************************************************************************************************************************************************* eInfochips Business Disclaimer: This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated. Company has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email. *************************************************************************************************************************************************************

More information about the ffmpeg-user mailing list