Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!



ffmpeg - Extract su...
 
Share:
Notifications
Clear all

[Solved] ffmpeg - Extract subtitles

1 Posts
1 Users
0 Reactions
583 Views
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2805
Topic starter  

In case you want to extract certain subtitles from videos files (typically MP4 or MKV) then ffmpeg can be sure helpful to extract subtitles in bulk and per language (assuming language is properly set in the video file ofcourse).

To extract all Dutch (nld) subtitles from MP4 files, and save each as filename.nld.srt:

for f in *.mp4; do ffmpeg -i "$f" -map 0:s:m:language:nld "${f%.*}.nld.srt"; done

Or another example, extract all English (eng) susbtitles from MKV files and save them as as filename.eng.srt:

for f in *.mkv; do ffmpeg -i "$f" -map 0:s:m:language:eng "${f%.*}.eng.srt"; done

 


   
ReplyQuote
Share: