aboutsummaryrefslogtreecommitdiffhomepage
path: root/player/lua
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2017-12-07 08:45:16 +0100
committerGravatar Kevin Mitchell <kevmitch@gmail.com>2017-12-06 23:59:59 -0800
commit06519aae5837312437b07e8bfef10c025ec2f688 (patch)
treef27bf6e01e70c1db169afb3d2cb31e2850907832 /player/lua
parent0c6a488ef9995357e90dd0d0290e9cf97f7f1dda (diff)
ytdl: handle HLS with FFmpeg
Using youtube-dl's metadata ends up with stupid things like missing variant streams, or missing audio streams entirely.
Diffstat (limited to 'player/lua')
-rw-r--r--player/lua/ytdl_hook.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua
index 82679a2aa8..aa83f4c49c 100644
--- a/player/lua/ytdl_hook.lua
+++ b/player/lua/ytdl_hook.lua
@@ -382,7 +382,10 @@ mp.add_hook("on_load", 10, function ()
msg.debug('ytdl parsing took '..os.clock()-start_time..' seconds')
-- what did we get?
- if not (json["direct"] == nil) and (json["direct"] == true) then
+ if json["protocol"] == "m3u8" then
+ msg.verbose("Playing directly with protocol " .. json["protocol"])
+ return
+ elseif not (json["direct"] == nil) and (json["direct"] == true) then
-- direct URL, nothing to do
msg.verbose("Got direct URL")
return