0

Slideshows may have many slides, and if you want xfade crossfade effect, it seems you cannot use the concat demuxer. FFmpeg supports at least 50 input files, but if you also need to specify filters for each file, you're eventually going to run into the 8 kB max command line length on Windows. (I tested that with 50 input files and ran into that limit.)

Filters might look like this for each file:

-framerate 30 -loop 1 -t 7 -i 20.jpg
… (spread across lines for readability:) …
-filter_complex "…
[3] scale=1600:960: force_original_aspect_ratio=decrease,
 pad=1920:1080:(ow-iw)/2:(oh-ih)/2 [v3]; …
[w3][v4] xfade=offset=25 [w4]; …"

Repeat a few dozen times and pretty soon you're talking about real kilobytes.

Am I dragging FFmpeg beyond its intended purpose by trying to create such crossfaded slideshows? It does work quite nicely, and can be generated by Perl script, and tuned in Notepad.

Is there a method (scripting or similar) to avoid the redundancy in the options and filter specifications to stretch the limits of how much can be done on the command line?

Other advice concerning my possibly misguided approach?

1 Answer 1

1

This the basic approach. But I would scale+pad each image beforehand. That will save both characters in the final filtergraph as well as CPU/RAM by scaling/padding each image -framerate x -t times.

1
  • « … by scaling/padding each image -framerate x -t times » • Now that you mention it, I did have the feeling that processing was disappointingly slow. Indeed, how would the filters know that they're dealing with series of identical images that would have to be scaled only once? This should have occurred to me. Thanks for pointing it out. While grappling with the syntax, one would benefit from better understanding the underlying processing model.
    – Lumi
    Commented Sep 27, 2023 at 8:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .