Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.