其他分享
首页 > 其他分享> > ffmpeg 常用命令

ffmpeg 常用命令

作者:互联网

RTSP 转 m3u8
ffmpeg -i "rtsp://admin:XMRBI3967968@192.168.171.233:554/cam/realmonitor?channel=1&subtype=1" -fflags flush_packets -max_delay 2 -flags -global_header -hls_time 4 -hls_list_size 3000 -vcodec copy -y E:\IIS\RTMP\test.m3u8

RTSP 转 RTMP
ffmpeg -i "rtsp://admin:XMRBI3967968@192.168.171.233:554/cam/realmonitor?channel=1&subtype=1" -vcodec copy -acodec copy -f flv "rtmp://127.0.0.1:8086/"


RTSP 转 RTMP 成功
ffmpeg -i "rtsp://admin:XMRBI3967968@192.168.171.233:554/cam/realmonitor?channel=1&subtype=1" -vcodec copy -acodec aac -ar 44100 -strict -2 -ac 1 -f flv -s 1920x1080 -q 10 -f flv rtmp://127.0.0.1:1935/live/robot

RTSP 转 FLV

ffmpeg -rtsp_transport tcp -i "rtsp://admin:XMRBI3967968@192.168.171.233:554/cam/realmonitor?channel=1&subtype=1" -vcodec h264 -f flv -an rtmp://localhost:1935/myapp/room

RTSP 抓图
ffmpeg -rtsp_transport tcp -i "rtsp://admin:xmrbi123@192.168.175.232:554/h264/ch1/main/av_stream" -y -f mjpeg -t 0.001 -s 1280x720 D:/test.jpg


RTSP视频录制
ffmpeg -y -i rtsp://admin:xmrbi123@192.168.175.232:554/h264/ch1/main/av_stream -hls_time 10 -vcodec copy -acodec copy D:/m3u8/out.m3u8

剪切视频
ffmpeg -ss 5 -t 7 -i D:/out.avi -vcodec copy -acodec copy D:/out122.avi 
ffmpeg -i D:/out.avi -ss 5 -vcodec copy -acodec copy -to 7 D:/out122.avi 
ffmpeg -i D:/out.avi -ss 5 -vcodec copy -acodec copy D:/out123.avi 
RTSP播放
ffplay -i -x 1080 -y 720 rtsp://admin:xmrbi123@192.168.175.232:554/h264/ch1/main/av_stream
ffplay -i -x 1080 -y 720 D:/4.mp4
视频播放
ffplay -ss 10 -t 10 -i -x 1080 -y 520 D:/out.avi 
视频合并
ffmpeg -i concat:"D:/m3u8/out17.avi|D:/m3u8/out18.avi" -c copy D:/m3u8/out311.avi
视频信息
ffmpeg -i rtsp://admin:xmrbi123@192.168.175.232:554/h264/ch1/main/av_stream
视频分离成图片
ffmpeg -i D:/out123.avi -r 1 -f image2 D:/m3u8/%03d.jpeg
图片合成视频
ffmpeg -f image2 -i D:/m3u8/%03d.jpeg D:/m3u8/out.mp4

 

  

标签:ffmpeg,m3u8,rtsp,192.168,avi,常用命令,copy
来源: https://www.cnblogs.com/fyssl/p/15881803.html