Body: <p>Using FFMPEG, I need to join Video 1 and Video 2 with an intermediate transition Video T .</p>
  <ul>
  <li>Video 1 has a duration D1 .</li>
  <li>Video 2 has a duration D2 .</li>
  <li>Video T should have a duration DT .</li>
  <li>The resulting video should have a duration D1 + DT + D2 .</li>
  <li>Video T should start with a copy of the end frame of Video 1.</li>
  <li>Video T should end with a copy of the start frame of Video 2.</li>
  <li>Video T should be a crossfade from its start frame to its end frame.</li>
  <li>Video 1 and Video 2 are MP4 files and have the same encoding parameters.</li>
  <li>Video 1 and Video 2 contain audio, that should remain in the resulting video.</li>
  <li>Video T should have no audio.</li>
  </ul>
  <p>How can Video T be generated, using FFMPEG simply ?</p>
  <p>How can Video 1 and Video 2 be joined with the intermediate Video T, using FFMPEG simply ?</p>
  <p>Note : I would prefer to perform the entire operation, through a single FFMPEG call.</p>
  <p>Note : I would prefer to avoid setting offsets, since D1, D2 and DT may vary.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-16T04:38:06.387Z
Comments.Text: Why do you need a video T at all?
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-16T10:50:09.513Z
Comments.Text: Video T needs to be within the resulting video, but it does not need to be saved separately.
Comments.UserDisplayName: xav
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-16T10:53:36.123Z
Comments.Text: Video T is needed, to obtain a crossfade transition from Video 1 to Video 2.
Comments.UserDisplayName: xav
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-16T11:35:22.227Z
Comments.Text: You just need to crossfade directly between 1 and 2. Maybe apply tpad to extend the streams if you want.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-16T15:29:48.830Z
Comments.Text: Indeed I probably need to use tpad, to extend Video 1 and 2.  Thank you for the hint !
Comments.UserDisplayName: xav
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-16T15:31:50.210Z
Comments.Text: But is it possible to crossfade without setting offsets, since D1, D2 and DT may vary ?
Comments.UserDisplayName: xav
Tags: <ffmpeg>
Title: Using FFMPEG, how to join two videos with an intermediate crossfade transition?
UserDisplayName: xav
ThreadText: # Using FFMPEG, how to join two videos with an intermediate crossfade transition?
  
  (Asked by: username_0 on 2021-02-15)
  
  Using FFMPEG, I need to join Video 1 and Video 2 with an intermediate transition Video T .
  
  * Video 1 has a duration D1 .
  * Video 2 has a duration D2 .
  * Video T should have a duration DT .
  * The resulting video should have a duration D1 + DT + D2 .
  * Video T should start with a copy of the end frame of Video 1.
  * Video T should end with a copy of the start frame of Video 2.
  * Video T should be a crossfade from its start frame to its end frame.
  * Video 1 and Video 2 are MP4 files and have the same encoding parameters.
  * Video 1 and Video 2 contain audio, that should remain in the resulting video.
  * Video T should have no audio.
  
  How can Video T be generated, using FFMPEG simply ?
  
  How can Video 1 and Video 2 be joined with the intermediate Video T, using FFMPEG simply ?
  
  Note : I would prefer to perform the entire operation, through a single FFMPEG call.
  
  Note : I would prefer to avoid setting offsets, since D1, D2 and DT may vary.
  
  **Tags:** ffmpeg
  
  > **Comments:**
  > **username_1**: Why do you need a video T at all?  
  > **username_0**: Video T needs to be within the resulting video, but it does not need to be saved separately.  
  > **username_0**: Video T is needed, to obtain a crossfade transition from Video 1 to Video 2.  
  > **username_1**: You just need to crossfade directly between 1 and 2. Maybe apply tpad to extend the streams if you want.  
  > **username_0**: Indeed I probably need to use tpad, to extend Video 1 and 2.  Thank you for the hint !  
  > **username_0**: But is it possible to crossfade without setting offsets, since D1, D2 and DT may vary ?  
  
  ---
  
  ## 0 answers
  
  