parasurv's webspace@writer13 ~ $

How to get video resolution from a video in terminal?

I like to use simple stuff, like the ranger file manager. However I can't see some basic information about files, like a video's resolution. Most graphical file manager also didn't show, at least Thunar or PCManFm didn't. So I searched for a solution and found the simple line in terminal:

$ ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=s=x:p=0 videofile.mp4

For that to work, we need ffmpeg installed. We can also create an alias for it. The output is just one line, with the size, nothing more.

This website doesn't track you. I don't use any javascript or other scripts. I don't store any information about the visitors. It's just pure old fashioned HTML and some CSS. Hosted on Neocities and created with Emacs.