classtranscribe / WebAPI

Repository for the .NET Core backend for ClassTranscribe
Other
16 stars 3 forks source link

Generate downloadable mp4s with embedded multilanguage closed captions #31

Open angrave opened 4 years ago

angrave commented 4 years ago

We will need an ffmpeg task to create the mp4 https://video.stackexchange.com/questions/22197/ffmpeg-how-to-add-several-subtitle-streams We will want to add the audio description/enhanced text description track too.

(We could even add chapter markers from the epub data)

For discussion: How do we not litter the storage with old mp4s?

Some tricky timing corner cases to work out (e.g. captions being updated while mp4 being regenerated)

angrave commented 3 years ago

First steps: Determine appropriate ffmpeg options to add more than one language.

Here's how to add one vtt file:

ffmpeg -i elephant.mp4 -i subtitles-en.vtt   -c copy -c:s mov_text -metadata:s:s:0 language=eng elephant-embedded.mp4

https://uofi.app.box.com/folder/130180363259?s=tq3ydxt93in3not7y1tew7ups8g92utt

Note vlc supports embedded captions but as of March 2021, the Windows10 player does not support them; Instead the Wind10 player can load caption files in the same directory.