2

Is it possible to get mpv to dump a stream to separate files based on the current icy-title value when using --stream-record with an icecast stream?

man mpv only mentions using a fixed file name with --record-file, --stream-record --dump-cache.

If this is not possible directly with mpv what might be a possible approach to save separate files for each song in an icecast playlist rather than one huge continuous file as --stream-record=mystream.mp3 does?

ccpizza
  • 28,968
  • 18
  • 162
  • 169

1 Answers1

2

While a solution is probably possible with a custom lua script for mpv apparently mpv can't do this ootb.

A dedicated utility that can parse icecast titles and dump the streams to separate files is streamripper. It can be installed with apt install streamripper on debian linuces or brew install streamripper on mac.

The following command will create separate files named after stream titles:

streamripper http://some-icast-server.com/stream -r 8888

The -r flag will create a relay server on port 8888. You can listen to the relayed stream while it's been downloading with:

mpv http://localhost:8888
ccpizza
  • 28,968
  • 18
  • 162
  • 169