Hi,
I've written a Media Extension that adds support for .mkv and other file formats. I have it working for various audio and video codecs, but I'm stuck when it comes to adding support for subtitles. Some questions:
- How do I specify the language associated with a track? I have tried setting METrackInfo.extendedLanguageTag to e.g. "ja" or "jpn" and this value is reflected in AVAssetTrack.extendedLanguageTag, but AVAssetTrack.languageCode stays nil and AVAsset.availableMediaCharacteristicsWithMediaSelectionOptions is empty.
- How do I supply a subtitle track? I have tried returning a METrackInfo containing a CMFormatDescription of type kCMMediaType_Subtitle or kCMMediaType_Text with subtype kCMSubtitleFormatType_3GText or kCMSubtitleFormatType_WebVTT, but this causes AVFoundation to refuse to play the file at all. (There's some WIP code at https://github.com/Marginal/QuickLookVideo/blob/subtitles/formatreader/subtitletrackreader.swift)
Anyone had any experience with either of these?