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