Ffmpeg Extract Ass Subtitle

As the title states I'm trying to figure out how to remove some .ass subtitles from an MKV video. I've looked high and low to try and figure this out but have had no success. The most common thing I've read is to use MKVextractGui, well i used the older one at first and it extracted the subtitles but would always give me a blank subtitle file that has the following message:
'Error: Unrecognized command line option '.
Then I switched to MKVextractGui 2, the only problem this time is that when I set it to extract the subs, it will say everything worked correctly, but the file was never where I specified it to be. So I tried extracting other tracks from the video like the fonts, audio, video, etc and they all appeared, just not the subtitles themself.
So far the only way I've gotten the subtitles to a point where I could actually edit them was by using MKVmerge, so I could remove everything but the subtitles. The only thing with this is that I have to first open up Aegisub, and choose to open the subtitles with a characterset, however when I do this the subtitles timing becomes wrong and starts directly at the start of the video.
Anyways, all I'm trying to do is make it so I can edit these subtitles a bit, get rid of all the fancy styling and placements and convert them to .srt files, keep the timing correctly, and burn them to dvd so i don't have to deal with annoying characters poping up on the screen because that's where they were encoded to be placed somewhere.
Anyways I appreciate any help.

FFMpeg is the swiss army knife of video edi­tors and motion artists world­wide. Let’s take a look at one of the less­er-known (and kin­da unex­pect­ed) features.

The options for customizations are actually option names from the ASS subtitles spec ('Advanced SubStation Alpha'). This is what FFmpeg uses internally (via libass). These can be applied both with the ass and subtitles filters. When using the subtitles video filter, FFmpeg converts the subtitles internally to ASS. Subtitles are pretty much the same. The subtitles will be printed in the info and then you can extract them, similar to: ffmpeg -threads 4 -i VIDEO.mkv -vn -an -codec:s:0.2 srt myLangSubtitle.srt 0.2 is the identifier that you have to read from the info. As I understand it video and audio codecs can be implied from file extension, but subtitles require explicit definition. If you add in the codec specification to srt then it should work. Ffmpeg -i subs.ass -c:s srt output.srt 1.

FFmpeg can eas­i­ly extract embed­ded sub­ti­tles from videos. This com­mand will grab the default sub­ti­tle track and export it as a srt file:

Ffmpeg Extract Pgs Subtitles

What if we want to get a dif­fer­ent sub­ti­tle? First we need to fig­ure out the track num­ber for that sub­ti­tle by run­ning ffm­peg ‑i input_file. You will get an out­put that some­thing like this:

Notice the tracks are num­bered #0:2, #0:3, etc. This is the val­ue we want to pass over to the map com­mand to select the prop­er subtitle.

Removing HTML from subtitles

There are a num­ber of appli­ca­tions and online ser­vices that can strip html tags from sub­ti­tles (like HTML Stripper), but you can also solve this quick­ly with good old sed:

You can make an alias to this in your favorite shell so you don’t have to remem­ber or copy/paste it all the time. Keep in mind that the results of sed won’t be as good as a HTML strip­per and com­pa­ny, since this is just a sim­ple regex. That said, it’s usu­al­ly more than enough for subtitles.

Ffmpeg Dvd Subtitles

Ffmpeg Extract Ass Subtitle

Converting to other formats

While FFmpeg can get this done for you with a lim­it­ed num­ber of for­mats (depend­ing on how it was com­piled) there is a bet­ter alter­na­tive. SubtitleEdit is a handy open source appli­ca­tion that can con­vert between 200+ sub­ti­tle for­mats (and do a lot more of course).

If you want to bring those sub­ti­tles into Blender check out the SubsImport addon.

Batch rendering is complicated

Ffmpeg Extract Vobsub

Srt

Ffmpeg Extract Subtitle From Mkv

But it does­n’t have to be! Render+ lets you set­up, run batch­es and a whole lot more from the com­fort of Blender’s interface.
Try out Render+ today!