aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/downloader
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2017-02-04 15:23:46 +0100
committerRemita Amine <remitamine@gmail.com>2017-02-04 15:23:46 +0100
commit36fce54816eb1f1d792ac7ed4d07e292d44d62f5 (patch)
tree8d69aabec6f74c0a811d08bacc5cd789fa6ea120 /youtube_dl/downloader
parent2c15db829c1bd8311ed82e2884661271f0cf73ed (diff)
[turner] fix downloading of secure hls formats using ffmpeg(closes #11358)(closes #11373)(closes #11800)
Diffstat (limited to 'youtube_dl/downloader')
-rw-r--r--youtube_dl/downloader/external.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/youtube_dl/downloader/external.py b/youtube_dl/downloader/external.py
index 138f353ef..41e37261d 100644
--- a/youtube_dl/downloader/external.py
+++ b/youtube_dl/downloader/external.py
@@ -199,6 +199,15 @@ class FFmpegFD(ExternalFD):
args = [ffpp.executable, '-y']
+ seekable = info_dict.get('_seekable')
+ if seekable is not None:
+ # setting -seekable prevents ffmpeg from guessing if the server
+ # supports seeking(by adding the header `Range: bytes=0-`), which
+ # can cause problems in some cases
+ # https://github.com/rg3/youtube-dl/issues/11800#issuecomment-275037127
+ # http://trac.ffmpeg.org/ticket/6125#comment:10
+ args += ['-seekable', '1' if seekable else '0']
+
args += self._configuration_args()
# start_time = info_dict.get('start_time') or 0