Commit Graph
612 Commits
Author SHA1 Message Date
96d0d9fb22 Fix tkhd issue for Apple ecosystem compatibility (#391)
* fix: ensure at least one track per type is enabled for Apple ecosystem compatibility

* Add ensureOneEnabledTrack() to ISOBMFF muxer

* Add test case

---------

Co-authored-by: Vanilagy <[email protected]>
2026-06-01 22:55:02 +02:00
Vanilagy c6c768d93e Omit 'signal', clarify docs for reading ranged resources (#387) 2026-06-01 22:00:39 +02:00
Vanilagy 441eea38b9 CustomSource -> StreamSource 2026-05-24 15:48:01 +02:00
Vanilagy ef27d73405 Fix FinalizationRegistry being able to prevent Inputs from being GCd in some cases (fixes #367) 2026-05-24 14:45:13 +02:00
Vanilagy 41a331b0dc Cảm ơn 2026-05-22 11:46:33 +02:00
Vanilagy 85a80972a0 Make MP3 next frame location more strict for better recovery (fixes #382), fix Date timezone for ID3 tags 2026-05-22 11:31:26 +02:00
Vanilagy 0c455236da Add first encoded packet key frame check (fixes #365) 2026-05-19 16:15:17 +02:00
Sturlen aa38385cae fix(id3v2reader): use correct header size in readU24 2026-05-14 13:54:51 +02:00
Vanilagy d731037f6f Simplify PCM regex (closes #380) 2026-05-14 11:44:13 +02:00
Vanilagy 045f82584c Yes it can! 2026-05-13 18:59:58 +02:00
Vanilagy a0574fa09a Fix decoded audio always starting at 0, fix startTimestamp=0 for ranged media iterators (fixes #370) 2026-05-13 18:54:45 +02:00
Vanilagy 4c7b6d939b Yes 2026-05-13 17:31:52 +02:00
David P.andGitHub 09a8ff0166 Merge pull request #369 from Theredbt/fix/recognize-sidx-mp4-segment
fix(input-format): recognise CMAF segments that start with sidx
2026-05-13 17:29:28 +02:00
Vanilagy 4047038113 Add doc block clarification (fixes #368) 2026-05-13 17:27:36 +02:00
Vanilagy 292189e3d4 Add toAvFrame, NodeAv* -> Av*, add server README, fix track synchronizer in conversion, increase default cache size for ReadableStreamSource 2026-05-13 15:26:13 +02:00
Vanilagy 5599e52a1a Fix async race condition in transparency code, reduce HEVC conversion duration 2026-05-12 00:24:03 +02:00
Vanilagy 81531cc510 Fix some bugs & polish edge cases 2026-05-11 23:50:06 +02:00
Vanilagy d8c8606341 Merge branch 'main' into server 2026-05-11 21:36:38 +02:00
Vanilagy 1bf200894c Add CPU path for transparent encoding and decoding, add transparency support to FFmpeg-backed VP9 decoder and encoder 2026-05-11 21:33:29 +02:00
Vanilagy a89d715524 Add VideoSample.transform(), add custom transformer functions, ditch CanvasSink path in Conversion API, add libavfilter-based VideoSample transformation 2026-05-11 15:57:51 +02:00
Theredbt b48eb75565 fix(input-format): recognise CMAF segments that start with sidx
Sibling case to #308: when a fragmented MP4 segment begins with a sidx
box (no ftyp/styp/moof at the file root), Mp4InputFormat._canReadInput
returned false, causing Input.getTracks() to throw
UnsupportedInputFormatError.

This shape is standard in CMAF when the DASH on-demand profile is used
or when HLS playlists are derived from one (Vimeo's vod-adaptive-ak CDN,
for example). The segment is still a valid ISOBMFF fragment — the sidx
just sits before the moof.

Adds 'sidx' alongside the existing 'moof' check so the format probe
accepts these segments, and a focused regression test that fails on
the previous behaviour.
2026-05-11 04:22:46 +01:00
Vanilagy 3ae73a7c5e Loosen constraint on format returned by toRgbSample, fix X->A conversio, fix tests 2026-05-10 17:31:56 +02:00
Vanilagy 1e200edc83 Implement audio decoder & encoder 2026-05-10 16:37:25 +02:00
Vanilagy 3cde68e0ae Fix AudioResampler emitting timestamps before startTimestamp (fixes #366) 2026-05-09 00:40:25 +02:00
Vanilagy ab9958234a Change VideoSampleResource interface, validate return values, add more proper VideoSample.copyTo() logic, fix decoder/encoder color space issues 2026-05-08 19:37:41 +02:00
Vanilagy fff09411e6 Fixed negative timestamps occurring with live media (fixes #364) 2026-05-07 11:11:37 +02:00
Vanilagy f5bd540863 Add the video portion of @mediabunny/server 2026-05-05 23:38:14 +02:00
Vanilagy 6d9fb30c29 Fix things that broke in the merge 2026-05-04 17:58:05 +02:00
Vanilagy 2e933ee5fc Merge branch 'main' into sample-resources 2026-05-04 17:23:45 +02:00
Vanilagy 47ad5c6806 Add BlobSourceOptions.useStreamReader (#179) 2026-05-04 14:20:21 +02:00
Vanilagy 9ed21bf9c6 Fix behavior with files with invalid pasp box (with num & den === 0) (fixes #362) 2026-05-02 14:27:25 +02:00
Vanilagy 782d3e134b Use edit lists to model non-zero start timestamps for regular MP4 (fixes #336); fix MP4 PCM logic breaking down with approximate packet timestamps 2026-04-30 10:32:42 +02:00
Vanilagy f3dec587fd Make FLAC encoder bit depth depend on input sample format, add sampleFormat audio transformation option, fix incorrect bitrate validation for FLAC (closes #357) 2026-04-29 16:27:20 +02:00
Vanilagy 2d49122277 Sanitize initial HEVC packet to avoid Chromium's validation logic from tripping up (#314) 2026-04-29 11:37:56 +02:00
Vanilagy e1dd95086a Add special .node.cjs variant for CJS support 2026-04-28 15:33:51 +02:00
Vanilagy ff46a274b1 Switch back to dynamic import, leave package.json unchanged though 2026-04-28 14:36:48 +02:00
Vanilagy bf9e360587 Revert back to static import of fs, don't like to CJS bundles in package.json 2026-04-28 14:24:58 +02:00
Vanilagy 1fd99b5015 Fix Source assertion failure 2026-04-28 14:09:18 +02:00
Vanilagy 9a1b8b2602 Add timestampBase option for live MediaStreamTrack sources 2026-04-27 19:38:45 +02:00
Vanilagy c89e7429f7 Fix FilePathSource/FilePathTarget not working in server-side environments using CJS (closes #360) 2026-04-27 18:29:52 +02:00
Vanilagy cf8cea2957 Fix attribute parsing bug 2026-04-27 17:12:28 +02:00
Vanilagy 9fdf263482 Merge branch 'main' into hls 2026-04-24 20:56:59 +02:00
Vanilagy bcde2770d1 Add null terminator to TXXX 2026-04-24 20:55:34 +02:00
Vanilagy 97f6b35cda Add special TXXX handling for ID3v2 2026-04-24 19:42:15 +02:00
Vanilagy 1ca3e48f48 Fix? 2026-04-24 19:06:45 +02:00
Vanilagy 5f8978271e Clarify 2026-04-24 19:02:35 +02:00
Vanilagy 5ee78c6480 Add pssh box parsing and expose them in resolveKey 2026-04-24 19:01:25 +02:00
Vanilagy 66997ddd16 Fix file compression example, add processedTime parameter to onProgress for Conversion API 2026-04-24 14:33:19 +02:00
b05cdbe7e0 fix: two long-running HLS transcode issues (#355)
* fix: release targets from Output._targets on finalize

Long-running HLS transcodes leak memory. Every finalized BufferTarget
stays in _targets until the outer Output closes, pinning its buffer.
Writer.finalize() already does this cleanup for writer-based flows;
extend it to buffer-finalize paths via the public 'finalized' event.

* fix: ReadOrchestrator LRU eviction picks only drained workers

assert(pendingSlices.length === 0) fires under heavy concurrent reads
(e.g. multi-rendition HLS decode from BlobSource). LRU filter only
checked !running; workers with queued slices could be evicted.
Add pendingSlices.length === 0 to the filter.

* fix: export AppendOnlyStreamTarget from index

Missing from the re-export; public docs import it by name.

* fix: join HLS init segment path with root + playlist path

Init path went through _getTarget bare; segments got joined with rootPath + playlist.path. Playlist-relative URI then can't resolve when the playlist lives in a subdirectory.

* Fix targets not being cleaned up, fix paused workers with remaining pending slices, modify doc block, fixed isRoot not being changed on proxied requests

---------

Co-authored-by: Vanilagy <[email protected]>
2026-04-23 14:37:56 +02:00
Vanilagy 493ef50820 Add support for SAMPLE-AES and SAMPLE-AES-CTR decryption, add "Common Encryption" support to ISOBMFF demuxer, add InputFormatOptions, rewrite ISOBMFF track codec resolution 2026-04-22 16:54:49 +02:00