From b945952e0da1b476ce347932a151d9c01a15e742 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 30 Jun 2019 20:09:27 +0200 Subject: demux: runtime option changing for cache and stream recording Make most of the demuxer options runtime-changeable. This includes the cache options and stream recording. The manpage documents some of the possibly weird issues related to this. In particular, the disk cache isn't shuffled around if the setting changes at runtime. --- DOCS/man/options.rst | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 8439a00163..4900ccc0e8 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -4004,6 +4004,12 @@ Cache generally worthless after the media is closed, and it's hard to retrieve any media data from it (it's not supported by design). + If the option is enabled at runtime, the cache file is created, but old data + will remain in the memory cache. If the option is disabled at runtime, old + data remains in the disk cache, and the cache file is not closed until the + media is closed. If the option is disabled and enabled again, it will + continue to use the cache file that was opened first. + ``--cache-dir=`` Directory where to create temporary files (default: none). @@ -5863,8 +5869,14 @@ Miscellaneous ``--stream-record=`` Similar to ``--record-file``, but write packets as they are received. The implementation of this does not tolerate seeks (outside of demuxer cache), - or streams being selected/deselected during recording. Can not be set at - runtime. Use with care. + or streams being selected/deselected during recording. Use with care. + + If this is set at runtime, the old file is closed, and the new file is + opened. Note that this will write only data that is appended at the end of + the cache, and the already cached data cannot be written. (A fix for that + would be a command that dumps the cache using a given time range, possibly + with the option to be open-ended, which would continue to write data + appended to the cache. Such a command doesn't exist yet.) ``--lavfi-complex=`` Set a "complex" libavfilter filter, which means a single filter graph can -- cgit v1.2.3