[FFmpeg-user] Multiple xfade in one run

Paul B Mahol onemda at gmail.com
Mon Jul 4 19:53:05 EEST 2022


On Mon, Jul 4, 2022 at 6:46 PM Cecil Westerhof via ffmpeg-user <
ffmpeg-user at ffmpeg.org> wrote:

> Paul B Mahol <onemda at gmail.com> writes:
>
> > On Mon, Jul 4, 2022 at 6:15 PM Cecil Westerhof via ffmpeg-user <
> > ffmpeg-user at ffmpeg.org> wrote:
> >
> >> Some time ago I was experimenting with xfade. I wanted to know how to
> >> use several in one run. Now I really needed it, so I did some digging
> >> and found this:
> >>      ffmpeg -y                  \
> >>       -i input0.mkv             \
> >>       -i input1.mkv             \
> >>       -i input2.mkv             \
> >>       -i input3.mkv             \
> >>       -i input4.mkv             \
> >>       -i input5.mkv             \
> >>       -i input6.mkv             \
> >>       -i input7.mkv             \
> >>       -i input8.mkv             \
> >>       -i input9.mkv             \
> >>       -vcodec libx264           \
> >>       -crf    26                \
> >>       -preset veryfast          \
> >>       -filter_complex "
> >>         [0:a][1:a] acrossfade=d=4[a1];
> >>         [0:v][1:v] xfade=transition=hlslice:
> >>                           duration=4:
> >>                           offset=308[v1];
> >>
> >>         [a1][2:a] acrossfade=d=4[a2];
> >>         [v1][2:v] xfade=transition=vertopen:
> >>                           duration=4:
> >>                           offset=357[v2];
> >>
> >>         [a2][3:a] acrossfade=d=4[a3];
> >>         [v2][3:v] xfade=transition=circlecrop:
> >>                           duration=4:
> >>                           offset=533[v3];
> >>
> >>         [a3][4:a] acrossfade=d=4[a4];
> >>         [v3][4:v] xfade=transition=rectcrop:
> >>                           duration=4:
> >>                           offset=1016[v4];
> >>
> >>         [a4][5:a] acrossfade=d=4[a5];
> >>         [v4][5:v] xfade=transition=slideup:
> >>                           duration=4:
> >>                           offset=1158[v5];
> >>
> >>         [a5][6:a] acrossfade=d=4[a6];
> >>         [v5][6:v] xfade=transition=wiperight:
> >>                           duration=4:
> >>                           offset=1473[v6];
> >>
> >>         [a6][7:a] acrossfade=d=4[a7];
> >>         [v6][7:v] xfade=transition=horzclose:
> >>                           duration=4:
> >>                           offset=1661[v7];
> >>
> >>         [a7][8:a] acrossfade=d=4[a8];
> >>         [v7][8:v] xfade=transition=diagbl:
> >>                           duration=4:
> >>                           offset=2082[v8];
> >>
> >>         [a8][9:a] acrossfade=d=4[a9];
> >>         [v8][9:v] xfade=transition=slideright:
> >>                           duration=4:
> >>                           offset=2211[v9]
> >>       "                         \
> >>       -map '[v9]' -map '[a9]'   \
> >>       output.mkv
> >>
> >> I hope there are better ways, because there are some problems with it.
> >> For example it needs a lot of memory. (24 GB)
> >>
> >
> > Could use (a)movie filters and only use such filter when actually needed
> in
> > graph.
>
> I am concerning ffmpeg still a newbie. What do you mean by this?
>

Read documentation few times.


>
> --
> Cecil Westerhof
> Senior Software Engineer
> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-user mailing list