3 ms·
Not really related, but youtube-dl (written in Python) is slow to parse videos, and I suspect this is the reason why having mpv play a YouTube video is substant
by nyanpasu64 5y ago
Not really related, but youtube-dl (written in Python) is slow to parse videos, and I suspect this is the reason why having mpv play a YouTube video is substantially slower than playing it directly in the web interface.
youtubedr (https://github.com/kkdai/youtube https://github.com/kkdai/youtube, written in Golang) is much faster, to the point `mpv --profile=pseudo-gui $(youtubedr url -q ... URL)` is about as fast as playing a video in YouTube's own interface. Though I assume it doesn't support non-YouTube services unlike youtube-dl, and I don't know if it can be extended to add them.
Why is youtube-dl slow? Is it due to the Python interpreter startup/overhead, or due to code flaws? Can it be sped up, or precompiled to not depend on the complexity of the Python interpreter?