1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-24 17:06:58 +00:00
mpv/player/lua
wm4 f485e34fc9 ytdl_hook: merge separate audio tracks via EDL
This merges separate audio and video tracks into one virtual stream,
which helps the mpv caching layer. See previous EDL commit for details.

It's apparently active for most of evil Silicon Valley giant's streaming
videos.

Initial tests seem to work fine, except it happens pretty often that
playback goes into buffering immediately even when seeking within a
cached range, because there is not enough forward cache data yet to
fully restart playback. (Or something like this.)

The audio stream title used to be derived from track.format_note; this
commit stops doing so. It seemed pointless anyway. If really necessary,
it could be restored by adding new EDL headers.

Note that we explicitly don't do this with subtitle tracks. Subtitle
tracks still have a chance with on-demand loading or loading in the
background while video is already playing; merging them with EDL would
prevent this. Currently, subtitles are still added in a "blocking"
manner, but in theory this could be loosened. For example, the Lua API
already provides a way to run processes asynchronously, which could be
used to add subtitles during playback. EDL will probably be never
flexible enough to provide this. Also, subtitles are downloaded at
once, rather than streamed like audio and video.

Still missing: disabling EDL's pointless chapter generation, and
propagating download speed statistics through the EDL wrapper.
2019-09-19 20:37:04 +02:00
..
assdraw.lua osc: improve look of seekranges 2019-09-02 01:11:04 +03:00
defaults.lua Merge branch 'master' into pr6360 2019-03-11 01:00:27 +02:00
options.lua config: replace config dir lua-settings/ with dir script-opts/ 2018-04-07 16:02:16 -07:00
osc.lua osc: improve look of seekranges 2019-09-02 01:11:04 +03:00
stats.lua stats.lua: silence annoying fontconfig warnings 2019-09-19 20:37:04 +02:00
ytdl_hook.lua ytdl_hook: merge separate audio tracks via EDL 2019-09-19 20:37:04 +02:00