Merge video files via command line?

Is it possible to merge two (or more) video files from the command line? In Windows, one could do this:

copy /b VTS_01_1.vob + VTS_01_2.vob + VTS_01_3.vob + VTS_01_4.vob Output.vob 

I find this to be much easier and faster than using a dedicated program. Is there an equivalent in Ubuntu?


cat VTS_01_*.vob > output.vob

Improved version (this will show a progress bar):

cat VTS_O1_*.VOB | pv | dd of=output.vob

Similar to the 2nd:

 pv VTS_01_*.vob > output.vob

Oh and you could also mv the output.vob to .mpeg and have it play in VLC or another videoplayer.

Using ffmpeg:

ffmpeg -i "concat:VTS_01_1.VOB|VTS_01_2.VOB|VTS_01_3.VOB|VTS_01_4.VOB" -f mpeg -c copy output.mpeg

The methods using cat do NOT interpret the files and just add them together. 1 typical thing you will notice is a slight hickup when the player goes from 1 to the next VOB. Avidemux (GUI), for instance, will also demux(is that the correct word?) the files so it is a smoother experience.

you can us the cat (concatenate) command for this.

In your case:

cat VTS_01_1.vob VTS_01_2.vob VTS_01_3.vob VTS_01_4.vob > Output.vob

If you are interested in using FFmpeg (which opens up the possibility of concatenating other media types less tractable than .vob) you can use the following for your example:

ffmpeg -i "concat:VTS_01_1.vob|VTS_01_2.vob|VTS_01_3.vob|VTS_01_4.vob" -c copy output.vob

I confess that FFmpeg is a 'dedicated' program which you would prefer not to use but note that other media types may require transcoding before concatenation and in these cases FFmpeg's services will be required...


Category: command line Time: 2016-07-28 Views: 0

Related post

  • Ubuntu - Execute multiple php files via command line 2011-04-29

    How do I execute multiple php files via command line? --------------Solutions------------- Just call them one after each other: a.php; b.php; c.php Or if you don't want to type out all the names: ls *.php | xargs -tn1 php This being Unix, there are m

  • Print documents to PDF files via command line in Wine 2013-12-24

    I have a task to use Wine on Linux distributive for work with MS Office files doc[x] / xls[x] / ppt[x] and pdf via virtual printer. Output formats I need are png or jpg. This is for converter of documents and presentations. I can convert a ps file wh

  • Windows 2008 R2 Offline Files via command line 2011-03-10

    I would like to enabled Offline Files on my Windows 2008 computer so I can access a remote share even when it is gone. Is there a way I can configure this via command line, rather than going through the SyncCenter GUI? --------------Solutions--------

  • Find the properties of an mp3 file via command line 2015-04-20

    Is it possible, via command line (shell command), to check for properties of a file (like when I right click on a file via Nautilus). Specifically, given an mp3 audio file, I would like to know how I can extract the info related to title and artist f

  • How to open a password protected ODS file via command line / external script? 2015-08-05

    I created a password protected libreoffice's "calc" file (ods). Now I'd like to open it, or convert it to plaintext format, either via command line, or with an external script, e.g. python. What I tried so far: man libreoffice -- doesn't mention

  • How do I extract several still images from the video file using command line? 2010-04-27

    How can I convert a video file to a sequence of images, for example one frame every N seconds. Can mplayer or ffmpeg do this? I have used MPlayer to grab screenshots manually but I would like to automate this for a long video. --------------Solutions

  • how to create an audio clip from a video file using command line? 2011-07-15

    I would like to create an audio clip from a video file using the command line, since this is in a terminal text-only Ubuntu 11.04 server system. I would like to select the starting and finishing time for the clip from the video file, something like:

  • What do I need in order to extract and combine text files from multiple ZIP files, via command line? 2012-02-24

    I've got an interesting scripting challenge in front of me. I'm fairly certain there's a way to do it, but I feel like I'm probably lacking some particular tools and/or functional knowledge. There's some fifty-plus ZIP files that each contain, among

  • How to view the `.bash_history` file via command line? 2013-10-14

    I want to view the contents of my .bash_history file but don't know how to get there via the command line. --------------Solutions------------- If you want to access the actual file itself, just use your favorite text editor (I use emacs but you can

  • Merging .asc files = "The command line is too long" 2016-01-26

    Having problems merging LiDAR .asc folder files to produce a single GeoTiff file. I have followed various instructions e.g. the 2 methods of selecting input files for merging .asc files using folder -> select all and Choose input directory instead of

  • Easiest way to email file via command line in *nix? 2009-06-02

    What is the easiest - and preferably most portable - command I can use to email a single file as an attachment a *nix shell? --------------Solutions------------- Assuming it's a binary attachment: uuencode [filename] [filename] | mail -s [subject] [r

  • Access denied when trying to move a file via command line 2012-10-31

    Edited I need to move a subfolder to another subfolder. When I use this command: move e:\rootfolder\sourcefolder c:\rootfolder\destfolder I get Access is denied. Notice how the source drive is e: and the destination is c:. I believe the first answere

  • Windows: Get duration of video file from command line? 2013-05-20

    In Windows, is there a way to get the duration (e.g. in seconds) of an AVI file from the command line? I'm fine with using 3rd party tools - the more common, the better. Thanks! --------------Solutions------------- MediaInfo is a great tool for extra

  • Windows Server 2012: trying to copy files via command line, getting permission denied 2014-10-24

    This makes no sense to me. I'm logged in as Administrator, I run PowerShell as Administrator, and I even went to the Control Panel and moved the UAC slider thing all the way down. What the heck is going on here? I'm trying to copy major folders from

  • How to put an image and some text to .doc file via command-line? 2015-03-22

    I am trying to create a file.doc (Microsoft Word Document format) and write some text into it and also, insert an image into it via command shell. I have no idea what or how should I do it. Any suggestions? Thanks --------------Solutions-------------

  • How to remove groups from ntfs directories and files via command line ? (Win 2008r2) 2015-12-09

    I need to remove a group from an ntfs directory (win 2008 R2) via the command line. I've tried the windows "icacl" command and have removed the permissions, but the group/sid remains. Is there a way to use the command line to delete the group/si

  • Accurately cut video files from command line 2012-08-07

    I'm having trouble finding a cli application that can take a video file (avi, mkv, and mp4 preferably) and cut out very short clips (2-6 seconds) with precision time accuracy. I've tried ffmpeg, mencoder, avidemux, and mp4box but they all cut on keyf

  • how to exclude specific subfolder when creating zip file via command line linux 2015-08-31

    I do want to exclude subfolder like uploads/2015/OtherSubfolderName through command line. I have tried with below command, its working fine. zip -r public_html -x *uploads* but can we also use. zip -r public_html -x *uploads/2

  • How to add a prefix to every row of a particular column in a csv file via command line on linux 2014-06-15

    So basically i am trying to achieve the following. File before editing. column-1, column-2, column-3, column-4, column-5 Row-1-c1, Row-1-c2, Row-1-c3, Row-1-c4, Row-1-c5 Row-2-c1, Row-2-c2, Row-2-c3, Row-2-c4, Row-2-c5 Row-3-c1, Row-3-c2, Row-3-c3, R

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 1.453 (s). 13 q(s)