最近工程工程中要用到监控,从摄像头获取监控信息服务器转发rtsp流,就是用了ffmpeg开源项目.
这里推荐两个播放器:https://github.com/SutanKasturi/RTSPPlayer rtsp播放器
https://github.com/kolyvan/kxmovie kxmovie播放器
rtsp播放器是已经编译好的,直接可以播放rtsp地址的视频.
kxmovie播放器都需要编译出FFmpeg-iOS静态文件,在github上面有一键编译的脚本,地址如下:https://github.com/kewlbear/FFmpeg-iOS-build-script
一:下载上面编译脚本
终端进入刚刚下载后的脚本文件夹下,运行sh:build-ffmpeg.sh 自动编译,有缺少yasm的按照提示操作,安装yasm
编译的是ffmpeg最新版本,Xcode7.2 。
按照脚本编译完后的静态库目录如下: