Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

278
Visualizações
How to view subtitles vtt when AirPlay a mp4 file?

Target is view html subtitles in vtt format in TV when AirPlay is running.

html code:

<video preload="metadata" x-webkit-airplay="allow" src="a.mp4">
    <track kind="subtitles" default="" src="en.vtt" srclang="en">
    <track kind="subtitles" src="de.vtt" srclang="de">
    <track kind="subtitles" src="es.vtt" srclang="es">
    <track kind="subtitles" src="fr.vtt" srclang="fr">
</video>

The problem is when AirPlay is enabled video and audio plays on TV, but no subtitles showed.

I tried to include vtt/srt subtitles into the mp4 metadata with ffmpeg and subtitles working with VLC but not working when AirPlay this files

ffmpeg -i 8499.mp4 -i 8499.en.vtt -map 0:v -map 0:a -c copy -map 1 -c:s:0 mov_text -metadata:s:s:0 language=en 8499.en.mp4
ffmpeg -i 8499.mp4 -i 8499.en.srt -map 0:v -map 0:a -c copy -map 1 -c:s:0 srt -metadata:s:s:0 language=en 8499.en.mp4

Also tried to send a .m3u8 with no luck. Any of you know how is the basic format for a simple .m3u8 with a .mp4 and .vtt working when AirPlay?

Which is the standard subtitles solution for AirPlay?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I'm not surprised that iOS doesn't Airplay the VTT subtitles from <video> to an Airplay sink.

iOS (and probably tvOS as well) only supports 1 embedded subtitle/captioning format: MP4 Timed Text / MPEG-4 Part 17. Sometimes it is called Quicktime Timed Text. Safari also supports VTT (but not SRT) for <video>, but that is only in Safari.

One of your ffmpeg examples is close. If you want to Airplay MP4 files with subtitles/captions you must start with an SRT subtitle file as the input. Not an MP4 Timed Text file (which are far less common than SRT). Using mov_text will encode it.

This is an example I found in another answer relating to this question.

ffmpeg -i infile.mp4 -i infile.srt -c copy -c:s mov_text outfile.mp4

Note: the order of -c commands matters if you use -c copy. You must specify any source stream changes after it

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda