Time-lapse generation

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Time-lapse generation

FFmpeg-users mailing list
Hi everyone,

I routinely generate time-lapse videos from series of pictures taken by fixed cameras (minimum 10 000 images per video) with the following command :

        ffmpeg -f image2 -r 5 -pattern_type glob -i '*[0-9].jpg' -vf "scale=1620:1080,format=yuv420p" -vcodec libx264 final.mp4

Everything usually works, except for yesterday when I had 10 000 pictures and from this set I had three sequences of images, with varying dimensions :

* the first 8 000 pictures : 5184x3456
* 8 pictures : 720x480
* the remaining pictures : 5184x3456

Starting around the 8000th picture, ffmpeg started dropping frames and the behaviour continued up until the end of the file.
Of course when I tried to play the file, it ended around the 8000th picture.

I managed to isolate the problem : the culprits were the low res images (720x480) and by eliminating them from the set, the process went smoothly and produced a nice MP4 with all the pictures, from start to finish, without dropping any frames.

My question is : how could I ask ffmpeg to not be bothered by the pictures resolution changes and scale them according to the output dimension, 1620:1080, even though input images might be smaller than that ?

Following advice on Stack Overflow, I tried to modify the output scale with "scale=1620:-2” instead of "scale=1620:1080” but nothing changed, frames continued to be dropped…

(I’m using ffmpeg 3.2.14 and I haven’t tried a newer version)



Cheers.
Flubb.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Time-lapse generation

Carl Eugen Hoyos-2
Am Fr., 25. Okt. 2019 um 10:59 Uhr schrieb MailingLists - XYZ via
ffmpeg-user <[hidden email]>:

>         ffmpeg -f image2 -r 5 -pattern_type glob -i '*[0-9].jpg' -vf "scale=1620:1080,format=yuv420p" -vcodec libx264 final.mp4

Please test current FFmpeg git head and provide the complete, uncut
console output.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Time-lapse generation

Moritz Barsnick
In reply to this post by FFmpeg-users mailing list
On Fri, Oct 25, 2019 at 10:59:27 +0200, MailingLists - XYZ via ffmpeg-user wrote:
> ffmpeg -f image2 -r 5 -pattern_type glob -i '*[0-9].jpg' -vf "scale=1620:1080,format=yuv420p" -vcodec libx264 final.mp4

"-framerate" is preferred over "-r".

> Starting around the 8000th picture, ffmpeg started dropping frames and the behaviour continued up until the end of the file.

You should show us the complete, uncut console output of your command.

> My question is : how could I ask ffmpeg to not be bothered by the
> pictures resolution changes and scale them according to the output
> dimension, 1620:1080, even though input images might be smaller than
> that ?

The command should be correct to achieve that.

> Following advice on Stack Overflow, I tried to modify the output
> scale with "scale=1620:-2” instead of "scale=1620:1080” but nothing
> changed, frames continued to be dropped…

Well, that's stupid advice, as 1080 is already divisible by 2.

> (I’m using ffmpeg 3.2.14 and I haven’t tried a newer version)

That's certainly not sufficient. What if this was fixed in the
meantime? Kindly grab a newer version. E.g. for Linux, this site
provides static builds:
https://johnvansickle.com/ffmpeg/
(Left column, "git master", please.)

Please do try that first, and come back with the results (including the
console output).

Thanks,
cheers,
Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Time-lapse generation

FFmpeg-users mailing list
I followed your advice and recompiled ffmpeg with libx264 and, indeed, this version corresponding to the commit 155508c6e9 generated a correct file.

Thanks !


> On 25 Oct 2019, at 11:35, Moritz Barsnick <[hidden email]> wrote:
>
> On Fri, Oct 25, 2019 at 10:59:27 +0200, MailingLists - XYZ via ffmpeg-user wrote:
>> ffmpeg -f image2 -r 5 -pattern_type glob -i '*[0-9].jpg' -vf "scale=1620:1080,format=yuv420p" -vcodec libx264 final.mp4
>
> "-framerate" is preferred over "-r".
>
>> Starting around the 8000th picture, ffmpeg started dropping frames and the behaviour continued up until the end of the file.
>
> You should show us the complete, uncut console output of your command.
>
>> My question is : how could I ask ffmpeg to not be bothered by the
>> pictures resolution changes and scale them according to the output
>> dimension, 1620:1080, even though input images might be smaller than
>> that ?
>
> The command should be correct to achieve that.
>
>> Following advice on Stack Overflow, I tried to modify the output
>> scale with "scale=1620:-2” instead of "scale=1620:1080” but nothing
>> changed, frames continued to be dropped…
>
> Well, that's stupid advice, as 1080 is already divisible by 2.
>
>> (I’m using ffmpeg 3.2.14 and I haven’t tried a newer version)
>
> That's certainly not sufficient. What if this was fixed in the
> meantime? Kindly grab a newer version. E.g. for Linux, this site
> provides static builds:
> https://johnvansickle.com/ffmpeg/
> (Left column, "git master", please.)
>
> Please do try that first, and come back with the results (including the
> console output).
>
> Thanks,
> cheers,
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Time-lapse generation

Moritz Barsnick
On Fri, Oct 25, 2019 at 17:29:15 +0200, MailingLists - XYZ via ffmpeg-user wrote:
> I followed your advice and recompiled ffmpeg with libx264 and,
> indeed, this version corresponding to the commit 155508c6e9 generated
> a correct file.

Excellent, thanks for the feedback!

Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".