Search This Blog

Friday, May 21, 2010

Install FFMPEG on Mac OSX - The Easy Way


If you've ever felt the learning curve for installing and using FFMPEG was too steep, my documentation will help you get it set up and running with minimal effort even if you've never used Terminal (OSX command line interface) before.

Before wanting to use FFMPEG I had never really used Terminal before, and largely I still don't. This document will get you through FFMPEG set up as painlessly as possible.

I even included commands to do certain tasks that I have had to do.

Thank You to all of the other FFMPEG users who have documented their commands and tips online. Without you I would still be scratching my head.

Enjoy!

GETTING STARTED:

First, we'll need to install Xcode.

To download Xcode, you'll have to register as a developer with Apple. It's free. Register here:

While logged into your Apple Developer account, DOWNLOAD Xcode here:

INSTALL Xcode.

We will use MacPorts http://www.macports.org/index.php to install necessary command line tools ffmpeg and MPlayer along with all of the components that each of these tools requires.

DOWNLOAD MacPorts here: http://www.macports.org/install.php

INSTALL MacPorts.

Now, we'll use MacPorts to download the command line tools we need.

To use MacPorts, open Terminal. You'll find it in Applications > Utilities

To DOWNLOAD AND INSTALL FFMPEG, inside Terminal type: 
sudo port install ffmpeg

You will have to enter your computer password.
It will take a while for port to install ffmpeg and all of it's components.

To INSTALL MPlayer, type: 
sudo port install mplayer

You will have to enter your network password.
It will take a while for port to install MPlayer and all of it's components.
Welcome to the wonderful world of open source video encoding!



TERMINAL COMMANDS:

For FFMPEG and MPlayer to see a file, YOU MUST FIRST USE TERMINAL TO CHANGE TO THE DIRECTORY WHERE THE FILE IS LOCATED. The terminal command to change directories is: cd

Here's an example change directories command: cd /Users/rmcmur000/Desktop/FLVMP4

*Note: if there are spaces in the name of a folder, etc. that you need to change directories to, use the backslash before the space.

Example: cd /Volumes/Video\ Team\ 1

In the above example, my external FW drive is called: Video Team 1

*Note: Pressing the up arrow will load your last command into the command line prompt. you still have to press enter to run it however...

DOCUMENTATION: (there is no apple osx official terminal documentation online that i know of, but there are many good resources online for it. here is one: http://oreilly.com/pub/ct/51



FFMPEG COMMANDS:

In all of these example commands, I will use an actual video file name in the command. Sub in your own video file name to carry out your own FFMPEG commands.

TRANSCODE FLV TO MP4 Profile Main, Level 3.0:
ffmpeg -i jersey_108_bonus_e_53679.flv -b 800k -acodec libfaac -ab 96k -vcodec libx264 -vpre hq -vpre main -level 30 -crf 24 -threads 0 jersey_108_bonus_e_53679.mp4

GET INFO ABOUT VIDEO FILE:
ffmpeg -i abc_lost_burningclip.flv

GENERATE 1 THUMBNAIL FROM VIDEO FILE FROM 10 SECOND MARK:
ffmpeg -i abc_lost_burningclip.flv -vframes 1 -s 320x240 -ss 10 abc_lost_burningclip.jpg

GENERATE 1 THUMBNAIL EVERY 10 SECONDS FROM VIDEO FILE:
ffmpeg -i abc_lost_burningclip.flv -r 1/10 -s 320x240 abc_lost_burningclip.jpg

RIP AUDIO FROM VIDEO FILE:
ffmpeg -i abc_lost_burningclip.flv -ab 96k abc_lost_burningclip.mp3

CROP 16X9 LETTERBOXED FLV TO NATIVE 16X9 MP4 Profile Main, Level 3.0
ffmpeg -i jersey_108_bonus_e_53679.flv  -b 800k -acodec libfaac -ab 96k -vcodec libx264 -vpre hq -vpre main -level 30 -crf 24 -threads 0 -croptop 74 -cropbottom 74 -sameq -aspect 16:9 -s 640x360 -y jersey_108_bonus_e_53679.mp4

FULL DOCUMENTATION:




MPLAYER COMMANDS:

PLAY VIDEO FILE:
mplayer abc_lost_burningclip.flv

FULL DOCUMENTATION:

2 comments:

swamptech said...

Nice!
Im going to try this for sure.

Anonymous said...

Types of Baccarat in Ireland - Worrione
Types of Baccarat in Ireland – Baccarat in Ireland. Betting Options · Payout Limits · Payout Limits · Free Spins · 제왕 카지노 Deposit 바카라 Limits · 1xbet Banking Options