mirror of https://github.com/mpv-player/mpv
ytdl_hook: try to set video track first if available
Fixes `--ytdl-format="dash-fastly_skyfire-video-363357330+dash-fastly_skyfire_sep-audio-363357330" https://vimeo.com/108650530` This happened because the video track also had audio available and after adding it expecting an audio-only track, there were no more tracks with video.
This commit is contained in:
parent
98b8e60b14
commit
11289d5238
|
@ -311,14 +311,14 @@ local function add_single_video(json)
|
||||||
if not edl_track and not url_is_safe(track.url) then
|
if not edl_track and not url_is_safe(track.url) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if track.acodec and track.acodec ~= "none" then
|
if track.vcodec and track.vcodec ~= "none" then
|
||||||
|
-- video track
|
||||||
|
streamurl = edl_track or track.url
|
||||||
|
elseif track.acodec and track.acodec ~= "none" and track.vcodec == "none" then
|
||||||
-- audio track
|
-- audio track
|
||||||
mp.commandv("audio-add",
|
mp.commandv("audio-add",
|
||||||
edl_track or track.url, "auto",
|
edl_track or track.url, "auto",
|
||||||
track.format_note or "")
|
track.format_note or "")
|
||||||
elseif track.vcodec and track.vcodec ~= "none" then
|
|
||||||
-- video track
|
|
||||||
streamurl = edl_track or track.url
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue