PR #23495 opened by Bogdan Lisman (bogdanpydev)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23495
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23495.patch

write_header_trailer, individual_header_trailer, segment_header_filename and
segment_wrap_number had no documentation. Describe each option and the ways
they constrain one another.

Signed-off-by: Bogdan Lisman <[email protected]>

# Summary of changes

Briefly describe what this PR does and why.

<!--
If this PR requires new FATE test samples, attach them to the PR and
list their target paths below (relative to the fate-suite root).

Attached filenames must match the sample's filename:

```fate-samples
# e.g. vorbis/new-sample.ogg
```
-->



>From 64a77a9eb7fcea2a5083616075b9737657815568 Mon Sep 17 00:00:00 2001
From: Bogdan Lisman <[email protected]>
Date: Mon, 15 Jun 2026 02:27:17 +0300
Subject: [PATCH] doc/muxers: document undocumented segment muxer options

write_header_trailer, individual_header_trailer, segment_header_filename and
segment_wrap_number had no documentation. Describe each option and the ways
they constrain one another.

Signed-off-by: Bogdan Lisman <[email protected]>
---
 doc/muxers.texi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 2b5fc3832c..d35c5c1fb3 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -3542,6 +3542,13 @@ Wrap around segment index once it reaches @var{limit}.
 @item segment_start_number @var{number}
 Set the sequence number of the first segment. Defaults to @code{0}.
 
+@item segment_wrap_number @var{number}
+Set the number of times the segment index is assumed to have already wrapped
+when generating the indexes reported in the segment list. Together with
+@option{segment_wrap} and @option{segment_start_number} it offsets the reported
+index, which is computed as @code{segment_start_number + segment_wrap *
+segment_wrap_number}. Defaults to @code{0}.
+
 @item strftime @var{1|0}
 Use the @code{strftime} function to define the name of the new
 segments to write. If this is selected, the output segment name must
@@ -3568,6 +3575,25 @@ argument must be a time duration specification, and 
defaults to 0.
 If enabled, write an empty segment if there are no packets during the period a
 segment would usually span. Otherwise, the segment will be filled with the next
 packet written. Defaults to @code{0}.
+
+@item write_header_trailer @var{1|0}
+Write a header to the first segment and a trailer to the last one, instead of
+writing a header and a trailer to every individual segment. Disabling it
+(@code{0}) also forces @option{individual_header_trailer} to @code{0}, so that
+no segment is given a header or trailer. Default value is @code{1}.
+
+@item individual_header_trailer @var{1|0}
+If enabled, write a complete header and trailer to every segment, making each
+segment an independently usable file. If disabled (@code{0}), only the first
+segment is given a header and only the last one a trailer. It is forced to
+@code{0} when @option{write_header_trailer} is @code{0} or when
+@option{segment_header_filename} is set. Default value is @code{1}.
+
+@item segment_header_filename @var{name}
+Write the stream header to a separate file named @var{name} instead of storing
+it in the segments. Setting it forces @option{write_header_trailer} to @code{1}
+and @option{individual_header_trailer} to @code{0}, so the header is written
+only once, to @var{name}. Unset by default.
 @end table
 
 Make sure to require a closed GOP when encoding and to set the GOP
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to