From 06519aae5837312437b07e8bfef10c025ec2f688 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 7 Dec 2017 08:45:16 +0100 Subject: ytdl: handle HLS with FFmpeg Using youtube-dl's metadata ends up with stupid things like missing variant streams, or missing audio streams entirely. --- player/lua/ytdl_hook.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3