parasurv@webspace ~ $

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.

Hosted on Neocities and created with Emacs, the world best text editor, operating system. 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. Some parts of the site is not up-to-date design wise. I may or may not update them in the future.