Commit Graph
262 Commits
Author SHA1 Message Date
Vanilagy dc068a0aa8 Add computeFrameRateMetrics and heuristics to determine a video's true frame rate 2026-08-12 16:10:28 +02:00
Vanilagy e9d7bc4e83 Bump minor, document single file mode special case 2026-08-08 17:10:33 +02:00
c3df2a24e5 Add custom quality factors and quantizer bitrate mode (#448)
* Add custom quality factors and quantizer bitrate mode (closes #327)

* Fix quantizer mode fallback and per-frame quantizer edge cases

* Clean up quantizer mode tests

* Quantizer implementation

* Add quality tests

* Improve conversion codec error message, make test more lenient

* Add quantizer support blog post

---------

Co-authored-by: Vanilagy <[email protected]>
2026-07-30 17:24:59 +02:00
Vanilagy 7ff06c3f65 Re-enable lastUpdated, add lastUpdated logic to API doc generator 2026-07-22 20:25:37 +02:00
Vanilagy ae5a5838d6 Add ability to pause conversions or step them deliberately 2026-07-22 15:30:37 +02:00
f41eef0937 Add composable conversions
* Add non-owning conversions via ConversionOptions.ownsOutput

A conversion with ownsOutput: false only adds tracks to the output and
drives their media data; starting, finalizing, and metadata tags remain
the caller's responsibility. This lets multiple conversions and
directly-added user tracks compose on a single Output (see upstream
issue #436).

- ownsOutput: false allows a pre-populated output (state must still be
  'pending') and seeds track-capacity accounting from existing tracks
- execute() requires the output to be started and never finalizes it
- cancel() closes only the conversion's own sources, releasing internal
  synchronizer waiters, and leaves the output usable
- tags cannot be combined with ownsOutput: false
- isValid requires at least one contributed track instead of the
  format's minimum track counts

Prototype for API discussion; default (owning) behavior is unchanged.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AJdfnbY9AFh9i9dKgtrj6E

* Add external-audio example using a non-owning conversion

Demonstrates composing a user-owned audio track (synthesized voiceover
via OfflineAudioContext + AudioBufferSource) onto a picked video with
Conversion.init({ ownsOutput: false }), including progress reporting
and playback/download of the result.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AJdfnbY9AFh9i9dKgtrj6E

* Release synchronizer waiters when canceling during output finalization

A non-owning conversion's cancel() previously no-oped entirely when the
output (owned by someone else) was already finalizing or finalized,
leaving pump loops parked in the track synchronizer and hanging
execute() forever. Now it still marks the conversion canceled and
releases parked waiters in that state, without force-closing sources
(finalization owns flushing them at that point).

Also adds coverage: non-owning onProgress monotonicity, canceling one
of two sibling conversions, capacity seeding across sequential inits,
exact metadata exclusivity, and cancel-before-execute.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AJdfnbY9AFh9i9dKgtrj6E

* Document non-owning conversions on the converting-media-files guide page

Adds the doc section requested in #436: what ownsOutput: false does, the
required choreography (add tracks -> output.start() before execute() ->
run the conversion concurrently with your own sources -> finalize), the
cancellation split (conversion.cancel() leaves the output alive; cancel
both for a full abort and tear the output down on error paths), isValid
semantics in this mode, and the tags restriction with the
setMetadataTags() alternative. Also cross-links the fresh-output rule to
the new section. VitePress build passes with dead-link checking on.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* Clean up conversion logic, add Output.tracks and .hasEnoughTracks(), move new conversion tests around, remove external audio example

* non-owning -> composable, and update docs

* Update

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: Vanilagy <[email protected]>
2026-07-22 08:42:19 +00:00
Vanilagy 9180af799d Oops 2026-07-07 21:27:05 +02:00
Vanilagy b8d5cc5b36 Bump patch, remove Ponder :( 2026-07-07 21:17:06 +02:00
Viktor SzépeandGitHub 6812cf1643 Fix typos in source, tests, and docs (#430)
* Fix typos in source, tests, and docs

* Fix introduction guide typos
2026-07-02 09:33:43 +02:00
Vanilagy e851120bfe Add PhotoCircle bronze sponsor 2026-07-01 18:11:01 +02:00
Vanilagy 0480ecbd3a Bump TurboRes version, mention response headers in README, bump patch 2026-07-01 15:27:36 +02:00
Vanilagy 7d89c8de2d Add ProRes encode and decode support to @mediabunny/server 2026-06-30 21:40:58 +02:00
Vanilagy 8ae0f9d09e Implement @mediabunny/prores extension, add onError callbacks to custom coders, fix visibleRect bug in VideoSample 2026-06-29 17:15:10 +02:00
Vanilagy cdc2ef63dd Add Logging singleton to manually control Mediabunny's console output (fixes #415) 2026-06-18 19:32:18 +02:00
Vanilagy 5b4a5db1a5 Add HlsInputFormatOptions.offsetTimestampsByDateTime option, add InputTrack.getUnixTimeForTimestamp() 2026-06-16 16:32:53 +02:00
Vanilagy b4a6757739 Fix field typo 2026-06-16 13:43:03 +02:00
4affad934e Add per-sink decoder preferences (hardwareAcceleration, optimizeForLatency) (#406)
* Add per-sink decoder preferences to VideoSampleSink and CanvasSink

Adds an optional VideoSinkDecoderOptions ({ hardwareAcceleration,
optimizeForLatency }) parameter to VideoSampleSink, exposed on CanvasSink
via options.decoderOptions, applied to the decoder config before the
VideoDecoderWrapper is constructed.

Motivation: applications that run many sinks concurrently (multi-track
video editors) need to manage hardware decode sessions deliberately -
the number of concurrent hardware sessions is OS-limited, undocumented,
and exceeding it fails silently on some platforms (macOS VideoToolbox
accepts configure() and decode() and simply never outputs). Such an
application places overflow sinks on 'prefer-software' explicitly.
optimizeForLatency is exposed alongside it since it is the other
WebCodecs decoder-config preference an application may want per sink.

The override composes with the existing interlaced-AVC Chromium
workaround, which runs later and can only strengthen the preference
toward software.

Validation mirrors decode.ts's validateVideoDecodingConfig.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* Modify docs

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
Co-authored-by: Vanilagy <[email protected]>
2026-06-16 11:42:24 +00:00
Vanilagy e1c6ab1866 Docs clarification 2026-06-12 15:36:50 +02:00
Vanilagy 0cdf0063e2 Add VideoSample.encodeOptions, optimized ArrayBuffer-backed VideoSample cloning 2026-06-02 18:01:22 +02:00
Vanilagy ebfb1e6d75 Add MediabunnyServerOptions and configurable hardware context (closes #389) 2026-06-02 16:28:47 +02:00
Vanilagy 05f8ecd908 Respect Range header for UrlSource (#387) 2026-06-02 11:05:46 +02:00
Vanilagy c6c768d93e Omit 'signal', clarify docs for reading ranged resources (#387) 2026-06-01 22:00:39 +02:00
David P.andGitHub 5799cdf630 Merge pull request #387 from samohovets/docs/urlsource-requestinit-overrides
Document UrlSource RequestInit overrides
2026-06-01 21:55:47 +02:00
Vanilagy 4825818f9b Add sponsors 2026-06-01 18:42:33 +02:00
Igor Samokhovets b82ccc2c6a Document UrlSource RequestInit overrides 2026-05-25 11:12:41 +02:00
Vanilagy eb8b5e2534 Add headerImage frontmatter 2026-05-24 17:59:49 +02:00
Vanilagy 441eea38b9 CustomSource -> StreamSource 2026-05-24 15:48:01 +02:00
Vanilagy 41fb9657cb Add sponsor 2026-05-19 15:20:03 +02:00
Vanilagy 1c6c8c5217 Add missing stuff in docs 2026-05-13 20:03:46 +02:00
Vanilagy 14c534ed00 Polish docs 2026-05-13 15:44:09 +02:00
Vanilagy af43f67835 Add license headers, add @mediabunny/server to build process, add doc blocks, small fixes 2026-05-12 15:04:32 +02:00
Vanilagy 89ee88bc7c Add Cursorful sponsor 2026-05-10 17:51:21 +02:00
Vanilagy daf42181c9 Add sponsor 2026-05-06 20:12:14 +02:00
Vanilagy 1680bd02ad Holistic technical website cleanup 2026-05-03 19:47:39 +02:00
Vanilagy 9224fb886c Add link rel="canonical" 2026-04-29 17:00:59 +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 06a89ed085 Make code 12px 2026-04-28 17:57:44 +02:00
Vanilagy e5dbf8a783 Add sponsor 2026-04-28 15:36:31 +02:00
Vanilagy aa4966a5f1 Update codec soup and docs 2026-04-28 14:41:20 +02:00
Vanilagy 6182af7c29 Add HLS transcoding example 2026-04-28 13:54:42 +02:00
Vanilagy a3aa6a69ac Add use case 2026-04-28 10:04:14 +02:00
Vanilagy 0f6c374750 Ensure extensions work with huge timestamps, fix AC3 and AAC extension's behavior with huge timestamps 2026-04-27 20:58:05 +02:00
Vanilagy 631d207ca2 Clarify 2026-04-27 19:41:59 +02:00
Vanilagy 9a1b8b2602 Add timestampBase option for live MediaStreamTrack sources 2026-04-27 19:38:45 +02:00
Vanilagy 5ee78c6480 Add pssh box parsing and expose them in resolveKey 2026-04-24 19:01:25 +02:00
Vanilagy 1d6731e4f6 Add blog, add HLS blog post 2026-04-24 17:37:49 +02:00
Vanilagy 7acae8dda1 Add a track disposition section to Writing HLS 2026-04-23 11:06:50 +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
Vanilagy 783cfa6fbe Add AppendOnlyStreamSource, adjust examples to use it 2026-04-21 14:58:33 +02:00
Vanilagy 2b3e5f45c6 Remove createInputFrom, changed meaning of PathedSource, add CustomPathedSource 2026-04-21 13:22:10 +02:00