From e4b662f352098f44a980c2b38e65ebbbe1f26afd Mon Sep 17 00:00:00 2001 From: Subhamoy Biswas Date: Sat, 25 Jan 2025 13:07:18 +0530 Subject: [PATCH] (fixed): non hdr higher fps videos showing lower fps 720p stream itag in short info --- pytubepp/main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pytubepp/main.py b/pytubepp/main.py index 60f1413..f87ce4f 100644 --- a/pytubepp/main.py +++ b/pytubepp/main.py @@ -288,6 +288,12 @@ class YouTubeDownloader: hdr_stream = self.stream.get_by_itag(hdr_itags.get(res)) matching_stream = hdr_stream if hdr_stream else self.stream.filter(res=res).first() + + if res == '720p' and not hdr_stream: + high_fps_stream = self.stream.get_by_itag(298) + if high_fps_stream: + matching_stream = high_fps_stream + audio_stream = self.stream.get_by_itag(_select_suitable_audio_stream(matching_stream)) print(f"Selected: Video [{res} ({matching_stream.itag})] + Audio [{audio_stream.abr} ({audio_stream.itag})]{f' + Caption [{chosen_caption}]' if chosen_caption else ''}")