1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-31 22:55:18 +00:00

[core] Fix filesize_approx calculation (#9560)

Reverts 22e4dfacb6

Despite being documented as `Kbit/s`, the extractors/manifests were returning bitrates in SI units of kilobits/sec.

Authored by: seproDev, pukkandan
This commit is contained in:
sepro
2024-04-01 01:17:24 +02:00
committed by GitHub
parent e7b17fce14
commit 86e3b82261
6 changed files with 31 additions and 16 deletions

View File

@@ -3834,7 +3834,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
video_id=video_id, only_once=True)
throttled = True
tbr = float_or_none(fmt.get('averageBitrate') or fmt.get('bitrate'), 1024)
tbr = float_or_none(fmt.get('averageBitrate') or fmt.get('bitrate'), 1000)
language_preference = (
10 if audio_track.get('audioIsDefault') and 10
else -10 if 'descriptive' in (audio_track.get('displayName') or '').lower() and -10