Skip to main content

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:- 


  • 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

You can also easily rotate videos using a simple command


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

Popular posts from this blog

SHORT CUT TO REMOVE PENDRIVE

Rather than clicking on the task bar and then safely removing the pendrive you can eaily do so creating a shortcut: The Steps are:- 1)Create shortcut on your desktop by right click and selecting new shortcut from the menu. 2)Type "RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll" click next and then finish. shortcut is created and now you can assign a shortcut key to it. just right click on it and select properties-> Click on Shortcut Tab -> Assign a Shortcut key to it(it will take Ctrl+Alt by default)eg: if you press 1 shortcut will be Ctrl+Alt+1.

Microsoft Internet Explorer 9 Beta Review and Download

                                                                                   Which browser do you use for daily surfing chances are you would say Chrome, Firefox, Safari, Opera etc… anything but Internet Explorer. However, Microsoft has just unleashed the beta version of IE9, which could make you change your mind about browsers. The first look I would say, It's very minimalist: the box is both the address bar and the search box. The default is of course Bing, but you can change that. Next to that are tabs; to the far right of the screen are discreet icons for your home page, your favor...

uTorrent and BitTorrent beta comes to Android, available on Google Play

Earlier this year, we heard reports that BitTorrent Inc., was working on an Android version of its popular uTorrent and BitTorrent client.  Fans of the uTorrent and BitTorrent torrent clients can now rejoice!, your  favorite  desktop torrent clients are now  available  on your mobile devices, because BitTorrent Inc. has launched a beta apps of uTorrent and BitTorrent clients for any mobile or tablet running Android OS. These are fully functional, standalone clients unlike the Remote apps that were available until now.   There are many torrent clients already available on Google Play, but most of them are have limited functionality and are ad-supported unless you have a paid version but both of these apps are currently free, with features like RSS feeds for serialized downloads , unlimited upload/download speed, and running and downloading over WiFi in background, currently there are no limits on download sizes either. Both  apps suppo...