mirror of https://github.com/mpv-player/mpv
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:
parent
a6056c52fe
commit
07ddfd4f8a
|
@ -120,7 +120,11 @@ mp.add_hook("on_load", 10, function ()
|
||||||
|
|
||||||
-- DASH?
|
-- DASH?
|
||||||
if not (json["requested_formats"] == nil) then
|
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
|
-- video url
|
||||||
streamurl = json["requested_formats"][1].url
|
streamurl = json["requested_formats"][1].url
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue