1.安裝homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2.安裝FFmpeg
brew install ffmpeg
如果安裝失敱》纭(如下)余舶,需要卸載homebrew,然后重裝
卸載homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
重裝homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
安裝FFmpeg
brew install ffmpeg
3.利用FFmpeg 將錄制的aac音頻和h264視頻打包成mp4文件
ffmpeg -i /Users/teemo/Desktop/未命名文件夾5/AAC/TM_Video.h264 -i /Users/teemo/Desktop/未命名文件夾5/AAC/TM_Audio.aac -vcodec copy -f mp4 /Users/teemo/Desktop/未命名文件夾5/AAC/TM_Mp4.mp4