Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Vanilagy/mediabunny
/ functions
Functions
2,168 in github.com/Vanilagy/mediabunny
⨍
Functions
2,168
◇
Types & classes
354
↓ 739 callers
Function
assert
(x: unknown)
src/misc.ts:12
↓ 279 callers
Method
add
(audioSample: AudioSample)
src/resample.ts:173
↓ 244 callers
Method
readBits
(n: number)
shared/bitstream.ts:29
↓ 191 callers
Method
get
(name: string)
src/hls/hls-misc.ts:64
↓ 158 callers
Method
slice
Creates a new subslice of this slice whose byte range must be contained within this slice.
src/reader.ts:199
↓ 133 callers
Method
skipBits
(n: number)
shared/bitstream.ts:72
↓ 115 callers
Method
start
* Starts the creation of the output file. This method should be called after all tracks have been added. Only after * the output has started can med
src/output.ts:763
↓ 109 callers
Method
finalize
* Finalizes the output file. This method must be called after all media samples across all tracks have been added. * Once the Promise returned by th
src/output.ts:868
↓ 95 callers
Method
getCodec
()
src/input-track.ts:40
↓ 94 callers
Method
addVideoTrack
Adds a video track to the output with the given source. Can only be called before the output is started.
src/output.ts:598
↓ 94 callers
Method
getPrimaryAudioTrack
* Returns the primary audio track of this input file, or null if there are no audio tracks. * * Multiple factors determine which track is consider
src/input.ts:454
↓ 94 callers
Function
u32
(value: number)
src/isobmff/isobmff-boxes.ts:161
↓ 88 callers
Function
readU32Be
(slice: FileSlice)
src/reader.ts:283
↓ 84 callers
Function
readExpGolomb
(bitstream: Bitstream)
src/misc.ts:46
↓ 80 callers
Method
copyTo
* Copies this video sample's pixel data to an ArrayBuffer or ArrayBufferView. * @returns The byte layout of the planes of the copied data.
src/sample.ts:775
↓ 79 callers
Method
getPrimaryVideoTrack
* Returns the primary video track of this input file, or null if there are no video tracks. * * Multiple factors determine which track is consider
src/input.ts:430
↓ 78 callers
Method
skip
(n: number)
src/mpeg-ts/mpeg-ts-demuxer.ts:1973
↓ 74 callers
Method
writeBits
(n: number, value: number)
shared/bitstream.ts:44
↓ 67 callers
Method
addAudioTrack
Adds an audio track to the output with the given source. Can only be called before the output is started.
src/output.ts:627
↓ 67 callers
Method
requestSlice
(start: number, length: number)
src/reader.ts:29
↓ 64 callers
Method
getDecoderConfig
()
src/input-track.ts:54
↓ 64 callers
Function
readBytes
(slice: FileSlice, length: number)
src/reader.ts:224
↓ 63 callers
Function
readU8
(slice: FileSlice)
src/reader.ts:233
↓ 63 callers
Method
write
Writes the given data to the target, at the current position.
src/writer.ts:36
↓ 58 callers
Function
box
(type: string, contents?: NestedNumberArray, children?: (Box | null)[])
src/isobmff/isobmff-boxes.ts:261
↓ 58 callers
Method
packets
* Creates an async iterator that yields the packets in this track in decode order. To enable fast iteration, this * method will intelligently preloa
src/media-sink.ts:307
↓ 57 callers
Method
close
()
test/browser/custom-sample-resources.test.ts:69
↓ 55 callers
Function
u16
(value: number)
src/isobmff/isobmff-boxes.ts:146
↓ 54 callers
Method
trim
* Returns a new {@link AudioSample} containing only the frames in the range [startSample, endSample). Both bounds * must lie within this sample's ra
src/sample.ts:2732
↓ 53 callers
Method
encode
(audioSample: AudioSample)
packages/ac3/src/encoder.ts:82
↓ 53 callers
Function
videoSource
(codec: VideoCodec = 'avc')
test/node/hls-output.test.ts:29
↓ 51 callers
Method
acquire
()
src/misc.ts:177
↓ 51 callers
Method
getPos
Returns the current position.
src/writer.ts:50
↓ 51 callers
Method
init
({ key, iv }: Aes128CbcContextInit)
src/aes.ts:103
↓ 49 callers
Method
allocationSize
* Returns the number of bytes required to hold this video sample's pixel data.
src/sample.ts:749
↓ 49 callers
Method
decode
(packet: EncodedPacket)
src/media-sink.ts:988
↓ 48 callers
Function
toDataView
(source: AllowSharedBufferSource)
src/misc.ts:91
↓ 47 callers
Method
getFirstPacket
(options: PacketRetrievalOptions)
src/input-track.ts:57
↓ 46 callers
Method
computeDuration
* Computes the duration of the input file, in seconds. More precisely, returns the largest end timestamp among * all tracks. * * Optionally, you
src/input.ts:357
↓ 46 callers
Function
promiseWithResolvers
()
src/misc.ts:277
↓ 45 callers
Method
getNumberOfChannels
()
src/input-track.ts:796
↓ 45 callers
Method
on
Registers a listener for a log event. Returns a function that, when called, removes the listener again.
src/logging.ts:86
↓ 44 callers
Method
flush
Signals to the writer that it may be time to flush.
src/writer.ts:55
↓ 44 callers
Method
getSampleRate
()
src/input-track.ts:797
↓ 44 callers
Function
toUint8Array
(source: AllowSharedBufferSource)
src/misc.ts:81
↓ 43 callers
Method
getTracks
* Returns the list of all tracks of this input file in the order in which they appear in the file. An optional * query can be provided.
src/input.ts:398
↓ 42 callers
Method
getFirstTimestamp
* Returns the timestamp at which the input file starts. More precisely, returns the smallest starting timestamp * among all tracks. * * Optional
src/input.ts:331
↓ 42 callers
Function
joinPaths
(basePath: FilePath, relativePath: FilePath)
src/misc.ts:834
↓ 41 callers
Method
_warn
@internal
src/logging.ts:104
↓ 41 callers
Function
readUnsignedInt
(slice: FileSlice, width: number)
src/matroska/ebml.ts:539
↓ 39 callers
Function
binarySearchLessOrEqual
(arr: T[], key: number, valueGetter: (x: T) => number)
src/misc.ts:251
↓ 39 callers
Method
getPacket
(timestamp: number, options: PacketRetrievalOptions)
src/input-track.ts:58
↓ 38 callers
Method
close
()
src/media-source.ts:977
↓ 36 callers
Method
seek
Sets the current position for future writes to a new one.
src/writer.ts:45
↓ 35 callers
Function
fullBox
( type: string, version: number, flags: number, contents?: NestedNumberArray, children?: Box[], )
src/isobmff/isobmff-boxes.ts:268
↓ 33 callers
Function
audioSource
(codec: AudioCodec = 'aac')
test/node/hls-output.test.ts:30
↓ 33 callers
Method
delegate
If the backing track is already present, delegate synchronously; otherwise, hydrate first.
src/segmented-input.ts:282
↓ 33 callers
Method
execute
* Executes the conversion process. Resolves once conversion is complete. * * Will throw if `isValid` is `false`.
src/conversion.ts:1048
↓ 33 callers
Method
getName
()
src/input-track.ts:42
↓ 31 callers
Method
split
(sourceFrame: VideoFrame)
src/media-source.ts:933
↓ 30 callers
Method
close
* Closes this video sample, releasing held resources. Video samples should be closed as soon as they are not * needed anymore.
src/sample.ts:725
↓ 30 callers
Method
getDurationFromMetadata
(options: DurationMetadataRequestOptions)
src/input-track.ts:51
↓ 29 callers
Function
expectColor
(actual: number[], expected: number[], tolerance = 4)
test/node/server-extension.test.ts:1185
↓ 29 callers
Function
getColorAt
(rgba: Uint8Array, width: number, x: number, y: number)
test/node/server-extension.test.ts:1180
↓ 28 callers
Function
ascii
(text: string, nullTerminated = false)
src/isobmff/isobmff-boxes.ts:223
↓ 27 callers
Method
free
* Frees the ref, decrementing the source's internal reference count. If the source's internal reference count * reaches zero, it gets disposed. To c
src/source.ts:261
↓ 27 callers
Method
getCodedHeight
()
src/input-track.ts:500
↓ 27 callers
Method
getCodedWidth
()
src/input-track.ts:499
↓ 27 callers
Method
getFormat
()
test/browser/custom-sample-resources.test.ts:18
↓ 27 callers
Method
getNextPacket
(packet: EncodedPacket, options: PacketRetrievalOptions)
src/input-track.ts:59
↓ 26 callers
Function
last
(arr: T[])
src/misc.ts:37
↓ 25 callers
Method
close
()
src/media-sink.ts:1374
↓ 25 callers
Method
requestSliceRange
(start: number, minLength: number, maxLength: number)
src/reader.ts:67
↓ 25 callers
Function
setUpSegmentationEnvironment
(options: { video?: boolean; audio?: boolean; } = {})
test/node/hls-output.test.ts:815
↓ 24 callers
Method
clone
Clones this video sample.
src/sample.ts:663
↓ 24 callers
Function
intoTimescale
(timeInSeconds: number, timescale: number, round = true)
src/isobmff/isobmff-muxer.ts:163
↓ 24 callers
Method
readContiguousElements
(slice: FileSlice, stopIds?: number[])
src/matroska/matroska-demuxer.ts:923
↓ 24 callers
Function
requireSync
(value: MaybePromise<T>, getterName: string, asyncName: string)
src/input-track.ts:461
↓ 23 callers
Method
getDisplayHeight
Returns the display height of the track's frames in pixels, after aspect ratio adjustment and rotation.
src/input-track.ts:679
↓ 23 callers
Method
getDisposition
()
src/input-track.ts:47
↓ 23 callers
Function
readAscii
(slice: FileSlice, length: number)
src/reader.ts:370
↓ 22 callers
Function
encodeFrames
( encodingConfig: ConstructorParameters<typeof VideoSampleSource>[0], frames: { width: number; height: n
test/browser/media-sources.test.ts:503
↓ 22 callers
Method
getDisplayWidth
Returns the display width of the track's frames in pixels, after aspect ratio adjustment and rotation.
src/input-track.ts:648
↓ 22 callers
Method
getMetadataTags
* Returns descriptive metadata tags about the media file, such as title, author, date, cover art, or other * attached files.
src/input.ts:505
↓ 22 callers
Function
u8
(value: number)
src/isobmff/isobmff-boxes.ts:142
↓ 20 callers
Function
clamp
(value: number, min: number, max: number)
src/misc.ts:430
↓ 20 callers
Function
readU16Be
(slice: FileSlice)
src/reader.ts:247
↓ 20 callers
Method
run
* Schedules an async function to be run. If the maximum allowed level of parallelism has not yet been reached, * the function will be executed immed
src/misc.ts:1304
↓ 19 callers
Method
_error
@internal
src/logging.ts:95
↓ 19 callers
Method
dispose
* Disposes this input and frees connected resources. When an input is disposed, ongoing read operations will be * canceled, all future read operatio
src/input.ts:518
↓ 19 callers
Function
encodeDecodeTest
( codec: AudioCodec, extraConfig: Partial<AudioEncoderConfig>, onPacket: (packet: EncodedPacket, meta: E
test/node/server-extension.test.ts:1688
↓ 18 callers
Function
assertNever
(x: never)
src/misc.ts:340
↓ 18 callers
Method
getKeyPacket
(timestamp: number, options: PacketRetrievalOptions)
src/input-track.ts:60
↓ 18 callers
Method
writeBox
(box: Box)
src/isobmff/isobmff-boxes.ts:84
↓ 16 callers
Function
addCommentTag
(key: string, value: string)
src/codec-data.ts:2650
↓ 16 callers
Method
getSample
* Retrieves the video sample (frame) corresponding to the given timestamp, in seconds. More specifically, returns * the last video sample (in presen
src/media-sink.ts:1717
↓ 16 callers
Method
hydrate
()
src/segmented-input.ts:250
↓ 16 callers
Method
samples
* Creates an async iterator that yields the video samples (frames) of this track in presentation order. This method * will intelligently pre-decode
src/media-sink.ts:1734
↓ 16 callers
Method
startTrackingWrites
()
src/writer.ts:106
↓ 16 callers
Method
writeU32
(value: number)
src/wave/riff-writer.ts:22
next →
1–100 of 2,168, ranked by callers