ytdl: When using DASH, print actual duration
prints the actual duration as reported by youtube-dl to the terminal when available
This commit is contained in:
1 parent
a6056c52fe
commit
07ddfd4f8a
1 file changed
+5
-1
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user