Skip to content

feat!: drop VP8/VP9 output codec support#23

Merged
juliendargelos merged 3 commits into
mainfrom
feat/drop-vp8-vp9-output
May 1, 2026
Merged

feat!: drop VP8/VP9 output codec support#23
juliendargelos merged 3 commits into
mainfrom
feat/drop-vp8-vp9-output

Conversation

@juliendargelos
Copy link
Copy Markdown
Member

Summary

  • Remove ability to encode with VP8/VP9, keeping them only as valid input codecs
  • VP8/VP9 encoding is not useful for fast scrubbing scenarios and adds unnecessary complexity
  • Focus is now solely on H.264/H.265 output, simplifying the codebase

Changes

  • Create Codec.ts module to centralize codec type handling, assertion, and resolution
  • Remove outputCodecToMuxCodec function (no longer needed)
  • Simplify Muxer.ts (remove codec from MuxOptions, always convert Annex B → AVCC)
  • Remove VP8/VP9 from codec types, comments, and tests
  • Simplify resolveEncoderOptions (remove resolveOutputFormat, webm branch)
  • Remove FF_ENCODER_LIBVPX_VP8/VP9 imports and exports from Converter.ts
  • Update readme.md and AGENTS.md to clarify FSV is a H.264/H.265 container format

Breaking Change

This is a breaking change. The outputCodec option in Converter.convert() no longer accepts libvpx-vp8 or libvpx-vp9 values. Only libx264 (H.264) and libx265 (H.265) are supported as output codecs.

Resolves #20

Remove ability to encode with vp8/vp9, keeping them only as valid input
codecs. VP8/VP9 encoding is not useful for fast scrubbing and adds
unnecessary complexity. Focus is now solely on H.264/H.265 output.

- Create Codec.ts module for codec type handling
- Remove outputCodecToMuxCodec (no longer needed)
- Simplify Muxer (always convert Annex B → AVCC)
- Remove VP8/VP9 from codec types, comments, and tests
- Simplify resolveEncoderOptions (remove webm branch)
- Remove FF_ENCODER_LIBVPX_VP8/VP9 imports and exports
- Update docs to clarify FSV is a H.264/H.265 container format

Resolves #20
@juliendargelos juliendargelos added Type: Breaking Change Update that may cause rework Type: Enhancement New feature or request labels May 1, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
fsv Ignored Ignored May 1, 2026 4:33pm

Request Review

Add helper functions to inspect actual NAL unit types in encoded bitstream:
- getH264NalUnitType(): searches for IDR (type 5) in AVCC/Annex B data
- getH265NalUnitType(): extracts NAL unit type from H.265 header

Add new test 'converts with libx264 output codec' that verifies H.264
bitstream by checking NAL unit type = 5 (IDR).

Keep 'converts with libx265 output codec' test intentionally broken
(outputCodec: H264 instead of H265) to demonstrate that the bitstream
verification correctly detects wrong encoder usage.
@juliendargelos juliendargelos merged commit 86d80bd into main May 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Breaking Change Update that may cause rework Type: Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Abandon the ability to encode with vp8/vp9 and only allow h264/h265

1 participant