aboutsummaryrefslogtreecommitdiffhomepage
path: root/player
diff options
context:
space:
mode:
authorGravatar Ricardo Constantino <wiiaboo@gmail.com>2018-02-10 00:06:36 +0000
committerGravatar Kevin Mitchell <kevmitch@gmail.com>2018-02-11 23:27:37 -0800
commit57228b65810f1026f1ac10a0df86d7434289c345 (patch)
tree0ad244c750621833c4d826b36b910d41bb062d32 /player
parent664e8fe66ae8532471c2528e86812122af6a04dd (diff)
ytdl_hook: add script opt for using manifest URLs
Disable by default. This feature was added in 7eb342757, which allowed stream selection in runtime. Problem with this atm is that FFmpeg will try to demux every first packet of every track leading to noticeable delay opening the URL. This option can be changed to enabled by default or removed when HLS/DASH demuxers are improved upstream.
Diffstat (limited to 'player')
-rw-r--r--player/lua/ytdl_hook.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua
index 59ffbd3b94..3c5068bfd7 100644
--- a/player/lua/ytdl_hook.lua
+++ b/player/lua/ytdl_hook.lua
@@ -4,7 +4,8 @@ local options = require 'mp.options'
local o = {
exclude = "",
- try_ytdl_first = false
+ try_ytdl_first = false,
+ use_manifests = false
}
options.read_options(o)
@@ -279,7 +280,7 @@ local function add_single_video(json)
local reqfmts = json["requested_formats"]
-- prefer manifest_url if present
- if valid_manifest(json) then
+ if o.use_manifests and valid_manifest(json) then
local mpd_url = reqfmts and reqfmts[1]["manifest_url"] or
json["manifest_url"]
if not mpd_url then