Commit Graph
1325 Commits
Author SHA1 Message Date
github-actions[bot] a0f8a23ddb Merge main into release for tag v1.53.0 2026-08-08 15:23:28 +00:00
Vanilagy e9d7bc4e83 Bump minor, document single file mode special case v1.53.0 2026-08-08 17:10:33 +02:00
Vanilagy 5b22c8c17d Fix HLS writing an incomplete init segment for sparse segments, improve decoder config validation, fix getFirstTimestamp() for Inputs with zero-packet tracks, allow zero-track muxing for some formats that allow it, add new track metadata that allows you to specify the decoder config early (enables zero-packet tracks), fix trafIndices in sparse fragmented MP4s, fix assertion errors in MPEG-TS demuxer 2026-08-08 17:00:36 +02:00
Vanilagy 7ec538e175 Add special-cased HLS muxer behavior with single-file mode and fMP4 in order to create a standalone playable fMP4 file (closes #394) 2026-08-07 23:03:48 +02:00
Vanilagy eceb350806 Unflake FLAC test 2026-08-06 17:05:09 +02:00
Vanilagy f8f660b31a Flake? 2026-08-06 16:52:08 +02:00
Vanilagy b0a8802918 Fixed missing mipmapping in the VideoSample transform case, now guaranteed via a manual mipmap algo 2026-08-06 16:31:46 +02:00
Vanilagy c159798c29 Sure 2026-08-06 14:13:59 +02:00
Vanilagy 3023c5f7bd Adjust UrlSource behavior when reading non-range responses, it now honors the cache size and behaves like a ReadableStreamSource (fixes #457) 2026-08-06 14:02:28 +02:00
Vanilagy 9b155cc8f2 Fix macOS webdriver io cache location 2026-08-06 13:54:10 +02:00
Vanilagy 4e4e6eed0c Fix encodability checks throwing due to unsupported config feature set; now counts as not supported (fixes #456) 2026-08-06 11:07:15 +02:00
github-actions[bot] b4d259f80e Merge main into release for tag v1.52.3 2026-08-03 12:59:24 +00:00
Vanilagy ce10bb774a Bump patch v1.52.3 2026-08-03 14:54:19 +02:00
Vanilagy 445911edd0 Fix ISOBMFF muxer track alternate groups (fixes #454), fixed mutex race condition in Output 2026-08-03 14:50:36 +02:00
Vanilagy 7a871cec49 Update README to new Quality API 2026-07-31 17:53:46 +02:00
github-actions[bot] 402481174c Merge main into release for tag v1.52.2 2026-07-31 14:00:34 +00:00
Vanilagy 593cd6e2f5 Bump patch v1.52.2 2026-07-31 15:52:54 +02:00
Vanilagy a0e18ffde0 Use imageSmoothingQuality high when doing canvas-based resizes 2026-07-31 15:52:28 +02:00
github-actions[bot] 1f6a25064d Merge main into release for tag v1.52.1 2026-07-30 22:11:12 +00:00
Vanilagy f177be15cf Write out compressor name as Pascal-style string, bump patch v1.52.1 2026-07-31 00:06:07 +02:00
github-actions[bot] 85170cfbe9 Merge main into release for tag v1.52.0 2026-07-30 16:12:02 +00:00
Vanilagy 6be47af6aa Bump minor v1.52.0 2026-07-30 17:54:56 +02:00
Vanilagy d5362e20ad Fix incorrect video depth being written in ISOBMFF for video tracks with an alpha channel (fixes #450) 2026-07-30 17:45: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 1a99b0371d Improve encoder-side error handling, always close samples/frames even in error conditions 2026-07-29 14:45:22 +02:00
Vanilagy 4e4603ed83 Up timeout 2026-07-29 11:49:37 +02:00
Vanilagy 90ec40166f Fix decoders not being closed in certain error scenarios, fixed unsettled promises in reading logic (fixes #446) 2026-07-29 11:42:14 +02:00
Vanilagy b4937d384c Merge branch 'main' into release 2026-07-24 14:54:00 +02:00
Vanilagy 4b5ef55cf1 Fix API docs some more 2026-07-24 14:53:49 +02:00
Vanilagy 3ef0ae0f31 Merge branch 'main' into release 2026-07-24 14:13:50 +02:00
Vanilagy 2f5e2f0a3e Fix @internal fields on type aliases being printed to API docs 2026-07-24 14:13:39 +02:00
Vanilagy 92d4836e53 Merge branch 'main' into release 2026-07-22 20:26:06 +02:00
Vanilagy 7ff06c3f65 Re-enable lastUpdated, add lastUpdated logic to API doc generator 2026-07-22 20:25:37 +02:00
github-actions[bot] 03281ba3e9 Merge main into release for tag v1.51.0 2026-07-22 13:40:11 +00:00
Vanilagy 634186fd5e Bump minor v1.51.0 2026-07-22 15:31:39 +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
github-actions[bot] 041999738c Merge main into release for tag v1.50.9 2026-07-18 21:55:04 +00:00
Vanilagy 794b84884f Make sure that samples are always closed in the Conversion API, even on error cases v1.50.9 2026-07-18 22:54:24 +02:00
Vanilagy 45c34f9dcd Bump patch 2026-07-18 16:15:53 +02:00
Vanilagy 3ec4061e03 Clean up 2026-07-18 15:49:57 +02:00
bf592a87ca Give Matroska subtitle cues a BlockDuration (#442)
Subtitle cues were written as SimpleBlocks, which carry no duration. A
SimpleBlock tells the player when a cue starts but not how long to show it,
so players such as VLC and libass-based renderers display nothing for
S_TEXT/WEBVTT tracks muxed into Matroska/WebM.

Route a subtitle chunk that has a positive duration through a BlockGroup so
its BlockDuration is written, matching how additions are already handled.
Non-subtitle tracks and zero-duration cues keep using SimpleBlocks.

Co-authored-by: hikari <[email protected]>
2026-07-18 15:48:55 +02:00
454476ab26 Fix WebVTT-in-MP4 output by starting the aux writer (#441)
* Fix WebVTT-in-MP4 output by starting the aux writer

The ISOBMFF muxer advertises WebVTT as a supported subtitle codec and maps
it to the wvtt sample entry, but IsobmffMuxer.start() never calls
auxWriter.start(). The aux writer builds subtitle sample boxes in memory, so
the first box write for any subtitle track hits its started === false assert
and muxing fails.

Start the aux writer alongside the main writer so WebVTT subtitle tracks can
be written to MP4/MOV.

* Move code around, add simple WebVTT muxing test

---------

Co-authored-by: hikari <[email protected]>
Co-authored-by: Vanilagy <[email protected]>
2026-07-18 13:45:23 +00:00
Vanilagy d2aea552d9 Add spacing 2026-07-18 15:27:06 +02:00
Igor SamokhovetsandGitHub 94d42667f1 Add extension decoders to media player example (#433)
* Add extension decoders to media player example

* Enable extension decoders in input examples

* Simplify media player file filter

* Align input file filters across examples
2026-07-18 15:26:31 +02:00
Vanilagy 0554696505 Fix nested worker randomly shutting off in Firefox (closes #435) 2026-07-18 14:44:57 +02:00
bfbd90e1d8 Account for multi-frame Opus packets when computing packet duration (#439)
* Account for multi-frame Opus packets when computing packet duration

parseOpusTocByte only read the config field of the TOC byte and always
assumed a single frame per packet. Per RFC 6716 section 3.2, a packet may
carry 1, 2 or an arbitrary number of frames, encoded in the two low bits of
the TOC byte (plus the frame count byte for code 3), and its duration is the
frame duration times the frame count.

As a result, the Ogg muxer wrote granule positions that advanced slower than
the actual audio. Chromium's MediaRecorder packs three 20 ms frames per Opus
packet, so remuxing WebM/Opus to Ogg/Opus produced files declaring a third of
their real duration: a 5.7 s recording ended with a final granule position of
99840 (2.08 s). Decoders that trust the container then truncate the audio.

* Clean up

---------

Co-authored-by: Vanilagy <[email protected]>
2026-07-18 12:05:31 +00:00
Vanilagy 1183b542ee Make WAVE demuxer throw for format tags that it doesn't support (fixes #440), add support for reading & writing float64 PCM in WAVE 2026-07-14 17:30:50 +02:00
github-actions[bot] b4a7a4cbd1 Merge main into release for tag v1.50.8 2026-07-09 22:19:47 +00:00
Vanilagy db75747533 Bump patch v1.50.8 2026-07-10 00:15:25 +02:00