linux ffmpeg get frame image in video

Use ffmpeg to capture image frames from video in Linux (frame extraction)

Details are as follows:

ffmpeg -i test.mp4 -threads 20 -ss 00:00:00 -r 1 -f image2 ./image-%05d.jpeg

# ffmpeg 可通过apt直接安装
# -i 制定输入视频文件
# -threads 指定工作线程数,但是这个参数不一定会生效 (MJPEG CBR encoding works badly with frame multi-threading, consider using -threads 1, -thread_type slice or a constant quantizer)
# -ss 视频起始时间
# -r 指定每秒截取的帧数
# -f 指定图片格式,默认自动获取可不指定
# ./image-%05d.jpeg 指定输出文件到当前目录以5位数字序号命名

Guess you like

Origin blog.csdn.net/only_a_Heroic_car/article/details/131939790