Skip to content

Instantly share code, notes, and snippets.

@ericoporto
Last active July 27, 2020 00:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericoporto/2d35da62c2f1e857e512e27e0ab6e4fa to your computer and use it in GitHub Desktop.
Save ericoporto/2d35da62c2f1e857e512e27e0ab6e4fa to your computer and use it in GitHub Desktop.
bash script to extract all subtitles from mp4 files and remove html tags
#!/bin/bash
for file in *.mp4;
do
filename=$(basename -s .mp4 "$file")
ffmpeg -i "${filename}.mp4" "${filename}.srt"
done
sed -i 's/<[^>]*>//g' *.srt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment