Shaka Packager SDK
Loading...
Searching...
No Matches
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#include <cstdint>
12#include <string>
13
14#include <absl/flags/flag.h>
15
16#include <packager/chunking_params.h>
17
18ABSL_FLAG(double,
19 clear_lead,
20 5.0f,
21 "Clear lead in seconds if encryption is enabled. Note that we do "
22 "not support partial segment encryption, so it is rounded up to "
23 "full segments. Set it to a value smaller than segment_duration "
24 "so only the first segment is in clear since the first segment "
25 "could be smaller than segment_duration if there is small "
26 "non-zero starting timestamp.");
27ABSL_FLAG(double,
28 segment_duration,
29 6.0f,
30 "Segment duration in seconds. If single_segment is specified, "
31 "this parameter sets the duration of a subsegment; otherwise, "
32 "this parameter sets the duration of a segment. Actual segment "
33 "durations may not be exactly as requested.");
34ABSL_FLAG(bool,
35 segment_sap_aligned,
36 true,
37 "Force segments to begin with stream access points.");
38ABSL_FLAG(double,
39 fragment_duration,
40 0,
41 "Fragment duration in seconds. Should not be larger than "
42 "the segment duration. Actual fragment durations may not be "
43 "exactly as requested.");
44ABSL_FLAG(bool,
45 fragment_sap_aligned,
46 true,
47 "Force fragments to begin with stream access points. This flag "
48 "implies segment_sap_aligned.");
49ABSL_FLAG(bool,
50 generate_sidx_in_media_segments,
51 true,
52 "Indicates whether to generate 'sidx' box in media segments. Note "
53 "that it is required for DASH on-demand profile (not using segment "
54 "template).");
55ABSL_FLAG(std::string,
56 temp_dir,
57 "",
58 "Specify a directory in which to store temporary (intermediate) "
59 " files. Used only if single_segment=true.");
60ABSL_FLAG(bool,
61 mp4_include_pssh_in_stream,
62 true,
63 "MP4 only: include pssh in the encrypted stream.");
64ABSL_FLAG(int32_t,
65 transport_stream_timestamp_offset_ms,
66 100,
67 "A positive value, in milliseconds, by which output timestamps "
68 "are offset to compensate for possible negative timestamps in the "
69 "input. For example, timestamps from ISO-BMFF after adjusted by "
70 "EditList could be negative. In transport streams, timestamps are "
71 "not allowed to be less than zero.");
72ABSL_FLAG(
73 int32_t,
74 default_text_zero_bias_ms,
75 0,
76 "A positive value, in milliseconds. It is the threshold used to "
77 "determine if we should assume that the text stream actually starts "
78 "at time zero. If the first sample comes before default_text_zero_bias_ms, "
79 "then the start will be padded as the stream is assumed to start at zero. "
80 "If the first sample comes after default_text_zero_bias_ms then the start "
81 "of the stream will not be padded as we cannot assume the start time of "
82 "the stream.");
83
84ABSL_FLAG(
85 int64_t,
86 ts_ttx_heartbeat_shift,
87 shaka::kDefaultTtxHeartbeatShift,
88 "For DVB-Teletext in MPEG-2 TS: timing offset (in 90kHz ticks) between "
89 "video PTS timestamps and text segment generation. This compensates for "
90 "the pipeline delay where video is processed ahead of teletext. "
91 "Default is 90000 (1 second). If the value is too large, heartbeat-"
92 "triggered text segments are generated later than video segments. "
93 "If too small, some text cues may be absent in the output.");
94
95ABSL_FLAG(int64_t,
96 start_segment_number,
97 1,
98 "Indicates the startNumber in DASH SegmentTemplate and HLS "
99 "segment name.");