Mpv: Stream recording feature

Created on 24 Mar 2016  ·  12Comments  ·  Source: mpv-player/mpv

It could be possible to have a key reserved to stop and start recording.

Currently, it is not possible to record just pieces of the stream.

feature-request

Most helpful comment

My guess is that would always start recording from the start of the file/stream.

It would be good to have something like that:

  1. It starts recording when you press Ctr+R
  2. A red dot appears in the overlay gui.
  3. It stops recording when you press Ctr+R again and properly finalizes the file.

All 12 comments

I've got a trick to do this by adding this line in input.conf
Meta+s run youtube-dl "${path}" -o ~/Desktop/%(title)s.%(ext)s; show_text "Downloading ${filename}"
But sadly it has the issue that you need to kill the process yourself to stop the recording.

My guess is that would always start recording from the start of the file/stream.

It would be good to have something like that:

  1. It starts recording when you press Ctr+R
  2. A red dot appears in the overlay gui.
  3. It stops recording when you press Ctr+R again and properly finalizes the file.

You can already achieve this by making a lua script using mp.register_event("start-file", ...) to start at playback and utils.subprocess(t) to run youtube-dl.

It would be good to have something like that:

  1. It starts recording when you press Ctr+R
  2. A red dot appears in the overlay gui.
  3. It stops recording when you press Ctr+R again and properly finalizes the file.

It's the job for a script. You can implement it yourself with the help at https://mpv.io/manual/master/#lua-scripting or wait for someone with enough time to write it.

Makes sense to want this, and people are getting tricked by --stream-capture or --stream-dump all the time (these don't do what is requested here). Other players have such features as well.

Unlikely that I'll spend time on such a feature, though.

By the way, it would be pretty easy to add a default script and key binding that reopens the file and encodes from it.

I'm not sure if users want "real" stream recording that doesn't require redownloading the data and which works with unseekable live streams and such.

Hi, i'm posting here to avoid opening a new issue just for question:
Is there any way to dump live hls stream?

This probably works for hls?

Oh, lacking context here. This was actually implemented as --record-file. Highly experimental.

That just play the stream and produces an empty file. Should i append any extra flag?

If anyone else is having issues with this feature, try picking a different output file extension. I was trying to record an HLS stream to an .mp4 file, which doesn't work, but wasn't easy to guess from the error message (.ts is needed instead).

i just get
[input] No key binding found for key 'Ctrl+r'.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yuvadm picture yuvadm  ·  3Comments

lightonflux picture lightonflux  ·  4Comments

SPDurkee picture SPDurkee  ·  3Comments

422658476 picture 422658476  ·  3Comments

laichiaheng picture laichiaheng  ·  3Comments