diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 3293a9076..0d2e4664b 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -3918,7 +3918,7 @@ def simplified_codec(f, field): self._format_out(format_field(f, 'format_id'), self.Styles.ID), format_field(f, 'ext'), format_field(f, func=self.format_resolution, ignore=('audio only', 'images')), - format_field(f, 'fps', '\t%d', func=round), + format_field(f, 'fps', '\t%s'), format_field(f, 'dynamic_range', '%s', ignore=(None, 'SDR')).replace('HDR', ''), format_field(f, 'audio_channels', '\t%s'), delim, ( diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index 8d199b353..bffd071af 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -2840,12 +2840,15 @@ def extract_Initialization(source): url_el = representation.find(_add_ns('BaseURL')) filesize = int_or_none(url_el.attrib.get('{http://youtube.com/yt/2012/10/10}contentLength') if url_el is not None else None) bandwidth = int_or_none(representation_attrib.get('bandwidth')) + fps = representation_attrib.get('frameRate') if representation_id is not None: format_id = representation_id else: format_id = content_type if mpd_id: format_id = mpd_id + '-' + format_id + if fps and (m := re.match(r'^(\d+)/(\d+)$', fps)): + fps = int(m.group(1)) / int(m.group(2)) if content_type in ('video', 'audio'): f = { 'format_id': format_id, @@ -2855,7 +2858,7 @@ def extract_Initialization(source): 'height': int_or_none(representation_attrib.get('height')), 'tbr': float_or_none(bandwidth, 1000), 'asr': int_or_none(representation_attrib.get('audioSamplingRate')), - 'fps': int_or_none(representation_attrib.get('frameRate')), + 'fps': float_or_none(fps), 'language': lang if lang not in ('mul', 'und', 'zxx', 'mis') else None, 'format_note': f'DASH {content_type}', 'filesize': filesize,