<p>If you satisfy with your video outputting on a 1080p device, the original video aspect ratio has to be 16:9; therefore, the original video has no choice to be 480p, 720p, or 1080p. The next step is the transformation, there are plenty of filters you can choose to determine it is 480p; on the other hand, choosing transforming to 720p or no transformation, stay in 1080p, depends on contours detection on white background.</p>
<p>As you mentioned ffmpeg and opencv, you should find such APIs easily.</p>

CC BY-SA 4.0
2020-08-09T02:35:54.993Z
2020-08-09T02:35:54.993Z
xer-rex
<p>I'm not sure of what brand of software might be capable of this, but I disagree with the commenters saying it's impossible to assess.</p>
<p>Imagine a 480p video consisting entirely of black and white pixel lines.
Assuming away compression artifacts, it'd be clear that upscaled to 1080p, the contrast edges would likely not be clean and sharp compared to a proper 1080p video made of black and white lines.  Some measurement of average contrast between pixels or peak contrast would probably let you cull what's lowest contrast versus not.  While I agree there's no way to tell what the native original resolution was, you'd be able to rank videos by contrast/detail in a way.
In short, how strongly on average one pixel differs from the next will give you a measurement of detail.</p>

CC BY-SA 4.0
2022-12-16T16:20:22.963Z
2022-12-16T16:20:22.963Z
Andy Zou
<p>Imagine you have recorded/captured the screen at 1080p, but it was displaying a 480p video maximized to fullscreen.<br>
The result file is technically 1080p, but it really is showing a 480p video, that is what I mean by &quot;real resolution&quot;.<br>
Now imagine I have a lot of these 1080p videos, having different and unknown &quot;real resolutions&quot;, how can I find/detect these resolutions?<br><br>
The goal is resize the videos to the real resolutions and not waste disk space.<br><br>
(same question for FPS)<br>
<br>
The tool that I prefer to use is ffmpeg, but i'm open to other tools/apps if they are free for personal use.</p>

CC BY-SA 4.0
2020-08-07T05:05:20.283Z
If it was recorded at 1080p, then it is a 1080p video. The "real" resolution data isn't available - you'll have to assess it subjectively.
Gyan
CC BY-SA 4.0
2020-08-07T05:53:39.793Z
I agree with @Gyan. There is no way to do it automatically.
Matt
CC BY-SA 4.0
2020-08-07T09:33:23.647Z
Most codecs would take advantage of the redundancy caused by up-rezzing a video and would be able to reduce the file size more anyway. It would be a lot of work, and may not save you much disk space.
stib
CC BY-SA 4.0
2020-08-07T11:33:20.187Z
Resizing by a player isn't usually neighbour but bilinear or occasionally bicubic, so some redundancy but not as much as with nearest neighbour method.
Gyan
<video><ffmpeg><software-recommendation><conversion><analysis>
How to find/detect the real video resolution?
Kirill
# How to find/detect the real video resolution?

(Asked by: username_0 on 2020-08-06)

Imagine you have recorded/captured the screen at 1080p, but it was displaying a 480p video maximized to fullscreen.  
The result file is technically 1080p, but it really is showing a 480p video, that is what I mean by "real resolution".  
Now imagine I have a lot of these 1080p videos, having different and unknown "real resolutions", how can I find/detect these resolutions?  
  
The goal is resize the videos to the real resolutions and not waste disk space.  
  
(same question for FPS)  
  
The tool that I prefer to use is ffmpeg, but i'm open to other tools/apps if they are free for personal use.

**Tags:** video, ffmpeg, software-recommendation, conversion, analysis

> **Comments:**
> **username_1**: If it was recorded at 1080p, then it is a 1080p video. The "real" resolution data isn't available - you'll have to assess it subjectively.  
> **username_2**: I agree with @username_1. There is no way to do it automatically.  
> **username_3**: Most codecs would take advantage of the redundancy caused by up-rezzing a video and would be able to reduce the file size more anyway. It would be a lot of work, and may not save you much disk space.  
> **username_1**: Resizing by a player isn't usually neighbour but bilinear or occasionally bicubic, so some redundancy but not as much as with nearest neighbour method.  

---

## 2 answers

### Answer by username_4 on 2020-08-09. Score: 0

If you satisfy with your video outputting on a 1080p device, the original video aspect ratio has to be 16:9; therefore, the original video has no choice to be 480p, 720p, or 1080p. The next step is the transformation, there are plenty of filters you can choose to determine it is 480p; on the other hand, choosing transforming to 720p or no transformation, stay in 1080p, depends on contours detection on white background.

As you mentioned ffmpeg and opencv, you should find such APIs easily.


---

### Answer by username_5 on 2022-12-16. Score: -1

I'm not sure of what brand of software might be capable of this, but I disagree with the commenters saying it's impossible to assess.

Imagine a 480p video consisting entirely of black and white pixel lines.
Assuming away compression artifacts, it'd be clear that upscaled to 1080p, the contrast edges would likely not be clean and sharp compared to a proper 1080p video made of black and white lines. Some measurement of average contrast between pixels or peak contrast would probably let you cull what's lowest contrast versus not. While I agree there's no way to tell what the native original resolution was, you'd be able to rank videos by contrast/detail in a way.
In short, how strongly on average one pixel differs from the next will give you a measurement of detail.


---

