Sagnac / streamsave

mpv script aimed at saving live streams and clipping online videos without encoding.
94 stars 4 forks source link

The question is about the title file being recorded and completed #15

Closed BoscoFZ closed 8 months ago

BoscoFZ commented 8 months ago

Here is the conf of my streamsave

# Default writing directory is the current working directory.
# Relative and absolute paths as well as ~/ and ~~/ meta paths are accepted.
save_directory=~~/07save/
# <ab|current|continuous|chapter|segments>
dump_mode=continuous
# <increment|range|timestamp|overwrite|chapter>
output_label=increment

# <.ext>
force_extension=no
# <title>
force_title=no

# <yes|no>
range_marks=no
track_packets=no

# Automation Options

# <yes|no>
autostart=yes
# <no|HH:MM:SS>
autoend=no

# <yes|no>
hostchange=no
on_demand=no
# <no|HH:MM:SS>
quit=no

# <yes|no>
piecewise=no

When I use streamsave sometimes the title will contain an ID so I use auto to change the name quickly. But the problem is is there any way to help me distinguish which file is being recorded or which file has been completed? I don't want to use auto rename when a file is being recorded because I'm afraid it will damage the file. Thank you very much.

Sagnac commented 8 months ago

By 'auto' do you mean the default naming behaviour (force_title=no) or using autostart (it's set to yes in your config)?

autostart is only for automatically requesting a cache dump on stream initialization. Typically if you want to change the title at runtime you'd open the console with backtick ` and then issue a command, e.g. script-message streamsave-title new_title; you can bind this to a key in input.conf if you want to use the same title for these cases. Alternatively, if you don't want to mess with commands or keybinds you can simply write force_title=your_custom_title_here in your streamsave.conf to set it universally for all streams.

Whenever you change the title through script-message any file being recorded is not affected; that only occurs if you issue another cache dump request and start recording a new file, at which point the previous file will finish writing. Changing the name only has an effect on subsequent file writes, it doesn't affect whatever file is being recorded.

Also, if you're using the newest version of streamsave, force_title=no has been deprecated, so I'd recommend you delete that line (and force_extension) from your config if you won't be using those options.

Edit: Oh also if you're not launching mpv from the command line if you use press the aforementioned backtick key ` the console contains info messages about which file is being written and with what name, as well as what the title has been changed to if you change it.

BoscoFZ commented 8 months ago

Thank you very much for your answer. That helped me understand more things and I also switched to the newest version of streamsave.