mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-13 07:47:15 +08:00
[hls] pass all headers to ffmpeg
This commit is contained in:
parent
3c8ae5fbce
commit
c8c847d447
@ -28,12 +28,12 @@ class HlsFD(FileDownloader):
|
||||
return False
|
||||
ffpp.check_version()
|
||||
|
||||
cookies = ''
|
||||
for cookie in self.ydl.cookiejar:
|
||||
cookies += '%s=%s; path=%s; domain=%s;\r\n' % (cookie.name, cookie.value, cookie.path, cookie.domain)
|
||||
headers = ''
|
||||
for key, val in info_dict['http_headers'].items():
|
||||
headers += '%s: %s\r\n' % (key, val)
|
||||
args = [
|
||||
encodeArgument(opt)
|
||||
for opt in (ffpp.executable, '-y', '-user-agent', info_dict['http_headers']['User-Agent'], '-cookies', cookies,'-i', url, '-f', 'mp4', '-c', 'copy', '-bsf:a', 'aac_adtstoasc')]
|
||||
for opt in (ffpp.executable, '-y', '-headers', headers, '-i', url, '-f', 'mp4', '-c', 'copy', '-bsf:a', 'aac_adtstoasc')]
|
||||
args.append(encodeFilename(tmpfilename, True))
|
||||
|
||||
retval = subprocess.call(args)
|
||||
|
Loading…
x
Reference in New Issue
Block a user