parasurv@webspace ~ $

Blog: [Site updates] [Linux] [Free Software] [Culture] [Health] [Watches] Learning: [Emacs Journal] [Linux Wiki] Personal: [Contact] [About me]

Shorts: [Microblog] [Linkblog] Important: [Read] [Watch] [Listen] Other pages: [Old games stuff]

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. I don't really support mobile stuff, but I bet if you disable the little CSS I have, you can read the site perfectly.