使用 FFProbe 获取视频 fps [英] get video fps using FFProbe

查看:32
本文介绍了使用 FFProbe 获取视频 fps的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 ffprobe 的新手,我的目标是获取视频 fps 并存储到 Java 程序中.我的代码存储 xml 文件,但我想直接存储像 int fps=30;

I am new in ffprobe my aim is get video fps and store into java program. my code store xml files but i want store directly like int fps=30;

ffprobe -v quiet -print_format xml -show_format -show_streams "/video/small/small.avi" > "/video/small/test.xml"

这是我的代码.

推荐答案

这将打印视频 FPS:

This will print the video FPS:

ffprobe -v error -select_streams v -of default=noprint_wrappers=1:nokey=1 -show_entries stream=r_frame_rate file.mp4

这篇关于使用 FFProbe 获取视频 fps的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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