I’m a huge fan of ffmpeg, as you know from my previous posts about it. Before this day, i always used one of my linux boxes or virtual machines to use ffmpeg. Not anymore! I found a way to get ffmpeg on your mac very easily.

1. Download the FFMPEGX package from here.

2. Mount the disk image (.dmg file).

3. Right Click The FFMPEGX app in the dmg file, and click ‘Show Contents’.

4. Navigate to 'Contents' > 'Resources'.

5. Copy the ‘ffmpeg’ program, paste it into your Applications folder.

6. Boom! Ready to go! Try typing /Applications/ffmpeg in your terminal. For other commands, check my previous posts about ffmpeg.

Attention: the ‘libmp3lame‘ encoder does not exist in this particular OSX build, use ‘mp3‘ instead.

PS: on iFFmpeg’s site, they link to some other websites where you can get more recent builds of FFmpeg. This is highly suggested, because the package bundeled with ffmpegx is old and doesn’t have WAV, H264 and a hole lot of other codecs, but the newer packages have.
PPS: iffmpeg’s site seems to be down once every so often, so i’ll put the link here: ffmpeg binaries

That’s it 🙂 Happy Encoding!
Regards,
Toon

Advertisements

Not so long ago, i updated one of my previous posts on ffmpeg with a line on how to record your favourite internet stream to disk with ffmpeg.

Actually that line doesn’t really work well if you want to record a show that’s on the radio every week, on a given day and a given time. People familiar with cron, the unix schedule program, will know you can just give it some coordinates, and it will run your comments at certain intervals. So i tried feeding that particular command to cron, but cron always failed to record my show, because ffmpeg generates way too much output. I found a workaround for that too, by redirecting all output to /dev/null.

How to do it?
(for Mac OSX or any GNU/Linux distro with cron and ffmpeg installed)
1. Determine the ffmpeg command you wish to schedule. Maybe my other posts about ffmpeg can help you.
e.g.: ffmpeg -i http://mp3.streampower.be/stubru-high.mp3 -f mp3 -acodec libmp3lame -ab 128k -ar 44100 -t 02:00:00 /home/toon/Desktop/stubru.mp3

2. Open a terminal window and type this to open your crontab file in a easy editor:
EDITOR=nano crontab -e

3. Determine the 5 crontab schedule numbers to tell cron when to execute your command (1: minute, 2: hour, 3: day of the month, 4: month, 5: day of the week with 0 for sunday). You can use wildcards (*) if you want any digit to be okay, lists (,), or ranges (-). For more info, check this reference.
I want to record every sunday at 19:00h, so for me it’s
0 19 * * 0

4. Insert those in the editor, then insert your command (devide everything with spaces).
When that is done, we still need to add the magical string to make crontab and ffmpeg work together. So type another space, and add this to the end of the crontab line: > /dev/null 2>&1. For me the result looks like this:
0 19 * * 0 ffmpeg -i http://mp3.streampower.be/stubru-high.mp3 -f mp3 -acodec libmp3lame -ab 128k -ar 44100 -t 02:00:00 /home/toon/Desktop/stubru.mp3 > /dev/null 2>&1

5. Press Ctrl+O and Ctrl+X to save and quit the Nano editor.

6. Enjoy Your Scheduled Recordings! 🙂