VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    Hi, I have a number of videos (.mpg) that I want to extract audio the from and save as mp3's. Is there a way I can automate this process, rather than dragging videos over to ffmpegx one at a time, waiting for the conversion to finish, then dragging the next one over? Applescript? Shell script? I'm on a mac.

    Thanks!
    Quote Quote  
  2. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    Anybody out there?
    Quote Quote  
  3. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Moving you to our mac section.

    Nope. I have no idea.
    Quote Quote  
  4. You should be able to batch (extract & convert the audio to mp3) with mpegstreamclip
    Quote Quote  
  5. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    Give Quick Batcher a try.
    Quote Quote  
  6. Member ozok's Avatar
    Join Date
    Oct 2011
    Location
    Turkey
    Search Comp PM
    you can always use python. it shouldn't be too difficult.
    Quote Quote  
  7. Member
    Join Date
    Feb 2010
    Location
    europe
    Search Comp PM
    https://www.sugarsync.com/pf/D8880294_66921278_924564
    this is an old copy of ffmpeg compiled with mp3 support
    runs fine on snow leopard but NOT tested it in lion or above.

    download it and put it in /usr/local/bin or /bin
    somewhere where the terminal can use it basically
    get to those places by pressing command shift and g at the same time then typing the above

    then this script will do what you want

    copy and paste from below here

    #! /bin/sh
    echo drag your source folder in here
    read sourcefolder
    echo drag your destination folder in here
    read destfolder
    cd "$sourcefolder"
    for i in *.mpg
    do
    name=`basename "$i"|rev|cut -c 5-|rev`
    cat /dev/null|ffmp3 -i "$i" -vn -acodec mp3 -ab 128k "$destfolder"/"$name".mp3
    done

    for i in *.MPG
    do
    name=`basename "$i"|rev|cut -c 5-|rev`
    cat /dev/null|ffmp3 -i "$i" -vn -acodec mp3 -ab 128k "$destfolder"/"$name".mp3
    done

    ########
    finish copying with the line above

    copy all that into a text only file and save it as mpg2mp3.command on your desktop
    then in the terminal type
    chmod +x
    then a space
    then drag your .command file in to the terminal window

    that makes it double clickable! hurrah!

    when you run it, it will ask for a source folder, a destination folder and ffmpeg will spit out 128k stereo mp3 files of all the .mpg or .MPG files in your source folder

    some messing about, but hopefully enough help so that you can modify it for other needs....
    a bit of teaching to fish going on here.
    all my very best
    jamie
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!