FFmpeg最常用命令参数做格式转换和截图?

 ffmpeg命令格式转换

ffmpeg -i test.h264 -vcodec copy -f mpegts test.ts              # 将h264格式转为ts格式

ffmpeg -i test.h264 -vcodec copy -f mp4 test.mp4              # 将h264格式转为MP4格式

视频拼接: 

ffmpeg -i "concat:test1.h264|test2.h264" -vcodec copy -f h264 out12.h264

# 将test1.h264和test2.h264视频拼接起来,输出out12.h264视频

视频截图:

ffmpeg -i test.mp4  -t 0.001 -s 352x240 1.jpg    # 在test.mp4中截图

ffmpeg -i test.mp4 -vframes 30 -y -f gif 1.gif       # 将test.py前30帧做成gif动图

ffmpeg -i test.mp4 -t 10 -r 1 pic-%03d.jpg           # 从视频前10s中取图像,1s提取一帧

 

 我的热门文章推荐

猜你喜欢

转载自blog.csdn.net/suny2020/article/details/143174030