diff options
author | ChrisK2 <spam@kalania.de> | 2014-11-26 17:17:05 +0100 |
---|---|---|
committer | Alessandro Ghedini <alessandro@ghedini.me> | 2014-12-19 19:23:11 +0100 |
commit | 75a62c7a648b0492c9b1036729b59fd08ce55c28 (patch) | |
tree | 8a0a0c373527f09f485e9b205973fb29c5ab85df | |
parent | 73eaadf6c37157e09b210ad3bee1d52707f87691 (diff) | |
download | mpv-75a62c7a648b0492c9b1036729b59fd08ce55c28.tar.bz2 mpv-75a62c7a648b0492c9b1036729b59fd08ce55c28.tar.xz |
ytdl: When using DASH, print actual duration
prints the actual duration as reported by youtube-dl to the
terminal when available
-rw-r--r-- | player/lua/ytdl_hook.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua index 143ca4fe7a..5fece5bbea 100644 --- a/player/lua/ytdl_hook.lua +++ b/player/lua/ytdl_hook.lua @@ -120,7 +120,11 @@ mp.add_hook("on_load", 10, function () -- DASH? if not (json["requested_formats"] == nil) then - msg.info("NOTE: Using DASH, expect inaccurate duration.") + msg.info("Using DASH, expect inaccurate duration.") + if not (json.duration == nil) then + msg.info("actual duration: " .. mp.format_time(json.duration)) + end + -- video url streamurl = json["requested_formats"][1].url |