Skip to content

Extended subtitles support across containers#166

Open
wiedymi wants to merge 5 commits intoVanilagy:mainfrom
wiedymi:subtitle-support
Open

Extended subtitles support across containers#166
wiedymi wants to merge 5 commits intoVanilagy:mainfrom
wiedymi:subtitle-support

Conversation

@wiedymi
Copy link

@wiedymi wiedymi commented Oct 3, 2025

Summary

This PR adds end-to-end subtitle support across containers, parsing/muxing, and conversion workflows.

What’s included

  • Core subtitle track support for MP4/MOV/MKV pipelines.
  • Subtitle parsing/formatting utilities for:
    • webvtt
    • srt
    • ass / ssa
    • tx3g
    • ttml
  • ISOBMFF subtitle support expanded with tx3g and ttml mapping/handling.
  • Conversion API support for subtitle tracks via ConversionSubtitleOptions:
    • discard
    • target codec
    • track-specific callback support (same pattern as video/audio options)
  • ASS/MKV robustness fixes for real-world edge cases, including ReadOrder-related reconstruction.

Docs and examples

  • Added/updated subtitle extraction and muxing examples.
  • Updated conversion guide and supported formats/codec documentation.

Tests

  • Added subtitle-focused test coverage including:
    • ISOBMFF subtitle tests
    • Matroska subtitle tests
    • Subtitle parsing tests
    • Subtitle extraction tests
    • Subtitle conversion tests
    • Advanced ASS/SSA handling tests

Commit structure

This branch is intentionally split into focused commits:

  1. Core subtitle support (MP4/MOV/MKV).
  2. tx3g/ttml support for MP4/MOV.
  3. Conversion API subtitle options.
  4. Conversion test coverage.
  5. ASS/MKV parsing hardening.

Notes

  • This PR includes non-trivial subtitle fixture updates under test/public/subtitles/.
  • No public API removals; this extends subtitle capabilities.

@wiedymi wiedymi marked this pull request as ready for review October 6, 2025 08:27
@wiedymi wiedymi changed the title [WIP] Extended subtitle support across containers Extended subtitles support across containers Oct 6, 2025
@Vanilagy
Copy link
Owner

Thanks! This is a large PR and thus will take some energy to review, so given that this feature is not on the immediate roadmap (although it is on the roadmap!), I'll deal with this PR at a later date. But don't worry, I won't forget about it!

@wiedymi
Copy link
Author

wiedymi commented Nov 10, 2025

Take your time

Thanks! This is a large PR and thus will take some energy to review, so given that this feature is not on the immediate roadmap (although it is on the roadmap!), I'll deal with this PR at a later date. But don't worry, I won't forget about it!

@wiedymi
Copy link
Author

wiedymi commented Feb 16, 2026

@Vanilagy this one is rebased as well

@kzahel
Copy link
Contributor

kzahel commented Mar 6, 2026

Hey I'm just leaving my support here I started using media bunny and a project and think it would be really cool to have subtitle support

kzahel added a commit to kzahel/mediabunny that referenced this pull request Mar 6, 2026
Combines our CTS fix with wiedymi's subtitle support PR (Vanilagy#166).
Adds input/output support for WebVTT, tx3g, TTML, SRT, ASS/SSA
across MP4/MOV/MKV containers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wiedymi
Copy link
Author

wiedymi commented Mar 6, 2026

@Vanilagy let me know when you will have time to revise the PR to your vision and finally ship it 👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants