From b959a2229176a98ba83c196ad32cad538520c3aa Mon Sep 17 00:00:00 2001 From: Mohammad AlSaleh Date: Wed, 9 Sep 2020 17:48:45 +0300 Subject: stream_slice: interpret `end` as offset if it starts with '+' Example: slice://1g-2g@file.ts (1 to 2) slice://1g-+2g@file.ts (1 to 3) Signed-off-by: Mohammad AlSaleh --- DOCS/man/mpv.rst | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'DOCS/man/mpv.rst') diff --git a/DOCS/man/mpv.rst b/DOCS/man/mpv.rst index 09c3e24ea6..7b1c48c4a2 100644 --- a/DOCS/man/mpv.rst +++ b/DOCS/man/mpv.rst @@ -1208,6 +1208,8 @@ PROTOCOLS ``start`` and ``end`` represent a byte range and accept suffixes such as ``KiB`` and ``MiB``. ``end`` is optional. + if ``end`` starts with ``+``, it is considered as offset from ``start``. + Only works with seekable streams. Examples:: @@ -1217,6 +1219,11 @@ PROTOCOLS This starts reading from cap.ts after seeking 1 GiB, then reads until reaching 2 GiB or end of file. + mpv slice://1g-+2g@cap.ts + + This starts reading from cap.ts after seeking 1 GiB, then + reads until reaching 3 GiB or end of file. + mpv slice://100m@appending://cap.ts This starts reading from cap.ts after seeking 100MiB, then -- cgit v1.2.3