Easily Join / Merge Rotate Two or more video files without encoding or convert videos using ffmpeg in Windows (Or any other OS Mac OS, Linux) for free.
ffmpeg is a pretty handy tool for format transcoding, basic editing (trimming and concatenation), video scaling, video post-production effects, and standards compliance (SMPTE, ITU).
One of the basic requirement of merging or combining two or more videos is a task that can be easily accomplished by using ffmpeg. ffmpeg is a free and open source as well. And the performance is easily on par if not better than most paid software solutions.
In order to merge two or more videos follow the steps:-
Bonus: You can also convert video files from one format to another format with a simple command like
You can also easily rotate videos using a simple command
Above method is slow as it will re-encode your whole video. Also you can use
This will be lot faster as this will just edit the metadata and most modern video players will rotate your video automatically.
Here video.mp4 is the name of an existing file and output.mkv is the new file which we want to create.
ffmpeg is a cross Platform tool and above commands will work in Linux or Mac OS as well with little or no modification.
This is just one of the many useful functions ffmpeg offers for free. If you want to learn more about these features here.
One of the basic requirement of merging or combining two or more videos is a task that can be easily accomplished by using ffmpeg. ffmpeg is a free and open source as well. And the performance is easily on par if not better than most paid software solutions.
In order to merge two or more videos follow the steps:-
- First copy all video files into a folder. (Make sure you have checked "File name extensions".
- Next you need to download ffmpeg for Windows from their website. Choose 64bit unless you are using 32 bit version of Windows and select Static.
- Download the file. It should be a compressed file.
- Now open the file. And Go to "Bin", there you will find three files. You need to copy ffmpeg to the folder containing video files.
- Next open Command Prompt. And navigate to the folder containing video files.
- Next type the following command to generate a list of files.
(for %i in (*.mp4) do @echo file '%i') > mylist.txt
Note:- If your video files have different extension like .mkv than replace .mp4 with .mkv in abbove command
- You will see a file has been created inside the folder containing video files named "myist.txt".
- If you open this file, you will find the name of all files inside the folder.
- Next you type concat command to merge all files into a single file. This command will not encode the whole video so the process will be lot faster. But if you to convert files from one codec to another codec than this will not work.
ffmpeg -f concat -i mylist.txt -c copy output.mp4
Note:- Replace .mp4 with extension of your video files, if your input video format is not .mp4
- Now you will find a new video file with name output.mp4 in the same folder where you stored previous video files.
Bonus: You can also convert video files from one format to another format with a simple command like
ffmpeg -i video.mp4 output.mkv
ffmpeg -i input.mp4 -vf "transpose=1" output.mp4
Here:
- 0 = 90CounterCLockwise and Vertical Flip (default)
- 1 = 90Clockwise
- 2 = 90CounterClockwise
- 3 = 90Clockwise and Vertical Flip
Above method is slow as it will re-encode your whole video. Also you can use
ffmpeg -i input.m4v -metadata:s:v rotate="90" -codec copy output.m4v
This will be lot faster as this will just edit the metadata and most modern video players will rotate your video automatically.
Here video.mp4 is the name of an existing file and output.mkv is the new file which we want to create.
ffmpeg is a cross Platform tool and above commands will work in Linux or Mac OS as well with little or no modification.
This is just one of the many useful functions ffmpeg offers for free. If you want to learn more about these features here.
Comments