I am trying to use this from terminal on Snow Leopard with no success. I have MKVTooknix with the MacGUI installed. I need to remux and entire folder of .avi files into .mkv container. I found this:
I open terminal and change to the directory where all of my source files are located, but when I try to execute the above code from terminal, I get a message that "mkvmerge - command not found". I am sure I am probably doing something wrong. What do I need to do to get this to work from terminal? Thanks for any help.Code:FOR %I IN (*.avi) DO mkvmerge -o %I.mkv %I
-hogfan
+ Reply to Thread
Results 1 to 6 of 6
-
-
This the biggest pain ever! Still won't work. I don't know the path to mkvmerge on OSX. I have MKVToolnix in Applications. I right clicked on it and did show package contents. Then I copied the mkvmerge file to the directory where my files to convert are. Then I tried to run the code above from within that directory in terminal. I'm about to just give up and try to do this on Windows as i don't have a linux machine to do this on. I don't understand why this is so difficult on OSX to do the batch conversion when OSX has BSD roots.
-hogfan -
Code:
ls *.avi | while read i; do mkvmerge -o "${i%avi}mkv" "${i}"; done
You can have Terminal fill in the path to the mkvmerge binary, using drag-and-drop. First copy-paste ls *.avi | while read i; do (including a space at the end) in the shell window, then drag-and drop the binary, then copy-paste -o "${i%avi}mkv" "${i}"; done, followed by <enter>.
(The README file included with Mkvtoolnix-4.4.0_2010-11-02-6315.dmg has instructions how to make the binaries known commands, so you don't have to use the full path, making it even easier.)Last edited by Case; 10th Dec 2010 at 06:21.
-
Thanks, I'll give that a try tonight. I got it working last night on Windows but I'd prefer to do this type of work on the Mac as that is where all the files I'm working on reside. MKVToolnix documentation is kind of confusing and lacking in some ways (and I've compiled Handbrake from source on OSX). I'll take a look at it again. Known commands would be very useful. Thanks again for the help
-hogfan -
This is the easiest way to convert video formats using MacOSX command line (any version). First download this compressed file and unpack it to your Movies Folder:
https://drive.google.com/file/d/0B3NlLwMD4yd9QU0yVGJyU1NiUDA/view?usp=sharing
You will then have a MMedia_Converter directory with two apps: MMedia_Convert and Android_Converter. Those are my own developed MacOSX open source applications, bassed on FFMpeg Group and HandBrake Group France previous work. Both are fully compliant Mac compilled applications and you´ll have have to do nothing but extract them to your Movies Folder.
You also have there, 3 folders: clip_in, clip_out and scripts.
You must put the videos you want to be converted in the clip_in folder.
The converted output videos, will be generated automatically in the clip_out folder.
In addition you have 2 bash scripts, that you must move to your Mac OSX Desktop.
Once these bash are on desktop, edit them with TextEdit, and change my user name by your Mac name.
In my case, I use one script to generate thumbnails and the other to generate thumbnails too, and to automatically convert videos from any formar to wathever I choose.
"Whatever" means, that if you want to convert mpeg to mkv, you will have to declare it in line: DEST_EXT=mkv (or wathever known video format you want).
Hope this will help you all.
Best Regards, Tomás Hernández
Similar Threads
-
Batch method to convert subtitles embedded in mkv's
By invinciblegod in forum SubtitleReplies: 4Last Post: 9th Aug 2012, 01:11 -
Best way to batch convert xvid/avi files to mkv/x264 files?
By gaikokujinkyofusho in forum Video ConversionReplies: 1Last Post: 13th Jan 2012, 06:31 -
Batch convert mkv to avi possible?
By dude112 in forum Video ConversionReplies: 5Last Post: 6th Jul 2010, 02:56 -
batch convert mkv to avi
By projecttemp in forum Video ConversionReplies: 7Last Post: 14th May 2008, 06:19 -
Batch Convert AVI/OGM/MKV to DVD (anime)
By aktee in forum User guidesReplies: 480Last Post: 4th Nov 2007, 18:18