Wait, WebSRT and WebVTT are the same standard? (With the latter being renamed from the former.)
Holy Standaroli!
I have no idea why I had this in my head as two different things. Maybe because of the SRT format (sans Web) which is still around and used.
And yes, apparently it has been for over a decade, see this tweet from @ourmaninjapan from 2010[!!!]: https://twitter.com/ourmaninjapan/status/19537348354117633
🤯🤯🤯
In seinem Artikel fragt @MrClicko nach Playern, welche #VTT-Files unterstĂĽtzen. #WebVTT, das "Web Video Text Tracks Format", wird fĂĽr die Videoelemente in allen Browsern unterstĂĽtzt.
Laut einer kurzen Websuche sollte es auch von VLC unterstĂĽtzt werden, habe das aber noch nicht ausprobiert.
https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API
RT @MozillaZineFr@twitter.com
1. Les sous-titres #WebVTT arrivent dans l’incrustation vidéo (Picture-in-Picture). Vous pouvez tester le travail en cours en passant la valeur de la préférence “media.videocontrols.picture-in-picture.display-text-tracks.enabled” à “true” dans “about:config”.
1. Les sous-titres #WebVTT arrivent dans l’incrustation vidéo (Picture-in-Picture). Vous pouvez tester le travail en cours en passant la valeur de la préférence “media.videocontrols.picture-in-picture.display-text-tracks.enabled” à “true” dans “about:config”.
2. La communauté est appelée à tester la compatibilité des sites avec Firefox 100. Dans “about:preferences#experimental”, cochez la case devant “Chaîne « User-Agent » Firefox 100”. Envoyez vos rapports de bogue à http://webcompat.com/
C'est bon, j'ai trouvé un moyen de le faire en utilisant #ffmpeg
----------------------------------------------------
ffmpeg -i "https://chemin-vers-le-fichier.m3u8" "soustitres.vtt"
---------------------------------------------------
J'ai du chercher le chemin vers le fichier .m3u8 dans le code source de la page, merci @ronane
#ffmpeg #soustitres #subtitles #webvtt
SubtĂtulos en videos #html5 con estilos #css y alineaciĂłn
http://html5doctor.com/video-subtitling-and-webvtt/
#video #webvtt
Do you have a YouTube Âą video link, but you would rather just read the subtitles / closed captions for it?
Then with a couple of command-line tools such as youtube-dl
, grep
, sed
and tail
, you can extract and re-format these to be a somewhat legible text:
youtube-dl --sub-lang en --sub-format vtt --skip-download --write-sub --output "tmp-mysubs" YOUTUBE_VIDEO_URL_HERE && grep -Pv '^(([0-9]{2}:){2}[0-9]{2}.[0-9]{3}( --> ([0-9]{2}:){2}[0-9]{2}.[0-9]{3})?|)$' tmp-mysubs*.vtt | sed 's/ / /g' | sed -z 's/[, ]\n/ /g' | sed --regexp-extended -z 's/([^\. ])\n([a-z])/\1 \2/g' | tail -n +4
See my earlier toot containing the captions for Tom Scott's video about Torpenhow Hill for an example of the output.
The youtube-dl command will extract the captions in Web Video Text Tracks (VTT) format and store them in a file prefixed with 'tmp-mysubs
' ² (likely 'tmp-mysubs.en.vtt
').
The grep command will remove the timestamps and empty lines.
The sed commands will try their best to make the text more legible by merging lines and replacing non-breaking-space HTML-entities.
Finally, the tail command will strip the WebVTT header info such as language and format. I'm not 100% certain this header will always be exactly 4 lines though, so you might want to leave it out.
Âą: While I've written it for YouTube videos in mind, it will likely also work on other media sites supported by youtube-dl
² You can replace the prefix 'tmp-mysubs
' with any prefix you see fit; just be sure to replace it in both the youtube-dl
and grep
commands.
Related hashtags: #YouTube #YouTubeDL #subtitles #subs #closedCaptions #captions #streamingMedia #accessibility #a11y #video #grep #sed #tail #CLI #commandLine #oneliner #VTT #WebVTT #WebVideoTextTracks
#youtube #youtubedl #subtitles #subs #closedcaptions #captions #streamingmedia #accessibility #a11y #video #grep #sed #tail #cli #commandline #oneliner #vtt #webvtt #WebVideoTextTracks