user12643: Is there any way to concat two video files with a fading effect using FFmpeg?
Something like this:
ffmpeg -f concat -i input.txt -c copy "--with:fade:out-in" output.ogg


user34030: I've created a little site recently for generating the FFmpeg CLI command to create xfade + acrossfade command for several videos. Check it out maybe you find it useful.
https://romander.github.io/ffmpeg-script-generator/
Add also you can check source code or contribute
https://github.com/Romander/ffmpeg-script-generator

user20815: ffmpeg-concat is the easiest way to accomplish what you want and allows you to use a bunch of sexy OpenGL transitions, with the default being crossfade.
ffmpeg-gl-transition is a custom ffmpeg filter which allows you to use GLSL to smoothly transition between two video streams. This filter is significantly easier to use and customize than the alternatives listed here.
This filter supports a large list of transition types, with the default being crossfade.
./ffmpeg -i 0.mp4 -i 1.mp4 -filter_complex "gltransition=duration=4:offset=1.5" out.mp4


user1871: Your present command specifies stream copy. Since you wish to alter the video frames during the transition, that won't work.
It can be done if you know the duration of the two videos and the duration of fade. Also, for the command below, the resolutions of the two videos should be the same.
ffmpeg -i first.ogg -i second.ogg \
-filter_complex \
"color=black:WxH:d=Video1Length+Video2Length-FadeDuration[base]; \
 [0:v]setpts=PTS-STARTPTS[v0]; \
 [1:v]format=yuva420p,fade=in:st=0:d=FadeDuration:alpha=1, \
      setpts=PTS-STARTPTS+((Video1Length-FadeDuration)/TB)[v1]; \
 [base][v0]overlay[tmp]; \
 [tmp][v1]overlay,format=yuv420p[fv]; \
 [0:a][1:a]acrossfade=d=FadeDuration[fa]" \
-map [fv] -map [fa] \
output.ogg

Replace:
WxH with the resolution of the videos i.e. 640x360
And:
Video1Length, Video2Length, and FadeDuration with their value in seconds.

12643: <p>Is there any way to concat two video files with a fading effect using FFmpeg?</p>
<p>Something like this:</p>
<pre><code>ffmpeg -f concat -i input.txt -c copy &quot;--with:fade:out-in&quot; output.ogg
</code></pre>
 34030: <p>I've created a little site recently for generating the FFmpeg CLI command to create xfade + acrossfade command for several videos. Check it out maybe you find it useful.</p>
<p><a href="https://romander.github.io/ffmpeg-script-generator/" rel="nofollow noreferrer">https://romander.github.io/ffmpeg-script-generator/</a></p>
<p>Add also you can check source code or contribute</p>
<p><a href="https://github.com/Romander/ffmpeg-script-generator" rel="nofollow noreferrer">https://github.com/Romander/ffmpeg-script-generator</a></p>
 20815: <p><a href="https://github.com/transitive-bullshit/ffmpeg-concat" rel="nofollow noreferrer">ffmpeg-concat</a> is the easiest way to accomplish what you want and allows you to use a bunch of sexy OpenGL transitions, with the default being crossfade.</p>

<p><a href="https://github.com/transitive-bullshit/ffmpeg-gl-transition" rel="nofollow noreferrer">ffmpeg-gl-transition</a> is a custom ffmpeg filter which allows you to use GLSL to smoothly transition between two video streams. This filter is significantly easier to use and customize than the alternatives listed here.</p>

<p>This filter supports a large <a href="https://gl-transitions.com/" rel="nofollow noreferrer">list</a> of transition types, with the default being crossfade.</p>

<pre><code>./ffmpeg -i 0.mp4 -i 1.mp4 -filter_complex "gltransition=duration=4:offset=1.5" out.mp4
</code></pre>
 1871: <p>Your present command specifies stream copy. Since you wish to alter the video frames during the transition, that won't work.</p>
<p>It can be done if you know the duration of the two videos and the duration of fade. Also, for the command below, the resolutions of the two videos should be the same.</p>
<pre><code>ffmpeg -i first.ogg -i second.ogg \
-filter_complex \
&quot;color=black:WxH:d=Video1Length+Video2Length-FadeDuration[base]; \
 [0:v]setpts=PTS-STARTPTS[v0]; \
 [1:v]format=yuva420p,fade=in:st=0:d=FadeDuration:alpha=1, \
      setpts=PTS-STARTPTS+((Video1Length-FadeDuration)/TB)[v1]; \
 [base][v0]overlay[tmp]; \
 [tmp][v1]overlay,format=yuv420p[fv]; \
 [0:a][1:a]acrossfade=d=FadeDuration[fa]&quot; \
-map [fv] -map [fa] \
output.ogg
</code></pre>
<p>Replace:</p>
<p><code>WxH</code> with the resolution of the videos i.e. <code>640x360</code></p>
<p>And:</p>
<p><code>Video1Length</code>, <code>Video2Length</code>, and <code>FadeDuration</code> with their value in seconds.</p>
