How to Use VLC to Combine Two Clips

Techwalla may earn compensation through affiliate links in this story.
Image Credit: gorodenkoff/iStock/GettyImages

If you're serious about video editing, you can find relatively inexpensive software for your computer or your phone that lets you turn out professional-quality clips. If you aren't all that serious and only want to tweak a few clips occasionally, you may already have an excellent tool for the job. It's the VLC media player, which does a good job of playing almost any kind of video or audio imaginable. It also has surprisingly powerful editing tools that you can use to combine clips or change the video format.


Let's Get Standardized

You can use VLC to merge videos, and it's surprisingly easy, but first, you have to make sure they're in the same format. That can sound like a serious challenge, especially if you've been collecting videos from a wide variety of sources, such as Android phones and iPhones, websites, YouTube, and other sources. In this case, you can relax because the input video format doesn't matter with VLC's video editor. You can choose any combination of files in any combination of formats, and VLC converts them all at once in the same batch.


Video of the Day

Batch Video Conversion

To start the conversion, choose "Media" from the menu bar and then "Convert/Save" to open a dialog box. The keyboard shortcut "Ctrl-R" takes you to the same screen. Once you're there, click the "Add" button to browse for files. You can choose files from any folder on your device. After you choose all the clips you want to work on, click the drop-down "Convert/Save" menu. Choose "Convert" to open a new dialog box with several options; the important one is "Profile." When you click it, you'll see a ridiculously long list of output formats, all set up and ready to use. You could choose "YouTube SD" or "YouTube HD," for example, if you wanted to upload the video later or optimize it for an Android or iOS device.


Select a profile. If you click "Start" at this point, VLC overwrites the original files with their converted versions. If you prefer to keep the original files, click the box that says "Append – 'converted' to filename." You end up with two versions of each file, one converted and one not converted, and the converted ones plainly say they're converted.

VLC Merge Videos

Think of the batch conversion as a dress rehearsal for the real thing because using VLC to combine videos works in almost the same way. Start again by choosing "Media" from the menu bar, then "Convert/Save," and click the "Add" button to choose the newly converted files. Click the drop-down "Convert/Save" menu again to open the same dialog box as before. This time, in the field labeled "Destination file," you enter a new filename for the merged video clips. Choose an appropriate name – anything that works for you, from "clip3" to "waterskiing"–and click "Start." You'll see the usual VLC playback screen and the playback status bar doing its thing, but it's merging the videos instead of playing them. If you want to see this happening in real time, choose "Display the Output" before clicking "Start."


Combining Videos From the Command Line

If you use Linux as your operating system, you may find that VLC stubbornly refuses to let you enter a name for the combined file in the dialog box. In that case, you can bypass VLC's interface and use the command line to do the same job. The graphical, visual part of the program is there for your convenience, but VLC's actual "engine" doesn't need it to work. You can use the command line in Windows or OS X as well if you prefer. It's not as easy; you need to learn a long command, but it's efficient if you plan to combine a bunch of files all in one sitting.


Command Line Merging

Open up a terminal window, by clicking the Terminal icon in Linux or OS X or typing the command "cmd.exe" into the "Run" box on your Windows menu. If you're a Linux user, you can also use the "Ctrl-Alt-T" keyboard shortcut.

The command you enter uses the following format, in which you replace the parts in square brackets with the real filenames:


vlc [first filename] [second filename] --sout "gather:std{access=file,dst=[new filename]}" --sout-keep

If your computer gives you an error saying it can't find the command "vlc," specify where it is. On a Linux machine, that's usually the folder /usr/bin/vlc. If your files are named file1.mp4 and file2.mp4, and you want to combine them into something called file3.mp4, this is how the command would look when typed out:

./usr/bin/vlc/vlc file1.mp4 file2.mp4 --sout "gather:std{access=file,dst=file3.mp4}" --sout-keep

When you click "Enter," VLC combines the videos just as if you'd done it from the menu.