Shaka Packager SDK
muxer_flags.cc
1 // Copyright 2014 Google LLC. All rights reserved.
2 //
3 // Use of this source code is governed by a BSD-style
4 // license that can be found in the LICENSE file or at
5 // https://developers.google.com/open-source/licenses/bsd
6 //
7 // Defines Muxer flags.
8 
9 #include <packager/app/muxer_flags.h>
10 
11 ABSL_FLAG(double,
12  clear_lead,
13  5.0f,
14  "Clear lead in seconds if encryption is enabled. Note that we do "
15  "not support partial segment encryption, so it is rounded up to "
16  "full segments. Set it to a value smaller than segment_duration "
17  "so only the first segment is in clear since the first segment "
18  "could be smaller than segment_duration if there is small "
19  "non-zero starting timestamp.");
20 ABSL_FLAG(double,
21  segment_duration,
22  6.0f,
23  "Segment duration in seconds. If single_segment is specified, "
24  "this parameter sets the duration of a subsegment; otherwise, "
25  "this parameter sets the duration of a segment. Actual segment "
26  "durations may not be exactly as requested.");
27 ABSL_FLAG(bool,
28  segment_sap_aligned,
29  true,
30  "Force segments to begin with stream access points.");
31 ABSL_FLAG(double,
32  fragment_duration,
33  0,
34  "Fragment duration in seconds. Should not be larger than "
35  "the segment duration. Actual fragment durations may not be "
36  "exactly as requested.");
37 ABSL_FLAG(bool,
38  fragment_sap_aligned,
39  true,
40  "Force fragments to begin with stream access points. This flag "
41  "implies segment_sap_aligned.");
42 ABSL_FLAG(bool,
43  generate_sidx_in_media_segments,
44  true,
45  "Indicates whether to generate 'sidx' box in media segments. Note "
46  "that it is required for DASH on-demand profile (not using segment "
47  "template).");
48 ABSL_FLAG(std::string,
49  temp_dir,
50  "",
51  "Specify a directory in which to store temporary (intermediate) "
52  " files. Used only if single_segment=true.");
53 ABSL_FLAG(bool,
54  mp4_include_pssh_in_stream,
55  true,
56  "MP4 only: include pssh in the encrypted stream.");
57 ABSL_FLAG(int32_t,
58  transport_stream_timestamp_offset_ms,
59  100,
60  "A positive value, in milliseconds, by which output timestamps "
61  "are offset to compensate for possible negative timestamps in the "
62  "input. For example, timestamps from ISO-BMFF after adjusted by "
63  "EditList could be negative. In transport streams, timestamps are "
64  "not allowed to be less than zero.");
65 ABSL_FLAG(
66  int32_t,
67  default_text_zero_bias_ms,
68  0,
69  "A positive value, in milliseconds. It is the threshold used to "
70  "determine if we should assume that the text stream actually starts "
71  "at time zero. If the first sample comes before default_text_zero_bias_ms, "
72  "then the start will be padded as the stream is assumed to start at zero. "
73  "If the first sample comes after default_text_zero_bias_ms then the start "
74  "of the stream will not be padded as we cannot assume the start time of "
75  "the stream.");
76 
77 ABSL_FLAG(int64_t,
78  start_segment_number,
79  1,
80  "Indicates the startNumber in DASH SegmentTemplate and HLS "
81  "segment name.");