VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. 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:

    Code:
    FOR %I IN (*.avi) DO mkvmerge -o %I.mkv %I
    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.

    -hogfan
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    THe mkvmerge application must also be in that folder or add the full path to it like /blablablalb/blablabla/mkvmerge

    Or does mkvmerge run if you just type mkvmerge ?
    Quote Quote  
  3. 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
    Quote Quote  
  4. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    Code:
    ls *.avi | while read i; do mkvmerge -o "${i%avi}mkv" "${i}"; done
    This modification allows spaces in the filenames.

    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.
    Quote Quote  
  5. 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
    Quote Quote  
  6. Member
    Join Date
    Nov 2014
    Location
    Montevideo - Uruguay
    Search Comp PM
    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
    Quote Quote  



Similar Threads