Repository: youtube-dl
Issue: ffmpeg can't handle gzipped key file in AES-encrypted HLS streams
Labels: external-bugs

- [x] I've **verified** and **I assure** that I'm running youtube-dl **2016.07.07**
### Before submitting an _issue_ make sure you have:
- [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
### What is the purpose of your _issue_?
- [x] Bug report (encountered problems with youtube-dl)
- [x] 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**):
- Single video: https://talk.objc.io/episodes/S01E03-loading-view-controllers

---
### Description of your _issue_, suggested solution and other information

Download is failing with error `ERROR: ffmpeg exited with code 1`
- URL: https://talk.objc.io/episodes/S01E03-loading-view-controllers