mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-06-12 05:44:43 +00:00
[fd/ffmpeg] Use info dict http_headers for direct merge downloads (#15456)
Addresses https://github.com/yt-dlp/yt-dlp/pull/13210#discussion_r2655976236 Authored by: bashonly
This commit is contained in:
parent
98c0beab97
commit
a6791415e0
@ -521,10 +521,11 @@ class FFmpegFD(ExternalFD):
|
||||
args.extend(['-cookies', ''.join(
|
||||
f'{cookie.name}={cookie.value}; path={cookie.path}; domain={cookie.domain};\r\n'
|
||||
for cookie in cookies)])
|
||||
if fmt.get('http_headers') and is_http:
|
||||
http_headers = fmt.get('http_headers') or info_dict.get('http_headers')
|
||||
if http_headers and is_http:
|
||||
# Trailing \r\n after each HTTP header is important to prevent warning from ffmpeg:
|
||||
# [http @ 00000000003d2fa0] No trailing CRLF found in HTTP header.
|
||||
args.extend(['-headers', ''.join(f'{key}: {val}\r\n' for key, val in fmt['http_headers'].items())])
|
||||
args.extend(['-headers', ''.join(f'{key}: {val}\r\n' for key, val in http_headers.items())])
|
||||
|
||||
if start_time:
|
||||
args += ['-ss', str(start_time)]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user