I'm trying to make an operation using FFmpeg with just one command to leave the output as lossless as possible.
My intention is to add two images, 5 seconds each, before the mp4 file, add a fade in to the first one of 1 second and add a third image after the video during 5 seconds.
Is it possible to do this on one pass?
I found some bits of code, namely:
ffmpeg -r 25 -loop 1 -t 5 -i "image" -i "video" -f lavfi -t 5 -i aevalsrc=0 \
-filter_complex "[0:v] [2:a] [1:v] [1:a] concat=n=2:v=1:a=1 [v] [a]" \
-c:v libx264 -c:a aac -strict -2 -map "[v]" -map "[a]" output.mp4
and
ffmpeg -i clip.mp4 -vf "fade=in:0:25" -acodec copy clip-out.mp4
But I'm not being able to use them together and I don't know if all those commands are really necessary. Any thoughts?
ffmpeg -i video -i image1 -i image2 -i image3
to show important info about each input. – llogan Mar 10 '20 at 17:00Video Encoder: Lavf58.18.104 Duration: 00:01:36.48, start: 0.000000, bitrate: 4038 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 3907 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default) Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
– AntMadeira Mar 10 '20 at 21:31