I have an mkv file which has (soft) subtitles in it. The video is about 30 minutes long but I want to trim it down to just 6 minutes (say, from 19:00 to 25:00). However, I want to keep the soft subtitles.
I tried using Record in VLC but even with the subs showing, they were not captured in the output.
Then I tried Avidemux but, again, the output is missing subs.
I thought this answer might help (using mkvextract) but the extracted subs were the entire subs and now I'm not sure how to edit it down and re-add them and sync them to the trimmed video file.
I might be naive here but I would think there would be an option to trim the video keeping the soft subs.
My first preference is to do just this: Cut the video down while keeping the soft subs.
Converting the subs to hard subs is an option but less than ideal because the subs will overlap some important information on screen.
Try using
ffmpeg
:Flags
-c copy
flag (short for-codec copy
) will make all codec operations copy i.e. video, audio, subtitles, data and attachments, if any. This will reduce the time needed to trim the video massively.-ss
flag is the start time offset - if you want the video to start from 19:00, you should set it to00:19:00
-t
flag is the duration - if you want the video to start from 19:00 and end at 25:00, that makes 6 minutes -00:06:00
In my testing, the soft subtitles were preserved.
Original video
Trimmed video
Lately I've extended VideoCut to support subtitles:
It cut out parts you don't like and supports subtitles in containers that support them as well. Based on the ffmpeg library it will not reencode the parts, so no quality loss.