[SOLVED] Edit MKV subtitles?

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Ruben13
Level 1
Level 1
Posts: 14
Joined: Thu Nov 25, 2021 8:00 am

[SOLVED] Edit MKV subtitles?

Post by Ruben13 »

Is it possible at all to edit subtitles inside an MKV file and how should I do that e.g. which software should I use. Thanks in advance. :D
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
ugly
Level 5
Level 5
Posts: 592
Joined: Thu Nov 24, 2016 9:17 pm

Re: Edit MKV subtitles?

Post by ugly »

Someone might have a better idea than I do, but I'll explain the way I would do it.

First, I would extract the subtitles from the mkv file (to get a seperate .srt file). Then I would edit the subtitles in the srt file and just playback the mkv file using the srt file instead of the subtitle tracks.

To extract the subtitles, I would just use ffmpeg (this is a commandline tool).

ffmpeg -i "/path/to/mkv-file" -map 0:s:0 "/path/to/subtitle/file"

Note that the s:0 extracts the 1st subtitle track. So you would have to change that if you have multiple subtitle tracks and want to extract a specific one.

/path/to/mkv-file is the location of the mkv file you want to edit. And /path/to/subtitle/file would be the output location for the subtitle file that you are extracting.

Then you can use gnome subtitles to edit the srt file.

You can install gnome subtitles with:
sudo apt install gnome-subtitles

That will provide you with a graphical interface for editing or syncing subtitles.
Ruben13
Level 1
Level 1
Posts: 14
Joined: Thu Nov 25, 2021 8:00 am

Re: Edit MKV subtitles?

Post by Ruben13 »

Thanks, it is a good way to do it but I was wandering if it could be done without extracting the sub. Judging by the amount of replies I don't think it can't be done. Too bad. :x
Hoser Rob
Level 20
Level 20
Posts: 11796
Joined: Sat Dec 15, 2012 8:57 am

Re: Edit MKV subtitles?

Post by Hoser Rob »

Ruben13 wrote: Fri Dec 10, 2021 9:02 am ... I was wandering if it could be done without extracting the sub. Judging by the amount of replies I don't think it can't be done ...
Don't judge by how many replies you get, Linux support forums are "staffed" by volunteers. A web search will tell you that there's no software that does this. Video editing/converting is a lot more complex than many users seem to think it is.
For every complex problem there is an answer that is clear, simple, and wrong - H. L. Mencken
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Edit MKV subtitles?

Post by rene »

Ruben13 wrote: Fri Dec 10, 2021 9:02 am Thanks, it is a good way to do it but I was wandering if it could be done without extracting the sub. Judging by the amount of replies I don't think it can't be done.
No, that wouldn't be possible I'd say. But just to add to what was said already: rather than ffmpeg I'd use mkvtoolnix for the purpose of extracting and merging them back in after editing: sudo apt-get install mkvtoolnix-gui.
Ruben13
Level 1
Level 1
Posts: 14
Joined: Thu Nov 25, 2021 8:00 am

Re: Edit MKV subtitles?

Post by Ruben13 »

I think I know enough now, it's not possible the way I want it. Too bad but thank you all for your good advice. :D
Locked

Return to “Software & Applications”