Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffmpeg can't handle gzipped key file in AES-encrypted HLS streams #10022

Open
5 of 8 tasks
marknorgren opened this issue Jul 6, 2016 · 2 comments
Open
5 of 8 tasks

ffmpeg can't handle gzipped key file in AES-encrypted HLS streams #10022

marknorgren opened this issue Jul 6, 2016 · 2 comments

Comments

@marknorgren
Copy link

  • I've verified and I assure that I'm running youtube-dl 2016.07.07

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

$ youtube-dl https://talk.objc.io/episodes/S01E03-loading-view-controllers --verbose
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'https://talk.objc.io/episodes/S01E03-loading-view-controllers', u'--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.07.07
[debug] Python version 2.7.10 - Darwin-15.5.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.0, ffprobe 3.0
[debug] Proxy map: {}
[generic] S01E03-loading-view-controllers: Requesting header
WARNING: Falling back on generic information extractor.
[generic] S01E03-loading-view-controllers: Downloading webpage
[generic] S01E03-loading-view-controllers: Extracting information
[generic] hls: Downloading m3u8 information
[debug] Invoking downloader on u'https://d2sazdeahkz1yk.cloudfront.net/episodes/1b888bc4-d261-481d-a8ba-28c02b31eaab/1/1080p.m3u8'
[download] Destination: Loading View Controllers-hls.mp4
[debug] ffmpeg command line: ffmpeg -y -headers 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/47.0 (Chrome)
' -i https://d2sazdeahkz1yk.cloudfront.net/episodes/1b888bc4-d261-481d-a8ba-28c02b31eaab/1/1080p.m3u8 -c copy -f mp4 -bsf:a aac_adtstoasc 'file:Loading View Controllers-hls.mp4.part'
ffmpeg version 3.0 Copyright (c) 2000-2016 the FFmpeg developers
  built with Apple LLVM version 7.0.2 (clang-700.1.81)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.0 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-vda
  libavutil      55. 17.103 / 55. 17.103
  libavcodec     57. 24.102 / 57. 24.102
  libavformat    57. 25.100 / 57. 25.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 31.100 /  6. 31.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
[https @ 0x7f95d3724840] inflate return value: -3, invalid code lengths set
Unable to read key file https://talk.objc.io/episodes/S01E03-loading-view-controllers/hls_key
[hls,applehttp @ 0x7f95d4001400] Error when loading first segment 'https://d2sazdeahkz1yk.cloudfront.net/episodes/1b888bc4-d261-481d-a8ba-28c02b31eaab/1/1080p00000.ts'
https://d2sazdeahkz1yk.cloudfront.net/episodes/1b888bc4-d261-481d-a8ba-28c02b31eaab/1/1080p.m3u8: Invalid data found when processing input


ERROR: ffmpeg exited with code 1
...
<end of log>

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):


Description of your issue, suggested solution and other information

Download is failing with error ERROR: ffmpeg exited with code 1

@yan12125
Copy link
Collaborator

yan12125 commented Jul 7, 2016

Looks like an ffmpeg bug. Install pycrypto and try the following command:

youtube-dl https://talk.objc.io/episodes/S01E03-loading-view-controllers --verbose --hls-prefer-native

@yan12125
Copy link
Collaborator

yan12125 commented Jul 8, 2016

Well not quite ffmpeg's fault. talk.objc.io does not handle Accept-Encoding header correctly. Use the following command as a workaround:

youtube-dl https://talk.objc.io/episodes/S01E03-loading-view-controllers --verbose --add-header "Youtubedl-no-compression: True"

Also reported to http://trac.ffmpeg.org/ticket/5696. I'll keep this ticket open until it's fixed (or rejected) by ffmpeg and a new version of ffmpeg is released.

@yan12125 yan12125 changed the title ERROR: ffmpeg exited with code 1 - Unable to read key file https://talk.objc.io/episodes/S01E03-loading-view-controllers/hls_key ffmpeg can't handle gzipped key file in AES-encrypted HLS streams Jul 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants