pcwalton / rust-media

A free, comprehensive, and portable video/audio streaming library for Rust
Apache License 2.0
787 stars 57 forks source link

Support subtitles #6

Open pcwalton opened 9 years ago

pcwalton commented 9 years ago

Subtitles are currently not supported, but they should be.

SimonSapin commented 9 years ago

What’s the scope of this? In a standalone media player, "subtitle support" might involve:

  1. Decoding various file formats
  2. Font management
  3. Text layout (including line breaking) and rendering
  4. Overlay/compositing on top of video frames

The first item should definitely be part of rust-media, but in the context of Servo everything else can (and should) be achieved by having the text be rendered as if it was in an HTML element. So all that logic should not be duplicated in rust-media. However this may not be idea for non-Servo users.

pcwalton commented 9 years ago

I've been thinking that rust-media can accept features that are outside the scope of Servo, but they go behind Cargo features so that we can compile them out for Servo.

pcwalton commented 9 years ago

That said, line breaking and text layout may want to be a separate crate entirely.

SimonSapin commented 9 years ago

Something like Pango? Yes, that would probably be useful to the Rust ecosystem at large. But I suggest we consider out of scope for rust-media at first, and reconsider if/when someone asks for it. A non-Servo user might happen to be using a UI toolkit that already does text rendering.

pcwalton commented 9 years ago

Sounds good to me.