csdn打开太慢了,所以从csdn复制过来的,转载,上方是原文链接。
安装librtmp包需要依赖环境较多。
安装gcc和依赖包
yum install gcc* python-devel libffi-dev* -y
安装librtmp
从git上下载源码:
git clone git://git.ffmpeg.org/rtmpdump
cd rtmpdump/librtmp
make && make install
安装 setuptools
wget -S https://pypi.python.org/packages/f7/83/2865ee5727b46234c68efb833363dbce1922a191dd46e246853246a46182/setuptools-24.0.2.zip#md5=b7e888eb6867d94ecaf1af7a26a56c72
unzip setuptools-24.0.2.zip
cd setuptools-24.0.2
python setup.py install
安装cffi
wget -S https://pypi.python.org/packages/83/3c/00b553fd05ae32f27b3637f705c413c4ce71290aa9b4c4764df694e906d9/cffi-1.7.0.tar.gz#md5=34122a545060cee58bab88feab57006d
tar -zxvf cffi-1.7.0.tar.gz
cd cffi-1.7.0
python setup.py install
安装librtmp
wget -S https://pypi.python.org/packages/48/a6/33b1a5864e22de3e59dd29fcbc2602462511c04a31057b16baec639d7d4f/python-librtmp-0.3.0.tar.gz#md5=f7afe8d463214072281998fa84553927
tar -zxvf python-librtmp-0.3.0.tar.gz
cd python-librtmp-0.3.0
python setup.py install
bingo。
有问题欢迎评论,会及时回复