get video fps using FFProbe

RDY picture RDY · Jan 6, 2015 · Viewed 14k times · Source

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"

this is my code.

Answer

o_ren picture o_ren · Feb 15, 2016

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