node-av 1.0.3 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/README.md +56 -41
  2. package/dist/api/bitstream-filter.d.ts +180 -123
  3. package/dist/api/bitstream-filter.js +182 -126
  4. package/dist/api/bitstream-filter.js.map +1 -1
  5. package/dist/api/decoder.d.ts +286 -130
  6. package/dist/api/decoder.js +321 -159
  7. package/dist/api/decoder.js.map +1 -1
  8. package/dist/api/encoder.d.ts +254 -158
  9. package/dist/api/encoder.js +326 -298
  10. package/dist/api/encoder.js.map +1 -1
  11. package/dist/api/filter-presets.d.ts +912 -0
  12. package/dist/api/filter-presets.js +1407 -0
  13. package/dist/api/filter-presets.js.map +1 -0
  14. package/dist/api/filter.d.ts +280 -284
  15. package/dist/api/filter.js +435 -509
  16. package/dist/api/filter.js.map +1 -1
  17. package/dist/api/hardware.d.ts +226 -159
  18. package/dist/api/hardware.js +405 -287
  19. package/dist/api/hardware.js.map +1 -1
  20. package/dist/api/index.d.ts +3 -2
  21. package/dist/api/index.js +1 -0
  22. package/dist/api/index.js.map +1 -1
  23. package/dist/api/io-stream.d.ts +65 -61
  24. package/dist/api/io-stream.js +45 -47
  25. package/dist/api/io-stream.js.map +1 -1
  26. package/dist/api/media-input.d.ts +244 -141
  27. package/dist/api/media-input.js +207 -104
  28. package/dist/api/media-input.js.map +1 -1
  29. package/dist/api/media-output.d.ts +206 -128
  30. package/dist/api/media-output.js +212 -129
  31. package/dist/api/media-output.js.map +1 -1
  32. package/dist/api/pipeline.d.ts +168 -38
  33. package/dist/api/pipeline.js +238 -14
  34. package/dist/api/pipeline.js.map +1 -1
  35. package/dist/api/types.d.ts +22 -182
  36. package/dist/api/utilities/audio-sample.d.ts +1 -1
  37. package/dist/api/utilities/image.d.ts +1 -1
  38. package/dist/api/utilities/media-type.d.ts +1 -1
  39. package/dist/api/utilities/pixel-format.d.ts +1 -1
  40. package/dist/api/utilities/sample-format.d.ts +1 -1
  41. package/dist/api/utilities/timestamp.d.ts +1 -1
  42. package/dist/api/utils.d.ts +1 -2
  43. package/dist/api/utils.js +9 -0
  44. package/dist/api/utils.js.map +1 -1
  45. package/dist/{lib → constants}/channel-layouts.d.ts +1 -1
  46. package/dist/constants/channel-layouts.js.map +1 -0
  47. package/dist/{lib → constants}/constants.d.ts +19 -4
  48. package/dist/{lib → constants}/constants.js +15 -1
  49. package/dist/constants/constants.js.map +1 -0
  50. package/dist/constants/decoders.d.ts +609 -0
  51. package/dist/constants/decoders.js +617 -0
  52. package/dist/constants/decoders.js.map +1 -0
  53. package/dist/constants/encoders.d.ts +285 -0
  54. package/dist/constants/encoders.js +298 -0
  55. package/dist/constants/encoders.js.map +1 -0
  56. package/dist/constants/index.d.ts +4 -0
  57. package/dist/constants/index.js +5 -0
  58. package/dist/constants/index.js.map +1 -0
  59. package/dist/index.d.ts +1 -0
  60. package/dist/index.js +2 -0
  61. package/dist/index.js.map +1 -1
  62. package/dist/lib/audio-fifo.d.ts +128 -171
  63. package/dist/lib/audio-fifo.js +130 -173
  64. package/dist/lib/audio-fifo.js.map +1 -1
  65. package/dist/lib/binding.d.ts +7 -5
  66. package/dist/lib/binding.js +5 -0
  67. package/dist/lib/binding.js.map +1 -1
  68. package/dist/lib/bitstream-filter-context.d.ts +139 -184
  69. package/dist/lib/bitstream-filter-context.js +139 -188
  70. package/dist/lib/bitstream-filter-context.js.map +1 -1
  71. package/dist/lib/bitstream-filter.d.ts +69 -55
  72. package/dist/lib/bitstream-filter.js +68 -54
  73. package/dist/lib/bitstream-filter.js.map +1 -1
  74. package/dist/lib/codec-context.d.ts +317 -381
  75. package/dist/lib/codec-context.js +316 -381
  76. package/dist/lib/codec-context.js.map +1 -1
  77. package/dist/lib/codec-parameters.d.ts +161 -171
  78. package/dist/lib/codec-parameters.js +162 -172
  79. package/dist/lib/codec-parameters.js.map +1 -1
  80. package/dist/lib/codec-parser.d.ts +92 -105
  81. package/dist/lib/codec-parser.js +92 -103
  82. package/dist/lib/codec-parser.js.map +1 -1
  83. package/dist/lib/codec.d.ts +328 -217
  84. package/dist/lib/codec.js +392 -218
  85. package/dist/lib/codec.js.map +1 -1
  86. package/dist/lib/dictionary.d.ts +150 -204
  87. package/dist/lib/dictionary.js +159 -213
  88. package/dist/lib/dictionary.js.map +1 -1
  89. package/dist/lib/error.d.ts +97 -131
  90. package/dist/lib/error.js +98 -128
  91. package/dist/lib/error.js.map +1 -1
  92. package/dist/lib/filter-context.d.ts +317 -194
  93. package/dist/lib/filter-context.js +335 -200
  94. package/dist/lib/filter-context.js.map +1 -1
  95. package/dist/lib/filter-graph.d.ts +252 -293
  96. package/dist/lib/filter-graph.js +253 -294
  97. package/dist/lib/filter-graph.js.map +1 -1
  98. package/dist/lib/filter-inout.d.ts +87 -95
  99. package/dist/lib/filter-inout.js +87 -95
  100. package/dist/lib/filter-inout.js.map +1 -1
  101. package/dist/lib/filter.d.ts +93 -111
  102. package/dist/lib/filter.js +94 -112
  103. package/dist/lib/filter.js.map +1 -1
  104. package/dist/lib/format-context.d.ts +321 -429
  105. package/dist/lib/format-context.js +314 -386
  106. package/dist/lib/format-context.js.map +1 -1
  107. package/dist/lib/frame.d.ts +263 -406
  108. package/dist/lib/frame.js +263 -408
  109. package/dist/lib/frame.js.map +1 -1
  110. package/dist/lib/hardware-device-context.d.ts +150 -204
  111. package/dist/lib/hardware-device-context.js +149 -203
  112. package/dist/lib/hardware-device-context.js.map +1 -1
  113. package/dist/lib/hardware-frames-context.d.ts +171 -181
  114. package/dist/lib/hardware-frames-context.js +171 -181
  115. package/dist/lib/hardware-frames-context.js.map +1 -1
  116. package/dist/lib/index.d.ts +2 -3
  117. package/dist/lib/index.js +2 -5
  118. package/dist/lib/index.js.map +1 -1
  119. package/dist/lib/input-format.d.ts +90 -118
  120. package/dist/lib/input-format.js +89 -117
  121. package/dist/lib/input-format.js.map +1 -1
  122. package/dist/lib/io-context.d.ts +210 -242
  123. package/dist/lib/io-context.js +221 -253
  124. package/dist/lib/io-context.js.map +1 -1
  125. package/dist/lib/log.d.ts +86 -120
  126. package/dist/lib/log.js +85 -122
  127. package/dist/lib/log.js.map +1 -1
  128. package/dist/lib/native-types.d.ts +127 -112
  129. package/dist/lib/native-types.js +9 -0
  130. package/dist/lib/native-types.js.map +1 -1
  131. package/dist/lib/option.d.ts +285 -242
  132. package/dist/lib/option.js +310 -250
  133. package/dist/lib/option.js.map +1 -1
  134. package/dist/lib/output-format.d.ts +78 -102
  135. package/dist/lib/output-format.js +77 -101
  136. package/dist/lib/output-format.js.map +1 -1
  137. package/dist/lib/packet.d.ts +173 -241
  138. package/dist/lib/packet.js +172 -241
  139. package/dist/lib/packet.js.map +1 -1
  140. package/dist/lib/rational.d.ts +0 -2
  141. package/dist/lib/rational.js +0 -2
  142. package/dist/lib/rational.js.map +1 -1
  143. package/dist/lib/software-resample-context.d.ts +242 -326
  144. package/dist/lib/software-resample-context.js +242 -326
  145. package/dist/lib/software-resample-context.js.map +1 -1
  146. package/dist/lib/software-scale-context.d.ts +130 -174
  147. package/dist/lib/software-scale-context.js +132 -176
  148. package/dist/lib/software-scale-context.js.map +1 -1
  149. package/dist/lib/stream.d.ts +88 -198
  150. package/dist/lib/stream.js +87 -197
  151. package/dist/lib/stream.js.map +1 -1
  152. package/dist/lib/types.d.ts +1 -1
  153. package/dist/lib/utilities.d.ts +372 -181
  154. package/dist/lib/utilities.js +373 -182
  155. package/dist/lib/utilities.js.map +1 -1
  156. package/install/check.js +0 -1
  157. package/package.json +32 -24
  158. package/release_notes.md +43 -13
  159. package/CHANGELOG.md +0 -8
  160. package/dist/lib/channel-layouts.js.map +0 -1
  161. package/dist/lib/constants.js.map +0 -1
  162. /package/dist/{lib → constants}/channel-layouts.js +0 -0
