LoginSignup
34
29

More than 5 years have passed since last update.

MAC版のffmpegを使ってみた

Last updated at Posted at 2014-09-09

最近MACでffmpegを使う必要があって、
こんなバイナリがあったので、やってみたよ。

一応、パスが通っているところに配備すればOK。
あとは、普通にffmpegの使い方と同じっぽい。

2014/12/23 追記
上記ではなく、brewからインストールするときの、オプション指定

brew install --use-clang --HEAD ffmpeg --with-faac --with-fdk-aac --with-ffplay --with-fontconfig --with-freetype --with-frei0r --with-libass --with-libbluray --with-libcaca --with-libquvi --with-libsoxr --with-libvidstab --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-openssl --with-opus --with-rtmpdump --with-speex --with-theora --with-tools --with-x265 --enable-libx264 --enable-gpl --enable-libxvid --enable-shared

shコマンドで、特定のディレクトリのファイルを、一気に変換する。
ここでは、変換元のディレクトリに、mp4ディレクトリを作成して、そこに格納。

$ mkdir mp4
$ for x in *.mkv; do ffmpeg -y -i "$x" -acodec libfaac -vcodec libx264 "mp4/${x%%.*}.mp4"; done

字幕編集をする場合は、これが便利。
http://www.aegisub.org/

字幕付で変換する場合
assフィルターを利用する。

ffmpeg -i xxxx.mkv -filter:v "ass=xxxx.ass" -acodec libfaac -vcodec libx264 -ss 00:04:33 -t 00:05:00 xxxx.mp4

34
29
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
34
29