Ever since I figured I can play .MP4 videos in my Firefox in Ubuntu 18.04 (e.g. my Firefox 43 still can't do it, my Firefox 60 can), I've been very happy with the concept, especially if I have to upload a video somewhere for sharing; I just need to [set up Mime Types on the server](https://webplatform.github.io/docs/tutorials/configuring_mimetypes_on_the_server/), that is throw in a `.htaccess` file on an Apache server with:

```
AddType video/mp4 .mp4

```

... then I simply open a http(s)://...mp4 link in the browser, and its done.

However, in many cases I'd also like to add subtitles - and for one, I wouldn't want to "burn them in" the video as pixels (as in "hard subtitles"), I'd like them to remain as separate text information. I know the `.mkv` container supports this, but its not supported in Firefox ([1422891 - [Rethink] Support mkv|matroska|video/x-matroska in Firefox](https://bugzilla.mozilla.org/show_bug.cgi?id=1422891)).

So, I just found that the .MP4 as container can actually include separate subtitles:

* [[all variants] MKV to MP4 Conversion](https://ubuntuforums.org/showthread.php?t=2117194)
* <https://forum.videohelp.com/threads/391199-How-to-add-own-subtitles-%28resp-pure-text%29-into-existing-MP4-video>

Also, <https://en.wikipedia.org/wiki/Comparison_of_video_container_formats> notes for MP4 "Captions / subtitles":

> 
> ttxt, VobSubs with private objectTypeIndication not usable with the sceneDescription (started by Nero), BIFS
> 
> 
> 

VOBSUB is a .bmp/pixel format so it doesn't interest me, but `ttxt` is interesting.

However, I would like to embed subtitles in an .MP4 file once, and then have the subtitled file viewable (with subtitles) both on the web (hopefully just by uploading on a server that serves correct MIME type, without any javascript), - and on a desktop player.

What procedure could I use for this, and is there an example of it, so I know what I can approximately expect?

---

<https://apple.stackexchange.com/questions/116927/auto-add-subtitles-into-the-mp4-videos> :

> 
> mp4 does support ttxt and VobSub but not srt or ass.
> 
> 
> 

<https://gpac.wp.imt.fr/mp4box/ttxt-format-documentation/>

> 
> The 3GPP consortium has defined a standard for text streaming, independent of any scene description such as SMIL, SVG or BIFS: 3GPP Timed Text ... also known as MPEG-4 Streaming Text
> 
> 
> In order to help authoring text streams, an XML format has been developed in GPAC, called TTXT for timed-text – the extension used being.ttxt.
> 
> 
> 

[ffmpeg support for tx3g](https://superuser.com/questions/549590/ffmpeg-support-for-tx3g)

> 
> The FFmpeg codec mov\_text and tx3g are the same thing: [MPEG-4 Part 17](https://en.wikipedia.org/wiki/MPEG-4_Part_17) (Timed Text).
> 
> 
>