diff options
author | Ricardo Constantino <wiiaboo@gmail.com> | 2016-09-28 13:52:24 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-28 21:16:40 +0200 |
commit | 6487ba4864fe8ea8ac1ab89d949853e52ee7a959 (patch) | |
tree | 9eec7c96b17a0525750578a5147267625ef195c9 /player | |
parent | 1557ca6712ef86e03fd4109311f10d6c45875fc4 (diff) | |
download | mpv-6487ba4864fe8ea8ac1ab89d949853e52ee7a959.tar.bz2 mpv-6487ba4864fe8ea8ac1ab89d949853e52ee7a959.tar.xz |
ytdl_hook: Set aspect ratio for anamorphic video
Diffstat (limited to 'player')
-rw-r--r-- | player/lua/ytdl_hook.lua | 6 |
1 files changed, 6 insertions, 0 deletions
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, |