Tutorials

Apply Sliding Transition Effect Between Multiple Videos Using FFMPEG Command and xfade Filter

Sliding Transition Between Multiple Videos Using xfade Filter

Syntax/Format of Command

ffmpeg \
-i video1.mp4 \
-i video2.mp4 \
-filter_complex xfade=transition=<FADE_TYPE>:\
duration=<TRANSITION_DURATION_IN_SECONDS>:\
offset=<OFFSET_RELATIVE_TO_FIRST_STREAM_IN_SECONDS> \
outputVideo.mp4

Explanation

Here video1.mp4 is the first video and video2.mp4 is the second video

And in place of duration you can replace how much seconds you need to put of transition time

And in place of offset you need to replace the offset time in seconds

And then in place of fade_type you can replace many effects that xfade supports. They are listed are as follows

Sliding filter :-> One such filter is Sliding transition filter. The command will look something like this

slidedown Transition using FFmpeg

ffmpeg -i inputVideo1.mp4 -i inputVideo2.mp4 -filter_complex xfade=transition=slidedown:duration=5:offset=0 slidedownVideo.mp4

slideup transition command in FFMPEG

ffmpeg -i inputVideo1.mp4 -i inputVideo2.mp4 -filter_complex xfade=transition=slideup:duration=5:offset=0 slideupVideo.mp4

slideleft transition command in FFMPEG

ffmpeg -i inputVideo1.mp4 -i inputVideo2.mp4 -filter_complex xfade=transition=slideleft:duration=5:offset=0 slideleftVideo.mp4

slideright transition command in FFMPEG

ffmpeg -i inputVideo1.mp4 -i inputVideo2.mp4 -filter_complex xfade=transition=slideright:duration=5:offset=0 sliderightVideo.mp4
Furqan

Well. I've been working for the past three years as a web designer and developer. I have successfully created websites for small to medium sized companies as part of my freelance career. During that time I've also completed my bachelor's in Information Technology.

Recent Posts

Llama 3.1 vs GPT-4 Benchmarks

We evaluated the performance of Llama 3.1 vs GPT-4 models on over 150 benchmark datasets…

July 24, 2024

Transforming Manufacturing with Industrial IoT Solutions and Machine Learning

The manufacturing industry is undergoing a significant transformation with the advent of Industrial IoT Solutions.…

July 6, 2024

How can IT Professionals use ChatGPT?

If you're reading this, you must have heard the buzz about ChatGPT and its incredible…

September 2, 2023

ChatGPT in Cybersecurity: The Ultimate Guide

How to Use ChatGPT in Cybersecurity If you're a cybersecurity geek, you've probably heard about…

September 1, 2023

Add Cryptocurrency Price Widget in WordPress Website

Introduction In the dynamic world of cryptocurrencies, staying informed about the latest market trends is…

August 30, 2023

Best Addons for The Events Calendar Elementor Integration

The Events Calendar Widgets for Elementor has become easiest solution for managing events on WordPress…

August 30, 2023