从MP4 / FLV提取帧? [英] Extracting frames from MP4/FLV?

查看:247
本文介绍了从MP4 / FLV提取帧?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这是可能的FFMPEG,但如果我有一个部分文件(如没有开始和结束),该怎么办?是否可以从中提取一些框架?

解决方案

命令

  ffmpeg -ss 00:00:25 -t 00:00:00.04 -i YOURMOVIE.MP4 -r 25.0 YOURIMAGE%4d.jpg 

将提取帧




  • 从第二个25开始[-ss 00:00:25]

  • 在0.04秒后停止[-t 00:00:00.04]

  • 从输入文件YOURMOVIE.MP4读取

  • 每秒只使用25.0帧,即一帧每1/25秒[-r 25.0]

  • 作为JPEG图像,名称为YOURIMAGE%04d.jpg,其中%4d是带有前导零的4位数自动增量编号,在应用选项[-r]之前,请检查电影中的帧速率,同样适用于[-t],除非您要提取帧使用自定义率。



    从未尝试过这个裁剪(损坏的)输入文件。
    值得一试。


    I know it's possible with FFMPEG, but what to do if I have a partial file (like without the beginning and the end). Is is possible to extract some frames from it?

    解决方案

    The command

    ffmpeg -ss 00:00:25 -t 00:00:00.04 -i YOURMOVIE.MP4 -r 25.0 YOURIMAGE%4d.jpg
    

    will extract frames

    • beginning at second 25 [-ss 00:00:25]
    • stopping after 0.04 second [-t 00:00:00.04]
    • reading from input file YOURMOVIE.MP4
    • using only 25.0 frames per second, i. e. one frame every 1/25 seconds [-r 25.0]
    • as JPEG images with the names YOURIMAGE%04d.jpg, where %4d is a 4-digit autoincrement number with leading zeros

    Check you movie for the framerate before applying option [-r], same applicable for [-t], unless you want to extract the frames with the custom rate.

    Never tried this with the cropped (corrupted?) input file though. Worth to try.

    这篇关于从MP4 / FLV提取帧?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