-
Notifications
You must be signed in to change notification settings - Fork 132
Description
I would like to patch together three segments, and use one type of transition between the first and the second, and another one between the second and the third.
This appears to be impossible. The last "source=" command determines the transition being used for each occurrence of the filter.
EXAMPLE:
ffmpeg
-i file1.mp4
-i file2.mp4
-filter_complex "
[0:v]split=4[v000][v010][v020][v030];
[0:a]asplit=2[a000][a020];
[v000]trim=27.2:28.55[v001t];
[a000]atrim=27.2:28.55[a001t];
[v001t]setpts=PTS-STARTPTS[v001];
[a001t]asetpts=PTS-STARTPTS[a001];
[v010]trim=28.55:29.55[v011t];
[v011t]setpts=PTS-STARTPTS[v011]; \
[v020]trim=33:34.35[v021t]; \
[a020]atrim=33:34.35[a021t];
[v021t]setpts=PTS-STARTPTS[v021];
[a021t]asetpts=PTS-STARTPTS[a021];
[v030]trim=34.35:34.75[v031t];
[v031t]setpts=PTS-STARTPTS[v031];
[1:v]trim=0:8[v100t];
[1:a]atrim=0:8[a100t];
[v100t]setpts=PTS-STARTPTS[v100];
[a100t]asetpts=PTS-STARTPTS[a100]; \
[v011][v021]gltransition=duration=0.15:source=transitions/fade.glsl[vt1];
[v031][v100]gltransition=duration=0.35:source=transitions/luma.glsl[vt2];
[v001][vt1][vt2]concat=n=3[outv];
[a001][a021][a100]concat=n=3:v=0:a=1[outa]"
-map "[outv]"
-map "[outa]"
-y -q:v 1 tmp/out.mp4
This code will result in luma.glsl being applied to both transitions.