@@ -1,16 +1,16 @@
1
1
  import { CodecParameters } from './codec-parameters.js';
2
2
  import { Dictionary } from './dictionary.js';
3
3
  import { Rational } from './rational.js';
4
- import type { AVDiscard, AVDisposition, AVStreamEventFlag } from './constants.js';
4
+ import type { AVDiscard, AVDisposition, AVStreamEventFlag } from '../constants/constants.js';
5
5
  import type { NativeStream, NativeWrapper } from './native-types.js';
6
6
  import type { Packet } from './packet.js';
7
7
  /**
8
- * Stream information within a media container.
8
+ * Media stream within a format context.
9
9
  *
10
- * Represents a single stream (video, audio, subtitle, etc.) within a media file.
11
- * Streams are created and managed by FormatContext and contain all the metadata
12
- * and parameters needed to decode or encode the stream. Each stream has its own
13
- * timebase, codec parameters, and metadata.
10
+ * Represents a single stream (video, audio, subtitle, etc.) within a media container.
11
+ * Contains stream-specific information including codec parameters, timing information,
12
+ * metadata, and disposition flags. Each stream in a file has a unique index and may
13
+ * contain packets of compressed data.
14
14
  *
15
15
  * Direct mapping to FFmpeg's AVStream.
16
16
  *
@@ -19,304 +19,194 @@ import type { Packet } from './packet.js';
19
19
  * import { FormatContext, FFmpegError } from 'node-av';
20
20
  * import { AVMEDIA_TYPE_VIDEO, AVMEDIA_TYPE_AUDIO } from 'node-av/constants';
21
21
  *
22
- * // Streams are obtained from FormatContext
22
+ * // Access streams from format context
23
23
  * const formatContext = new FormatContext();
24
- * const ret = await formatContext.openInput('video.mp4', null, null);
25
- * FFmpegError.throwIfError(ret, 'openInput');
24
+ * await formatContext.openInput('video.mp4');
26
25
  *
27
- * const infoRet = await formatContext.findStreamInfo(null);
28
- * FFmpegError.throwIfError(infoRet, 'findStreamInfo');
29
- *
30
- * // Access streams
31
- * const streams = formatContext.streams;
32
- * for (const stream of streams) {
33
- * console.log(`Stream ${stream.index}: ${stream.codecpar.codecType}`);
34
- * console.log(`Time base: ${stream.timeBase.num}/${stream.timeBase.den}`);
35
- *
36
- * // Direct access to codec parameters
26
+ * // Iterate through streams
27
+ * for (let i = 0; i < formatContext.nbStreams; i++) {
28
+ * const stream = formatContext.streams[i];
37
29
  * const codecpar = stream.codecpar;
30
+ *
38
31
  * if (codecpar.codecType === AVMEDIA_TYPE_VIDEO) {
39
- * console.log(`Video: ${codecpar.width}x${codecpar.height}`);
32
+ * console.log(`Video stream ${stream.index}:`);
33
+ * console.log(` Codec: ${codecpar.codecId}`);
34
+ * console.log(` Resolution: ${codecpar.width}x${codecpar.height}`);
35
+ * console.log(` Frame rate: ${stream.avgFrameRate.num}/${stream.avgFrameRate.den}`);
40
36
  * } else if (codecpar.codecType === AVMEDIA_TYPE_AUDIO) {
41
- * console.log(`Audio: ${codecpar.sampleRate}Hz ${codecpar.channels} channels`);
37
+ * console.log(`Audio stream ${stream.index}:`);
38
+ * console.log(` Sample rate: ${codecpar.sampleRate} Hz`);
39
+ * console.log(` Channels: ${codecpar.channels}`);
42
40
  * }
43
41
  * }
44
42
  * ```
45
43
  *
46
- * @see {@link FormatContext} For creating and managing streams
47
- * @see {@link CodecParameters} For codec-specific stream parameters
44
+ * @see [AVStream](https://ffmpeg.org/doxygen/trunk/structAVStream.html) - FFmpeg Doxygen
45
+ * @see {@link FormatContext} For container operations
46
+ * @see {@link CodecParameters} For codec configuration
48
47
  */
