4 September 2007 @ 17:45Make an mp3 out of your video
Have you ever wanted to make mp3’s out of your videos (e.g. music videos) so you can load the audio onto your iPod or listen to it in your favorite music player?
This simple Applescript droplet will do just that. Drop your video onto the Video to mp3.app icon, type in the desired bitrate, and it will immediately start converting the first audio track to a mp3. Give it a try. It works with many different video formats including VOB.
Video to mp3.app (video_to_mp3.zip)
Here is the Applescript source:
property bitrate : "160"
on open these_files
repeat with this_file in these_files
set ffmpeg_binary to ((path to me) as string)
set ffmpeg_binary to (ffmpeg_binary & "Contents:Resources:ffmpeg")
set ffmpeg_binary to (POSIX path of ffmpeg_binary)
set theuser to (do shell script "echo $USER")
set ginfo to (get info for this_file)
set disp_name to text 1 thru -((length of name extension of ginfo) + 2) of name of ginfo
set disp_name2 to name of ginfo
set POSIX_file to POSIX path of this_file
display dialog "Set the bitrate in kbit/s" default answer bitrate
set the bitrate to text returned of result
with timeout of 30000 seconds
tell application "Terminal"
--do shell script "\"" & ffmpeg_binary & "\" -y -i \"" & POSIX_file & "\""
do script ("\"" & ffmpeg_binary & "\" -y -i \"" & POSIX_file & "\" -vn -acodec mp3 -ab " & bitrate & " -ac 2 -ar 44100 \"" & POSIX_file & ".mp3\"")
end tell
end timeout
end repeat
end open
Note: the above example code requires ffmpeg binary if you are going to compile your own Applescript.

























For those (few) of us that aren’t tech savvy enough to work with Applescript . . . a very big thank you for this amazing droplet!!!
You’re welcome, Ted.
This is really a good solution! I tried different other programs but if the .FLV contains only music and no video it doesn’t work. But yours works! Thanks!
Glad it could help, gerard.