Jun 14, 2014

Merging multiple video files in Linux

Getting work done at Linux platform is not an easy one so, many people use windows. But, there are some who try to give a chance to the new and unique things. Well, now the Linux users have been raised at a greater pace because of its upgraded features. This open source operating system has given a tough competition to the Windows. The problems of the Linux users can be handled with us. Many people face the problem to managing the multiple files on Linux and in spite of various attempts either remain unsuccessful or lose some data. Since, the ffmpeg does not have an option to automatically perform these tasks. One has to follow a sequence of steps to achieve this.

Unlike Windows, while you download some clips from internet to your system, it sometimes becomes very irritating to open each and every file again and again to have a watch at it. This disturbs all the mood and continuation. But, now you can combine all the small or big clips in to one clip and have a better look at it. But, here we will give you a very secure and easy method to concatenate your multiple Mp4 files in to a single file without any much effort.
Follow the steps given below to attain your goal:
  • Open the terminal window by pressing Ctrl +Alt +T on your keyboard.
  • Type the home directory where your video file is being located. For example, if your video clips to be merged are stored in directory named “movies”, then type “cd movies” and then press Enter.
  • To get the list of all the video list resided in the folder, type Is* .mp4. Here .mp4 is the format of the video.
  • Enter this command so as to merge the mp4 video clips: 
    mencoder first movie.mp4 second movie.mp4 -ovc copy -oac copy -of lavf format=mp4 merged clip.mp4
  • Replace the word first movie and second movie with the real name of your videos that you want to merge. The word merged clip must be replaced with name of the merged file from the two video files.
  • Press Enter and halt until the operation completes and gives you the required output of the merged video clip file.

In this manner, you can merge as much files as you want and solve your issue of concatenation of files.