Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#3998 closed defect (invalid)

ffmpeg uses 300mb memory to convert one jpg to jpg

Reported by: compn Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


only tested on windows.

F:\>ffmpeg -i DSC00418.JPG out.jpg
ffmpeg version N-64539-gc8b2cf4 Copyright (c) 2000-2014 the FFmpeg developers

built on Jul 8 2014 22:02:17 with gcc 4.8.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzli

b --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libblu
ray --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-
libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libope
njpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex
--enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrw
benc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enab
le-libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib

libavutil 52. 91.100 / 52. 91.100
libavcodec 55. 68.102 / 55. 68.102
libavformat 55. 45.100 / 55. 45.100
libavdevice 55. 13.102 / 55. 13.102
libavfilter 4. 10.100 / 4. 10.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100

Input #0, image2, from 'DSC00418.JPG':

Duration: 00:00:00.04, start: 0.000000, bitrate: N/A

Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg), 4608x3456, 25 tbr, 25 tbn, 25 tbc

[image2 @ 02da9020] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Se
t AVStream.time_base instead.
Output #0, image2, to 'out.jpg':


encoder : Lavf55.45.100
Stream #0:0: Video: mjpeg, yuvj422p, 4608x3456, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc

encoder : Lavc55.68.102 mjpeg

Stream mapping:

Stream #0:0 -> #0:0 (mjpeg (native) -> mjpeg (native))

Press [q] to stop, ? for help
frame= 1 fps=0.0 q=12.4 Lsize=N/A time=00:00:00.04 bitrate=N/A
video:628kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

if i use ffmpeg -i DSC00418.JPG -f null NUL
memory usage is only 70mb
(NUL is windows /dev/null)

likewise ffmpeg -i DSC00418.JPG -vcodec copy out.jpg -y
only uses 60MB memory.

ffmpeg from nov 2013, ffmpeg version N-58288-g80e5859 , also has the same memory usage.
so i do not think it is a regression.

ffmpeg -i DSC00418.JPG -s 640x480 out.jpg -y
also only uses 60mb memory. so maybe the problem is in jpeg encoder on large resolution?

Change History (2)

in reply to:  description comment:1 by Carl Eugen Hoyos, 8 years ago

Component: ffmpegundetermined
Keywords: memory removed
Priority: wishnormal
Resolution: invalid
Status: newclosed
Type: enhancementdefect

Replying to compn:

ffmpeg version N-64539-gc8b2cf4 Copyright (c) 2000-2014 the FFmpeg developers

Could you explain why you are reporting an issue that was fixed this week?

comment:2 by compn, 8 years ago

doh! confirmed newer ffmpeg build does not have this problem.
thats what i get for reporting first and testing git later.

Note: See TracTickets for help on using tickets.