使用FFProbe获取视频fps
我是ffprobe的新手,我的目标是获得视频fps并存储到java程序中。我的代码存储xml文件,但我想直接存储像int fps = 30;
ffprobe -v quiet -print_format xml -show_format -show_streams "/video/small/small.avi" > "/video/small/test.xml"
这是我的代码。
我是ffprobe的新手,我的目标是获得视频fps并存储到java程序中。我的代码存储xml文件,但我想直接存储像int fps = 30;
ffprobe -v quiet -print_format xml -show_format -show_streams "/video/small/small.avi" > "/video/small/test.xml"
这是我的代码。
这将打印视频FPS:
ffprobe -v error -select_streams v -of default=noprint_wrappers=1:nokey=1 -show_entries stream=r_frame_rate file.mp4
您也可以简单地运行它,以获取视频FPS,这将在Linux机器上运行。
ffprobe -v quiet -show_streams -select_streams v:0 INPUT |grep "r_frame_rate"