Fix Display Aspect Ratio by forcing resolution

This commit is contained in:
2026-04-18 19:21:54 +02:00
parent a8670adbd3
commit c1d5b62c9b
2 changed files with 22 additions and 9 deletions

View File

@@ -7,6 +7,12 @@ def get_aspect_ratio(video_input: str) -> str:
print('Detected Aspect Ratio : ' + aspect_ratio[0])
return aspect_ratio[0]
def get_video_resolution(video_input: str) -> tuple[int, int]:
media_info = MediaInfo.parse(video_input)
video_track = media_info.video_tracks[0]
print('Detected Resolution : ' + str(video_track.width) + 'x' + str(video_track.height))
return (video_track.width, video_track.height)
def get_framerate(video_input: str) -> str:
media_info = MediaInfo.parse(video_input)
video_track = media_info.video_tracks[0]