A while ago I was looking for a way to merge two separate
.mkv files (left
and right views of a stereoscopic, 3D movie) into one file, to get a
side-by-side or top-bottom view. Since back then
I didn’t get any
answer on SuperUser
, I figured I might just look into it myself, google it, read a
few man pages, and then write it down for the rest of the world.
I’m not encouraging anyone to download pirated films. But, if you do have the movies, and they are in separate files, but you want to watch them on a 3DTV or a PS3 that can only play side-by-side, single-file 3D movies, you’ll end up merging your files.
If you just want to know how to merge these files using the GUI, I’m not going to write it down here, as there exists a very detailed tutorial about this over at Ameic.net. Go read that if you want to do this using the GUI.
If you’d rather do it in the command line though (which would allow you to
create a batch to process all your movies later,
nice the process while
you’re working on the computer, and ler it rock while you’re away), read on.
Here’s what you’re going to need:
Note that if you build it yourself, there’s also an
--enable-qt option, but
for some reason a
qt use flag does not exist in the ebuild. Also, I don’t
ffmpeg here as I already have that on my system.
Next thing you’ll need to do is extract the audio you want. Use
eac3to to do
As Marcin mentioned, you can extract the autio simply using
Next thing you’re going to do is extract the video streams of both left and
right files, and convert them to side-by-side view. To do so, you’ll need to
.avs file that looks like this:
Name this file
convert.avs, then process it with
ffmpeg like this:
Now merge the audio and the video:
result.mkv file can now be played on a 3DTV or a PS3. You can
now remove the temporary files: