Permalink
Browse files

Add ffmpeg mac stuff

  • Loading branch information...
1 parent e53f326 commit d7d6619148630b6b765b253e14b442ec10befef4 @sole committed Jan 18, 2012
Showing with 36 additions and 0 deletions.
  1. +29 −0 video/get_ffmpeg_on_macosx.sh
  2. +7 −0 video/ios_mov_to_android_mp4.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+# Thanks to Martin Los for his guide: http://www.martinlos.com/?p=41
+
+URLS=("http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.3.tar.gz" "http://downloads.sourceforge.net/project/faac/faac-src/faac-1.28/faac-1.28.tar.gz" "http://downloads.sourceforge.net/project/faac/faad2-src/faad2-2.7/faad2-2.7.tar.gz")
+
+for i in "${URLS[@]}"
+do
+ echo $i
+ curl -O -L $i
+done
+
+for i in $( ls *.tar.gz ); do
+ tar -xzvf $i
+done
+
+for i in $( ls -d */); do
+ cd $i
+ ./configure
+ make
+ sudo make install
+ cd ..
+done
+
+svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
+cd ffmpeg
+./configure --enable-libmp3lame --enable-libfaac --enable-gpl --enable-nonfree --enable-shared --disable-mmx --arch=x86_64 --cpu=core2
+make
+sudo make install
@@ -0,0 +1,7 @@
+WIDTH="720"
+HEIGHT="480"
+BITRATE="1500k"
+for i in $(ls *.mov); do
+ ffmpeg -i $i -r 30 -vcodec mpeg4 -acodec libfaac -ac 1 -ar 44100 -vf scale=$WIDTH:$HEIGHT -b $BITRATE -y $i.mp4
+done
+for i in *.mov.mp4; do j=`echo $i | sed 's/.mov.mp4/.mp4/'`; mv "$i" "$j"; done

0 comments on commit d7d6619

Please sign in to comment.