Node-MPV icon indicating copy to clipboard operation
Node-MPV copied to clipboard

[Question] Replace current title with URL but not play, wait for specific buffer amount

Open KaKi87 opened this issue 2 years ago • 2 comments

Hello,

Is it possible to make mpv do the following ?

  • replace the current title with a URL
  • not start playing
  • start buffering
  • wait a specific amount of playback time to be buffered
  • start playing

Thanks


Optional explanation below

I just learned about mpv being a programmable player, so I would like to try something out.

When streaming with low/moderate bandwith, using a player that starts instantly when buffer just began to load, then it will eventually become empty and playback will be interrupted, because it is consumed faster than it is loaded.

Therefore, I would like to create a player that mesures the buffer's loading speed, and calculate the optimal size to avoid interruption, so that the user will have to wait longer to start playing, but will not experience further interruptions.

If the network slows down while playing, the buffer size will be recalculated accordingly, and if possible, playback will be interrupted at the end of the current chapter, or at the nearest quiet time, in order to offer the best viewing experience possible.

I've been thinking about this project for a long time, but I need to be sure that it is doable using mpv, before starting implementing the basics of the player.

Thanks

KaKi87 avatar Apr 02 '22 09:04 KaKi87

Hi there, you don't need MPV to do that, as the player (as far as I know) doesn't handle downloads by itself, it renders videos (duh^^). So you'll need to handle the download/stream yourself with Javascript, and then you can just fire up MPV player when you're ready

vankasteelj avatar Aug 07 '22 18:08 vankasteelj

the player (as far as I know) doesn't handle downloads by itself

Really?

If that's true, I will definitely give up, because I'm not motivated enough to implement that.

KaKi87 avatar Aug 07 '22 19:08 KaKi87