49
48
  export declare class Stream implements NativeWrapper<NativeStream> {
50
49
  private native;
51
50
  private _codecpar?;
52
51
  /**
53
- * Constructor is internal - use FormatContext to create streams.
54
- *
55
- * Streams are created and managed by FormatContext.
56
- * For demuxing, streams are created automatically when opening input.
57
- * For muxing, use formatContext.newStream() to create streams.
58
- *
52
+ * @param native - The native stream instance
59
53
  * @internal
60
- *
61
- * @param native - Native AVStream to wrap
62
- *
63
- * @example
64
- * ```typescript
65
- * // Don't create streams directly
66
- * // const stream = new Stream(); // Wrong
67
- *
68
- * // For demuxing: streams are created automatically
69
- * const streams = formatContext.streams; // Correct
70
- *
71
- * // For muxing: use newStream
72
- * const stream = formatContext.newStream(null); // Correct
73
- * ```
74
54
  */
75
55
  constructor(native: NativeStream);
76
56
  /**
77
- * Stream index in the format context.
78
- *
79
- * Zero-based index of this stream in the format context's stream array.
80
- * This is the index used to identify the stream in packets.
81
- *
82
- * Direct mapping to AVStream->index
83
- *
84
- * @readonly
57
+ * Stream index.
85
58
  *
86
- * @example
87
- * ```typescript
88
- * // Find video stream index
89
- * const videoStreamIndex = streams.findIndex(
90
- * s => s.codecpar.codecType === AVMEDIA_TYPE_VIDEO
91
- * );
59
+ * Zero-based index of this stream in the format context.
60
+ * Used to identify packets belonging to this stream.
92
61
  *
93
- * // Check packet's stream
94
- * if (packet.streamIndex === videoStreamIndex) {
95
- * // This packet belongs to the video stream
96
- * }
97
- * ```
62
+ * Direct mapping to AVStream->index.
98
63
  */
99
64
  get index(): number;
100
65
  /**
101
- * Format-specific stream ID.
66
+ * Stream ID.
102
67
  *
103
- * Stream ID as defined by the container format.
104
- * Different from index - this is format-specific.
68
+ * Format-specific stream identifier.
69
+ * May be used by some formats for internal stream identification.
105
70
  *
106
- * Direct mapping to AVStream->id
107
- *
108
- * - decoding: Set by libavformat
109
- * - encoding: Set by the user, replaced by libavformat if left unset
71
+ * Direct mapping to AVStream->id.
110
72
  */
111
73
  get id(): number;
112
74
  set id(value: number);
113
75
  /**
114
- * Codec parameters associated with this stream.
115
- *
116
- * Contains all the parameters needed to set up a codec for this stream,
117
- * including codec ID, dimensions for video, sample rate for audio, etc.
118
- *
119
- * Direct mapping to AVStream->codecpar
76
+ * Codec parameters.
120
77
  *
121
- * - demuxing: Filled by libavformat on stream creation or in findStreamInfo()
122
- * - muxing: Must be filled by the caller before writeHeader()
78
+ * Contains essential codec configuration for this stream.
79
+ * Used to initialize decoders and describe stream properties.
123
80
  *
124
- * @example
125
- * ```typescript
126
- * // For video stream
127
- * stream.codecpar.codecType = AVMEDIA_TYPE_VIDEO;
128
- * stream.codecpar.codecId = AV_CODEC_ID_H264;
129
- * stream.codecpar.width = 1920;
130
- * stream.codecpar.height = 1080;
131
- *
132
- * // For audio stream
133
- * stream.codecpar.codecType = AVMEDIA_TYPE_AUDIO;
134
- * stream.codecpar.codecId = AV_CODEC_ID_AAC;
135
- * stream.codecpar.sampleRate = 48000;
136
- * stream.codecpar.channels = 2;
137
- * ```
138
- *
139
- * @see {@link CodecParameters} For detailed parameter documentation
81
+ * Direct mapping to AVStream->codecpar.
140
82
  */
141
83
  get codecpar(): CodecParameters;
142
84
  set codecpar(value: CodecParameters);
143
85
  /**
144
- * Time base for this stream.
145
- *
146
- * The fundamental unit of time (in seconds) in terms of which frame
147
- * timestamps are represented. For example, a time base of 1/25 means
148
- * each time unit is 1/25 of a second (40ms).
149
- *
150
- * Direct mapping to AVStream->time_base
151
- *
152
- * - decoding: Set by libavformat
153
- * - encoding: May be set before writeHeader() as a hint to the muxer.
154
- * The muxer will overwrite with the actual timebase used.
155
- *
156
- * @example
157
- * ```typescript
158
- * import { Rational } from 'node-av';
159
- *
160
- * // Common time bases
161
- * stream.timeBase = new Rational(1, 90000); // 90kHz (MPEG-TS)
162
- * stream.timeBase = new Rational(1, 1000); // milliseconds
163
- * stream.timeBase = new Rational(1, 25); // 25 fps video
86
+ * Stream time base.
164
87
  *
165
- * // Convert PTS to seconds
166
- * const pts = 45000n;
167
- * const seconds = Number(pts) * stream.timeBase.toDouble();
168
- * ```
88
+ * Unit of time for timestamps in this stream.
89
+ * All timestamps (PTS/DTS) are in units of this time base.
169
90
  *
170
- * @see {@link Rational} For time base representation
91
+ * Direct mapping to AVStream->time_base.
171
92
  */
172
93
  get timeBase(): Rational;
173
94
  set timeBase(value: Rational);
174
95
  /**
175
- * Decoding: pts of the first frame of the stream in presentation order, in stream time base.
96
+ * Start time.
176
97
  *
177
- * Direct mapping to AVStream->start_time
98
+ * First timestamp of the stream in stream time base units.
99
+ * AV_NOPTS_VALUE if unknown.
178
100
  *
179
- * Only set this if you are absolutely 100% sure that the value you set
180
- * it to really is the pts of the first frame.
181
- * This may be undefined (AV_NOPTS_VALUE).
182
- *
183
- * @note The ASF header does NOT contain a correct start_time the ASF
184
- * demuxer must NOT set this.
101
+ * Direct mapping to AVStream->start_time.
185
102
  */
186
103
  get startTime(): bigint;
187
104
  set startTime(value: bigint);
188
105
  /**
189
- * Decoding: duration of the stream, in stream time base.
190
- *
191
- * Direct mapping to AVStream->duration
106
+ * Stream duration.
192
107
  *
193
- * If a source file does not specify a duration, but does specify
194
- * a bitrate, this value will be estimated from bitrate and file size.
108
+ * Total duration in stream time base units.
109
+ * AV_NOPTS_VALUE if unknown.
195
110
  *
196
- * Encoding: May be set by the caller before avformat_write_header() to
197
- * provide a hint to the muxer about the estimated duration.
111
+ * Direct mapping to AVStream->duration.
198
112
  */
199
113
  get duration(): bigint;
200
114
  set duration(value: bigint);
201
115
  /**
202
- * Number of frames in this stream if known or 0.
116
+ * Number of frames.
203
117
  *
204
- * Direct mapping to AVStream->nb_frames
118
+ * Total number of frames in this stream.
119
+ * 0 if unknown.
120
+ *
121
+ * Direct mapping to AVStream->nb_frames.
205
122
  */
206
123
  get nbFrames(): bigint;
207
124
  set nbFrames(value: bigint);
208
125
  /**
209
- * Stream disposition - a combination of AV_DISPOSITION_* flags.
210
- *
211
- * Direct mapping to AVStream->disposition
126
+ * Stream disposition flags.
212
127
  *
213
- * - demuxing: set by libavformat when creating the stream or in
214
- * avformat_find_stream_info().
215
- * - muxing: may be set by the caller before avformat_write_header().
128
+ * Combination of AV_DISPOSITION_* flags indicating stream properties
129
+ * (e.g., default, forced subtitles, visual impaired, etc.).
216
130
  *
217
- * Common flags:
218
- * - AV_DISPOSITION_DEFAULT: default track
219
- * - AV_DISPOSITION_ATTACHED_PIC: stream is an attached picture (album art)
220
- * - AV_DISPOSITION_CAPTIONS: stream contains captions
221
- * - AV_DISPOSITION_DESCRIPTIONS: stream contains descriptions
222
- * - AV_DISPOSITION_METADATA: stream contains metadata
131
+ * Direct mapping to AVStream->disposition.
223
132
  */
224
133
  get disposition(): AVDisposition;
225
134
  set disposition(value: AVDisposition);
226
135
  /**
227
- * Selects which packets can be discarded at will and do not need to be demuxed.
136
+ * Discard setting.
228
137
  *
229
- * Direct mapping to AVStream->discard
138
+ * Indicates which packets can be discarded during demuxing.
139
+ * Used to skip non-essential packets for performance.
230
140
  *
231
- * - AVDISCARD_NONE: discard nothing
232
- * - AVDISCARD_DEFAULT: discard useless packets like 0 size packets in avi
233
- * - AVDISCARD_NONREF: discard all non reference
234
- * - AVDISCARD_BIDIR: discard all bidirectional frames
235
- * - AVDISCARD_NONINTRA: discard all non intra frames
236
- * - AVDISCARD_NONKEY: discard all frames except keyframes
237
- * - AVDISCARD_ALL: discard all
141
+ * Direct mapping to AVStream->discard.
238
142
  */
239
143
  get discard(): AVDiscard;
240
144
  set discard(value: AVDiscard);
241
145
  /**
242
- * Sample aspect ratio (0 if unknown).
146
+ * Sample aspect ratio.
243
147
  *
244
- * Direct mapping to AVStream->sample_aspect_ratio
148
+ * Pixel aspect ratio for video streams.
149
+ * 0/1 if unknown or not applicable.
245
150
  *
246
- * This is the width of a pixel divided by the height of the pixel.
247
- * - encoding: Set by user.
248
- * - decoding: Set by libavformat.
151
+ * Direct mapping to AVStream->sample_aspect_ratio.
249
152
  */
250
153
  get sampleAspectRatio(): Rational;
251
154
  set sampleAspectRatio(value: Rational);
252
155
  /**
253
- * Average framerate.
156
+ * Average frame rate.
254
157
  *
255
- * Direct mapping to AVStream->avg_frame_rate
158
+ * Average framerate of the stream.
159
+ * 0/1 if unknown or variable frame rate.
256
160
  *
257
- * - demuxing: May be set by libavformat when creating the stream or in
258
- * avformat_find_stream_info().
259
- * - muxing: May be set by the caller before avformat_write_header().
161
+ * Direct mapping to AVStream->avg_frame_rate.
260
162
  */
261
163
  get avgFrameRate(): Rational;
262
164
  set avgFrameRate(value: Rational);
263
165
  /**
264
- * Real base framerate of the stream.
166
+ * Real frame rate.
265
167
  *
266
- * Direct mapping to AVStream->r_frame_rate
168
+ * Real base frame rate of the stream.
169
+ * This is the lowest common multiple of all frame rates in the stream.
267
170
  *
268
- * This is the lowest framerate with which all timestamps can be
269
- * represented accurately (it is the least common multiple of all
270
- * framerates in the stream). Note, this value is just a guess!
271
- * For example, if the time base is 1/90000 and all frames have either
272
- * approximately 3600 or 1800 timer ticks, then r_frame_rate will be 50/1.
171
+ * Direct mapping to AVStream->r_frame_rate.
273
172
  */
274
173
  get rFrameRate(): Rational;
275
174
  set rFrameRate(value: Rational);
276
175
  /**
277
- * Metadata dictionary for this stream.
176
+ * Stream metadata.
278
177
  *
279
- * Direct mapping to AVStream->metadata
178
+ * Dictionary containing stream-specific metadata
179
+ * (e.g., language, title, encoder settings).
280
180
  *
281
- * Contains key-value pairs of metadata.
181
+ * Direct mapping to AVStream->metadata.
282
182
  */
283
183
  get metadata(): Dictionary | null;
284
184
  set metadata(value: Dictionary | null);
285
185
  /**
286
- * For streams with AV_DISPOSITION_ATTACHED_PIC disposition, this packet
287
- * will contain the attached picture (e.g., album art).
186
+ * Attached picture.
288
187
  *
289
- * Direct mapping to AVStream->attached_pic
188
+ * For streams with AV_DISPOSITION_ATTACHED_PIC set,
189
+ * contains the attached picture (e.g., album art).
290
190
  *
291
- * - decoding: set by libavformat, must not be modified by the caller.
292
- * - encoding: unused
293
- * @readonly
191
+ * Direct mapping to AVStream->attached_pic.
294
192
  */
295
193
  get attachedPic(): Packet | null;
296
194
  /**
297
- * Flags indicating events happening on the stream, a combination of
298
- * AVSTREAM_EVENT_FLAG_*.
195
+ * Event flags.
299
196
  *
300
- * Direct mapping to AVStream->event_flags
197
+ * Flags indicating events that happened to the stream.
198
+ * Used for signaling format changes.
301
199
  *
302
- * - demuxing: may be set by the demuxer in avformat_open_input(),
303
- * avformat_find_stream_info() and av_read_frame(). Flags must be cleared
304
- * by the user once the event has been handled.
305
- * - muxing: may be set by the user after avformat_write_header() to
306
- * indicate a user-triggered event. The muxer will clear the flags for
307
- * events it has handled in av_[interleaved]_write_frame().
308
- *
309
- * Flags:
310
- * - AVSTREAM_EVENT_FLAG_METADATA_UPDATED: metadata was updated
311
- * - AVSTREAM_EVENT_FLAG_NEW_PACKETS: new packets were read for this stream
200
+ * Direct mapping to AVStream->event_flags.
312
201
  */
313
202
  get eventFlags(): AVStreamEventFlag;
314
203
  set eventFlags(value: AVStreamEventFlag);
315
204
  /**
316
- * Get the native FFmpeg AVStream pointer.
205
+ * Get the underlying native Stream object.
206
+ *
207
+ * @returns The native Stream binding object
317
208
  *
318
- * @internal For use by other wrapper classes
319
- * @returns The underlying native stream object
209
+ * @internal
320
210
  */
321
211
  getNative(): NativeStream;
322
212
  }