杂记之流媒体(四)--ffmpeg使用

1.下载
https://www.ffmpeg.org/

2.编译

yum -y install yasm
./configure --prefix=../ffmepg-bin2 --disable-vaapi
make&&make install

3.顺序

$(DIR_LIB_FFMPEG_LIB)/libavformat.a \
$(DIR_LIB_FFMPEG_LIB)/libavdevice.a \
$(DIR_LIB_FFMPEG_LIB)/libavcodec.a \
$(DIR_LIB_FFMPEG_LIB)/libavutil.a \
$(DIR_LIB_FFMPEG_LIB)/libswresample.a \ 
$(DIR_LIB_FFMPEG_LIB)/libavfilter.a \
$(DIR_LIB_FFMPEG_LIB)/libpostproc.a \
$(DIR_LIB_FFMPEG_LIB)/libswscale.a \

3.命令

.\ffplay.exe  rtsp://192.168.111.230:5454/test
.\ffplay.exe "http://192.168.14.132:8088/live?port=1935&app=live&stream=video_1"

.\ffmpeg.exe -i test.avi test.flv

./ffmpeg -re -i ./weixin.mp4 -c copy -f flv rtmp://192.168.14.132:1935/hls/video_2
./ffmpeg -re -i ./weixin.mp4 -c copy -f flv rtmp://192.168.14.132:1935/live/video_1

./ffmpeg  -i rtsp://192.168.14.132:5454/weixin.mp4 -vcodec copy -acodec copy  -f flv   rtmp://192.168.14.132:1935/live/video_1
./ffserver -f ffserver.cfg 

ffserver.cfg
RTSPPort 5454
BindAddress 0.0.0.0
RTSPBindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 30000
CustomLog -
NoDaemon
#NoDefaults
 
<Stream test.mp4>
File "./test.mp4"
Format rtp
</Stream>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值