Get the Width and Height Dimensions of a Video with ffprobe
April 2026
This is the command I use to get the size dimensions of a video with ffprobe (which comes with ffmpeg).
This is the output from my sample video which is 1920 pixels wide by 1080 high.
1920,1080Details
-
-v errorsets the logging verbosity toerrorlevel which prevents the standard progress output. -
-show_entries stream=width,heightfilters the output to show only the width and height. -
-of csv=p=0sets the output format to CSV without headers. -
input.mp4is the name of the input file. -
>sends the output to a file. -
output.txtis the file that gets the output.
Notes
-
You can select a specific stream by adding this if the video has more than one in it:
-select_streams v:0 -
You can output to JSON by changing the
-ofvalue to:-of json