Compare commits

..

No commits in common. "00828e2c9311b90d317fa054883dd63e21fffa78" and "059bc4db1975698dca53278a0fcc23d428b7658a" have entirely different histories.

3 changed files with 6 additions and 16 deletions

View File

@ -47,7 +47,6 @@ def main():
'--noconfirm', '--noconfirm',
*dependency_options(), *dependency_options(),
*opts, *opts,
'--collect-submodules=yt_dlp',
'yt_dlp/__main__.py', 'yt_dlp/__main__.py',
] ]
print(f'Running PyInstaller with {opts}') print(f'Running PyInstaller with {opts}')

View File

@ -48,8 +48,6 @@ if sys.argv[1:2] == ['py2exe']:
'dist_dir': './dist', 'dist_dir': './dist',
'excludes': ['Crypto', 'Cryptodome'], # py2exe cannot import Crypto 'excludes': ['Crypto', 'Cryptodome'], # py2exe cannot import Crypto
'dll_excludes': ['w9xpopen.exe', 'crypt32.dll'], 'dll_excludes': ['w9xpopen.exe', 'crypt32.dll'],
# Modules that are only imported dynamically must be added here
'includes': ['yt_dlp.compat._legacy'],
} }
}, },
'zipfile': None 'zipfile': None

View File

@ -382,15 +382,13 @@ class FFmpegFD(ExternalFD):
# if end_time: # if end_time:
# args += ['-t', compat_str(end_time - start_time)] # args += ['-t', compat_str(end_time - start_time)]
http_headers = None if info_dict.get('http_headers') is not None and re.match(r'^https?://', urls[0]):
if info_dict.get('http_headers'):
youtubedl_headers = handle_youtubedl_headers(info_dict['http_headers'])
http_headers = [
# Trailing \r\n after each HTTP header is important to prevent warning from ffmpeg/avconv: # Trailing \r\n after each HTTP header is important to prevent warning from ffmpeg/avconv:
# [http @ 00000000003d2fa0] No trailing CRLF found in HTTP header. # [http @ 00000000003d2fa0] No trailing CRLF found in HTTP header.
headers = handle_youtubedl_headers(info_dict['http_headers'])
args += [
'-headers', '-headers',
''.join(f'{key}: {val}\r\n' for key, val in youtubedl_headers.items()) ''.join(f'{key}: {val}\r\n' for key, val in headers.items())]
]
env = None env = None
proxy = self.params.get('proxy') proxy = self.params.get('proxy')
@ -443,11 +441,6 @@ class FFmpegFD(ExternalFD):
args += ['-rtmp_conn', conn] args += ['-rtmp_conn', conn]
for i, url in enumerate(urls): for i, url in enumerate(urls):
# We need to specify headers for each http input stream
# otherwise, it will only be applied to the first.
# https://github.com/yt-dlp/yt-dlp/issues/2696
if http_headers is not None and re.match(r'^https?://', url):
args += http_headers
args += self._configuration_args((f'_i{i + 1}', '_i')) + ['-i', url] args += self._configuration_args((f'_i{i + 1}', '_i')) + ['-i', url]
args += ['-c', 'copy'] args += ['-c', 'copy']