Closed marnunez closed 8 years ago
Requires a sample URL.
I've just tried with this one, for example.
mpv --ytdl --autofit 300 --geometry=0%:100% --no-border --ontop --load-unsafe-playlists --volume=50 --no-video "https://www.youtube.com/watch?&list=RDqQrgto184Tk#t=0"
I think this happens because the ytdl script forces bestaudio/best
as format if video is explicitly disabled (the ytdl script explicitly queries the player options for this). And it also doesn't allow the user to override the format.
The actual bad behavior comes from the fact that Youtube serves a DASH-style mp4 file, which ffmpeg's mp4 demuxer doesn't handle correctly.
CC @ChrisK2 - should we remove this hack from ytdl?
I don't use it, but I still think the hack makes sense for saving bandwidth, like it would here as well.
As a workaround, just add the option --ytdl-format=251/171/bestaudio
to use the 'free' webm formats whenever available, those should not have the problem of requiring to preload the whole file.
As a workaround, just add the option --ytdl-format=251,171,bestaudio
Except this does nothing, because the script still overwrites the format.
oh ... shit. Well, fixed as of 1b7e8ff6c590ef3ef289c7468941acd6cf450e41.
I also corrected the custom format, used wrong syntax. Should work as intended now.
Thanks! As soon as I get home I'll compile and test. This being a workaround, what would a proper fix be? Fix the DASH mp4 demuxing in ffmpeg?
Ideally yes.
Superb!
That's pretty much it. Without the --no-video flag, the video plays instantly. With it, I get
[cache] Cache is not responding - slow/stuck network connection?
several times, and, for example,A: 00:00:25 / 00:04:01 (10%) Cache: 10s+6MB
My command line example:
mpv --ytdl --autofit 300 --geometry=0%:100% --no-border --ontop --load-unsafe-playlists --volume=50 "URL" --no-video
Using latest youtube-dl (2015.09.28), Win XP SP2 (don't even get me started :angry:)
mpv 0.11.0-git-f8c5743 (C) 2000-2015 mpv/MPlayer/mplayer2 projects built on Wed Sep 23 01:58:01 CEST 2015 ffmpeg library versions: libavutil 55.2.100 libavcodec 57.3.100 libavformat 57.2.100 libswscale 4.0.100 libavfilter 6.8.100 libswresample 2.0.100 ffmpeg version: N-75488-g44e38f5