[FFmpeg-user] Creating video from a lot of jpeg pictures

Balogh László laci at blacc.hu
Mon Apr 11 11:58:02 EEST 2022


Hi,

I have about 4300 pictures in a folder (000_Images/2022/04/2022-04-10/). 
I want to create a video from them, every picture should be one frame in 
the video.

I'm using the following command: ffmpeg -framerate 25 -i 
000_Images/2022/04/2022-04-10/*.jpeg -c:v libx264 -profile:v high -crf 
20 -pix_fmt yuv420p -y output.mp4

Its starting, but after about 500 pictures ffmpeg is slowing down, while 
the system load goes quickly up. It was hard to cancel the command, as 
the load was above 80. :)

Here some log of the command:

mcll at mcllserver-i3:/home/VVCam$ ffmpeg -framerate 25 -i 
000_Images/2022/04/2022-04-10/*.jpeg -c:v libx264 -profile:v high -crf 
20 -pix_fmt yuv420p -y output.mp4
   built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
   configuration: --prefix=/usr --extra-version=0ubuntu0.2 
--toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu 
--incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping 
--enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa 
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca 
--enable-libcdio --enable-libflite --enable-libfontconfig 
--enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm 
--enable-libmp3lame --enable-libmysofa --enable-libopenjpeg 
--enable-libopenmpt --enable-libopus --enable-libpulse 
--enable-librubberband --enable-librsvg --enable-libshine 
--enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh 
--enable-libtheora --enable-libtwolame --enable-libvorbis 
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 
--enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi 
--enable-omx --enable-openal --enable-opengl --enable-sdl2 
--enable-libdc1394 --enable-libdrm --enable-libiec61883 
--enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 
--enable-shared
   libavutil      55. 78.100 / 55. 78.100
   libavcodec     57.107.100 / 57.107.100
   libavformat    57. 83.100 / 57. 83.100
   libavdevice    57. 10.100 / 57. 10.100
   libavfilter     6.107.100 /  6.107.100
   libavresample   3.  7.  0 /  3.  7.  0
   libswscale      4.  8.100 /  4.  8.100
   libswresample   2.  9.100 /  2.  9.100
   libpostproc    54.  7.100 / 54.  7.100
Input #0, image2, from 
'000_Images/2022/04/2022-04-10/2022-04-10_00_00_01.jpeg':
   Duration: 00:00:00.04, start: 0.000000, bitrate: 66148 kb/s
     Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 
2688x1520 [SAR 1:1 DAR 168:95], 25 tbr, 25 tbn, 25 tbc
Stream mapping:
   Stream #0:0 -> #0:0 (mjpeg (native) -> mjpeg (native))
   Stream #0:0 -> #1:0 (mjpeg (native) -> mjpeg (native))
   Stream #0:0 -> #2:0 (mjpeg (native) -> mjpeg (native))
   Stream #0:0 -> #3:0 (mjpeg (native) -> mjpeg (native))
   Stream #0:0 -> #4:0 (mjpeg (native) -> mjpeg (native))
   Stream #0:0 -> #5:0 (mjpeg (native) -> mjpeg (native))
   Stream #0:0 -> #6:0 (mjpeg (native) -> mjpeg (native))
...cut...
   Stream #0:0 -> #4316:0 (mjpeg (native) -> mjpeg (native))
   Stream #0:0 -> #4317:0 (mjpeg (native) -> mjpeg (native))
   Stream #0:0 -> #4318:0 (mjpeg (native) -> mjpeg (native))
   Stream #0:0 -> #4319:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
Output #0, image2, to 
'000_Images/2022/04/2022-04-10/2022-04-10_00_00_21.jpeg':
   Metadata:
     encoder         : Lavf57.83.100
     Stream #0:0: Video: mjpeg, yuvj420p(pc), 2688x1520 [SAR 1:1 DAR 
168:95], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
     Metadata:
       encoder         : Lavc57.107.100 mjpeg
     Side data:
       cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
Output #1, image2, to 
'000_Images/2022/04/2022-04-10/2022-04-10_00_00_41.jpeg':
   Metadata:
     encoder         : Lavf57.83.100
     Stream #1:0: Video: mjpeg, yuvj420p(pc), 2688x1520 [SAR 1:1 DAR 
168:95], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
     Metadata:
       encoder         : Lavc57.107.100 mjpeg
     Side data:
       cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
Output #2, image2, to 
'000_Images/2022/04/2022-04-10/2022-04-10_00_01_01.jpeg':
   Metadata:
     encoder         : Lavf57.83.100
     Stream #2:0: Video: mjpeg, yuvj420p(pc), 2688x1520 [SAR 1:1 DAR 
168:95], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
     Metadata:
       encoder         : Lavc57.107.100 mjpeg
     Side data:
       cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
...etc...

Why is this generating such a high load, and what should i do?

Thanks

Regards, Laszlo




More information about the ffmpeg-user mailing list