blog + microblog + linkblog + site updates + contact + about me + RSS

writer13's 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.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

In case you are wondering: 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 (plus some custom fonts). Hosted on Neocities and created with Emacs.

parasurv.neocities.org 2018-2022 - writer13.neocities.org 2022-