On Sun, Aug 30, 2026 at 2:44 AM Olivier Sannier via ffmpeg-user <
[email protected]> wrote:

> Hello,
>
> I have a collection of jpeg files like so:
>
> output_2026-08-28_10-24-23.jpg
> output_2026-08-28_10-24-33.jpg
> output_2026-08-28_10-25-06.jpg
> output_2026-08-28_10-53-54.jpg
> output_2026-08-28_10-54-32.jpg
> output_2026-08-28_11-06-46.jpg
>
> This is a test set of files, in the future they will all be spaced by
> the same amount of time, but for my initial testing, this will do.
>
> The goal is to create a timelapse where each image has the same duration
> and after reading around, I came up with this command line:
>
> ffmpeg -r 1 -pattern_type glob -i './images/output_*.jpg' -c:v libx264
> -y timelapse.mp4
>
> This does not output an error, however, using VLC Player to read the
> generated file, I have noticed a few strange things:
>
> * With one or two images, nothing is played
> * With three or four images, only the first two frames are played before
> VLC stops
> * With five images, only the first three frames are played before VLC stops
> * With all six images, only the first 4 frames are played and VLC stops
>
> I tried replacing libx264 with mpeg2video or mpeg4 but the results were
> worse, the generated video is not even readable by VLC.
> I tried adding -pix_fmt yuv420p -s 1920x1080 before -c:v which
> effectively changed the video resolution but did not change the x264
> result when reading it. It allowed to get a working mpeg video file, but
> with the same "only 4 frames used" result
> I tried replacing -r 1 with -framerate 1 but this did not change the result
> I tried replacing -c:v with  -vcodec libx264 -acodec aac  but that too
> did not change the result
>
> I'm sure that I did something wrong here, but I can't figure out what
> just yet. I have placed a debug log of the above original command at the
> end of this email.
>
> Thanks a lot for your help.
>
> Olivier
>
>
I used to spend a lot of time creating timelapse videos in the past. I was
usually taking pictures every two seconds and wanted to get videos that ran
at a 60x speedup, so a minute of video time showed what happened in an hour
of real time.  That had me using a "-r 30" parameter and I was using -"c:v
libx265 -crf 23" parameters to specify the video codec. Since I had no
audio input I didn't specify an audio codec. My files worked because I was
using many input files.

The nature of modern (h264, hevc, vp9, etc.) codecs makes short files very
different.

You might want to try using a simpler codec such as mjpeg to see if you get
the results you want. It won't give you the compression as each frame will
be fully encoded in the video, but with fewer frames will probably be
closer to what you are looking for.
_______________________________________________
ffmpeg-user mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to