Merge VOB 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 GUI program. Is there an equivalent in Ubuntu?
command-line video
add a comment |
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 GUI program. Is there an equivalent in Ubuntu?
command-line video
add a comment |
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 GUI program. Is there an equivalent in Ubuntu?
command-line video
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 GUI program. Is there an equivalent in Ubuntu?
command-line video
command-line video
edited Mar 12 at 19:55
llogan
5,2001737
5,2001737
asked Jul 28 '16 at 20:12
Joel DeWittJoel DeWitt
195311
195311
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
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.
If you receive the error message
ac3 in MPEG-1 system streams is not widely supported, consider using the vob or the dvd muxer to force a MPEG-2 program stream
then you will need to specify DVD as the output format by adjusting the above ffmpeg command with ... -f dvd ...
.
Interesting. I can see that the end result will be identical to what the OP claims works with Windows but would the result be playable? I'll admit I don't work much with VOB files preferring MKV format (viaffmpeg
) and tools likemkvmerge
for merging
– Elder Geek
Jul 28 '16 at 20:50
cat works for merging the files. It does not care about chapters and the other stuff if it is a DVD ;)
– Rinzwind
Jul 28 '16 at 20:55
Curious whycat
instead ofdd if=
? Is that something you could add to the description if you don't think it'd be too distracting?
– earthmeLon
Sep 14 '18 at 20:51
add a comment |
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...
References:
- FFmpeg trac: Concatenating media files
Thanks for the great answer. I use FFmpeg quite a bit ... I've edited the question to include the word 'GUI', which was what I was thinking of as an alternative.
– Joel DeWitt
Jul 29 '16 at 19:33
add a comment |
you can use 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
add a comment |
VOB
VOB requires special care due their potentially complex structure and timestamp incongruities, so blindly concatenating these may have unexpected results. You should use DVD structure aware tools for this format.
The FFmpeg source code comes with a tool (tools/dvd2concat
) that utilizes lsdvd
to produce a proper concatenation script:
cd ffmpeg/tools
./dvd2concat path/to/dvd/structure > file.concat
ffmpeg -safe 0 -protocol_whitelist subfile,file,concat -f concat -i file.concat -map 0 -c copy -f dvd output.vob
Other file types
ffmpeg
has three methods to concatenate:
concat demuxer - For general concatenation or for doing so without re-encoding.
concat protocol - Similar to just usingcat
. For formats that can be simply joined with no issues (MPEG-1, MPEG-2 PS, DV, rawvideo).
concat filter - Useful if you are performing any filtering (scaling, overlays, etc).
Also see FFmpeg Wiki: Concatenate and FFmpeg FAQ: How can I concatenate video files?
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f804178%2fmerge-vob-files-via-command-line%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
If you receive the error message
ac3 in MPEG-1 system streams is not widely supported, consider using the vob or the dvd muxer to force a MPEG-2 program stream
then you will need to specify DVD as the output format by adjusting the above ffmpeg command with ... -f dvd ...
.
Interesting. I can see that the end result will be identical to what the OP claims works with Windows but would the result be playable? I'll admit I don't work much with VOB files preferring MKV format (viaffmpeg
) and tools likemkvmerge
for merging
– Elder Geek
Jul 28 '16 at 20:50
cat works for merging the files. It does not care about chapters and the other stuff if it is a DVD ;)
– Rinzwind
Jul 28 '16 at 20:55
Curious whycat
instead ofdd if=
? Is that something you could add to the description if you don't think it'd be too distracting?
– earthmeLon
Sep 14 '18 at 20:51
add a comment |
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.
If you receive the error message
ac3 in MPEG-1 system streams is not widely supported, consider using the vob or the dvd muxer to force a MPEG-2 program stream
then you will need to specify DVD as the output format by adjusting the above ffmpeg command with ... -f dvd ...
.
Interesting. I can see that the end result will be identical to what the OP claims works with Windows but would the result be playable? I'll admit I don't work much with VOB files preferring MKV format (viaffmpeg
) and tools likemkvmerge
for merging
– Elder Geek
Jul 28 '16 at 20:50
cat works for merging the files. It does not care about chapters and the other stuff if it is a DVD ;)
– Rinzwind
Jul 28 '16 at 20:55
Curious whycat
instead ofdd if=
? Is that something you could add to the description if you don't think it'd be too distracting?
– earthmeLon
Sep 14 '18 at 20:51
add a comment |
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.
If you receive the error message
ac3 in MPEG-1 system streams is not widely supported, consider using the vob or the dvd muxer to force a MPEG-2 program stream
then you will need to specify DVD as the output format by adjusting the above ffmpeg command with ... -f dvd ...
.
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.
If you receive the error message
ac3 in MPEG-1 system streams is not widely supported, consider using the vob or the dvd muxer to force a MPEG-2 program stream
then you will need to specify DVD as the output format by adjusting the above ffmpeg command with ... -f dvd ...
.
edited Feb 1 '17 at 23:02
Joel DeWitt
195311
195311
answered Jul 28 '16 at 20:18
RinzwindRinzwind
208k28400532
208k28400532
Interesting. I can see that the end result will be identical to what the OP claims works with Windows but would the result be playable? I'll admit I don't work much with VOB files preferring MKV format (viaffmpeg
) and tools likemkvmerge
for merging
– Elder Geek
Jul 28 '16 at 20:50
cat works for merging the files. It does not care about chapters and the other stuff if it is a DVD ;)
– Rinzwind
Jul 28 '16 at 20:55
Curious whycat
instead ofdd if=
? Is that something you could add to the description if you don't think it'd be too distracting?
– earthmeLon
Sep 14 '18 at 20:51
add a comment |
Interesting. I can see that the end result will be identical to what the OP claims works with Windows but would the result be playable? I'll admit I don't work much with VOB files preferring MKV format (viaffmpeg
) and tools likemkvmerge
for merging
– Elder Geek
Jul 28 '16 at 20:50
cat works for merging the files. It does not care about chapters and the other stuff if it is a DVD ;)
– Rinzwind
Jul 28 '16 at 20:55
Curious whycat
instead ofdd if=
? Is that something you could add to the description if you don't think it'd be too distracting?
– earthmeLon
Sep 14 '18 at 20:51
Interesting. I can see that the end result will be identical to what the OP claims works with Windows but would the result be playable? I'll admit I don't work much with VOB files preferring MKV format (via
ffmpeg
) and tools like mkvmerge
for merging– Elder Geek
Jul 28 '16 at 20:50
Interesting. I can see that the end result will be identical to what the OP claims works with Windows but would the result be playable? I'll admit I don't work much with VOB files preferring MKV format (via
ffmpeg
) and tools like mkvmerge
for merging– Elder Geek
Jul 28 '16 at 20:50
cat works for merging the files. It does not care about chapters and the other stuff if it is a DVD ;)
– Rinzwind
Jul 28 '16 at 20:55
cat works for merging the files. It does not care about chapters and the other stuff if it is a DVD ;)
– Rinzwind
Jul 28 '16 at 20:55
Curious why
cat
instead of dd if=
? Is that something you could add to the description if you don't think it'd be too distracting?– earthmeLon
Sep 14 '18 at 20:51
Curious why
cat
instead of dd if=
? Is that something you could add to the description if you don't think it'd be too distracting?– earthmeLon
Sep 14 '18 at 20:51
add a comment |
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...
References:
- FFmpeg trac: Concatenating media files
Thanks for the great answer. I use FFmpeg quite a bit ... I've edited the question to include the word 'GUI', which was what I was thinking of as an alternative.
– Joel DeWitt
Jul 29 '16 at 19:33
add a comment |
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...
References:
- FFmpeg trac: Concatenating media files
Thanks for the great answer. I use FFmpeg quite a bit ... I've edited the question to include the word 'GUI', which was what I was thinking of as an alternative.
– Joel DeWitt
Jul 29 '16 at 19:33
add a comment |
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...
References:
- FFmpeg trac: Concatenating media files
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...
References:
- FFmpeg trac: Concatenating media files
edited Jul 28 '16 at 22:26
answered Jul 28 '16 at 21:08
andrew.46andrew.46
22.2k1469150
22.2k1469150
Thanks for the great answer. I use FFmpeg quite a bit ... I've edited the question to include the word 'GUI', which was what I was thinking of as an alternative.
– Joel DeWitt
Jul 29 '16 at 19:33
add a comment |
Thanks for the great answer. I use FFmpeg quite a bit ... I've edited the question to include the word 'GUI', which was what I was thinking of as an alternative.
– Joel DeWitt
Jul 29 '16 at 19:33
Thanks for the great answer. I use FFmpeg quite a bit ... I've edited the question to include the word 'GUI', which was what I was thinking of as an alternative.
– Joel DeWitt
Jul 29 '16 at 19:33
Thanks for the great answer. I use FFmpeg quite a bit ... I've edited the question to include the word 'GUI', which was what I was thinking of as an alternative.
– Joel DeWitt
Jul 29 '16 at 19:33
add a comment |
you can use 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
add a comment |
you can use 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
add a comment |
you can use 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
you can use 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
edited Sep 14 '18 at 20:21
answered Jul 28 '16 at 20:22
Adam HarrisonAdam Harrison
20115
20115
add a comment |
add a comment |
VOB
VOB requires special care due their potentially complex structure and timestamp incongruities, so blindly concatenating these may have unexpected results. You should use DVD structure aware tools for this format.
The FFmpeg source code comes with a tool (tools/dvd2concat
) that utilizes lsdvd
to produce a proper concatenation script:
cd ffmpeg/tools
./dvd2concat path/to/dvd/structure > file.concat
ffmpeg -safe 0 -protocol_whitelist subfile,file,concat -f concat -i file.concat -map 0 -c copy -f dvd output.vob
Other file types
ffmpeg
has three methods to concatenate:
concat demuxer - For general concatenation or for doing so without re-encoding.
concat protocol - Similar to just usingcat
. For formats that can be simply joined with no issues (MPEG-1, MPEG-2 PS, DV, rawvideo).
concat filter - Useful if you are performing any filtering (scaling, overlays, etc).
Also see FFmpeg Wiki: Concatenate and FFmpeg FAQ: How can I concatenate video files?
add a comment |
VOB
VOB requires special care due their potentially complex structure and timestamp incongruities, so blindly concatenating these may have unexpected results. You should use DVD structure aware tools for this format.
The FFmpeg source code comes with a tool (tools/dvd2concat
) that utilizes lsdvd
to produce a proper concatenation script:
cd ffmpeg/tools
./dvd2concat path/to/dvd/structure > file.concat
ffmpeg -safe 0 -protocol_whitelist subfile,file,concat -f concat -i file.concat -map 0 -c copy -f dvd output.vob
Other file types
ffmpeg
has three methods to concatenate:
concat demuxer - For general concatenation or for doing so without re-encoding.
concat protocol - Similar to just usingcat
. For formats that can be simply joined with no issues (MPEG-1, MPEG-2 PS, DV, rawvideo).
concat filter - Useful if you are performing any filtering (scaling, overlays, etc).
Also see FFmpeg Wiki: Concatenate and FFmpeg FAQ: How can I concatenate video files?
add a comment |
VOB
VOB requires special care due their potentially complex structure and timestamp incongruities, so blindly concatenating these may have unexpected results. You should use DVD structure aware tools for this format.
The FFmpeg source code comes with a tool (tools/dvd2concat
) that utilizes lsdvd
to produce a proper concatenation script:
cd ffmpeg/tools
./dvd2concat path/to/dvd/structure > file.concat
ffmpeg -safe 0 -protocol_whitelist subfile,file,concat -f concat -i file.concat -map 0 -c copy -f dvd output.vob
Other file types
ffmpeg
has three methods to concatenate:
concat demuxer - For general concatenation or for doing so without re-encoding.
concat protocol - Similar to just usingcat
. For formats that can be simply joined with no issues (MPEG-1, MPEG-2 PS, DV, rawvideo).
concat filter - Useful if you are performing any filtering (scaling, overlays, etc).
Also see FFmpeg Wiki: Concatenate and FFmpeg FAQ: How can I concatenate video files?
VOB
VOB requires special care due their potentially complex structure and timestamp incongruities, so blindly concatenating these may have unexpected results. You should use DVD structure aware tools for this format.
The FFmpeg source code comes with a tool (tools/dvd2concat
) that utilizes lsdvd
to produce a proper concatenation script:
cd ffmpeg/tools
./dvd2concat path/to/dvd/structure > file.concat
ffmpeg -safe 0 -protocol_whitelist subfile,file,concat -f concat -i file.concat -map 0 -c copy -f dvd output.vob
Other file types
ffmpeg
has three methods to concatenate:
concat demuxer - For general concatenation or for doing so without re-encoding.
concat protocol - Similar to just usingcat
. For formats that can be simply joined with no issues (MPEG-1, MPEG-2 PS, DV, rawvideo).
concat filter - Useful if you are performing any filtering (scaling, overlays, etc).
Also see FFmpeg Wiki: Concatenate and FFmpeg FAQ: How can I concatenate video files?
answered Feb 2 '17 at 23:45
lloganllogan
5,2001737
5,2001737
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f804178%2fmerge-vob-files-via-command-line%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown