From 6487ba4864fe8ea8ac1ab89d949853e52ee7a959 Mon Sep 17 00:00:00 2001 From: Ricardo Constantino Date: Wed, 28 Sep 2016 13:52:24 +0100 Subject: ytdl_hook: Set aspect ratio for anamorphic video --- player/lua/ytdl_hook.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua index a41e994ac8..48433a14b1 100644 --- a/player/lua/ytdl_hook.lua +++ b/player/lua/ytdl_hook.lua @@ -290,6 +290,12 @@ mp.add_hook("on_load", 10, function () mp.set_property("file-local-options/start", json.start_time) end + -- set aspect ratio for anamorphic video + if not (json.stretched_ratio == nil) and + not option_was_set("video-aspect") then + mp.set_property('file-local-options/video-aspect', json.stretched_ratio) + end + -- for rtmp if (json.protocol == "rtmp") then local rtmp_prop = append_rtmp_prop(nil, -- cgit v1.2.3