1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-08-13 16:08:29 +00:00

[twitter:spaces] Change from m4a to aac

Under advice by @bashonly https://discord.com/channels/807245652072857610/808027148308840478/1403031957910323380
This commit is contained in:
Atsushi2965 2025-08-08 00:24:04 +09:00
parent 6a00da4cbe
commit cd0bd815ae
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ def _read_fragment(self, ctx):
idx = frag_content.find(bytes(
[0x49, 0x44, 0x33, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x50, 0x52, 0x49, 0x56]))
if idx > 0:
self.to_screen(f'[{self.FD_NAME}] Removing partial header ({idx} bytes)')
# self.to_screen(f'[{self.FD_NAME}] Removing partial header ({idx} bytes)')
return frag_content[idx:]
else:
return frag_content

View File

@ -1852,7 +1852,7 @@ def _real_extract(self, url):
('source', ('noRedirectPlaybackUrl', 'location'), {url_or_none}), get_all=False)
is_audio_space = source and 'audio-space' in source
formats = self._extract_m3u8_formats(
source, metadata['media_key'], 'm4a' if is_audio_space else 'mp4',
source, metadata['media_key'], 'aac' if is_audio_space else 'mp4',
# XXX: Some audio-only Spaces need to truncate heads of their fragments, not only ffmpeg as downloader
entry_protocol='twitter_spaces' if is_audio_space else 'm3u8_native',
live=is_live, headers=headers, fatal=False) if source else []