Trim MKV without reencode AND keeping subtitles?

MKV playback, recompression, remuxing, codec packs, players, howtos, etc.
Post Reply
kingmustard
Posts: 3
Joined: Sun Dec 13, 2020 10:46 pm

Trim MKV without reencode AND keeping subtitles?

Post by kingmustard »

I have an MKV video file (AVC H.264 video stream, AAC LC SBR audio stream, SRT text stream).

When I trim it (to the nearest key frame) with MKV Cutter 20170625, I get a video file called "video_withoutSubs", with no text stream.

When I trim it (to the nearest key frame) with avidemux 2.7.6 (Copy / Mkv Muxer), I get a video file with no a text stream.

Anyone have any ideas?
Woodstock
Posts: 10381
Joined: Sun Jul 24, 2011 11:21 pm

Re: Trim MKV without reencode AND keeping subtitles?

Post by Woodstock »

Was the SRT file part of the original MKV, or what I call a "side load" file that players will grab for subtitles if found in the same directory?
kingmustard
Posts: 3
Joined: Sun Dec 13, 2020 10:46 pm

Re: Trim MKV without reencode AND keeping subtitles?

Post by kingmustard »

Woodstock wrote:
Mon Dec 14, 2020 1:30 am
Was the SRT file part of the original MKV, or what I call a "side load" file that players will grab for subtitles if found in the same directory?
It's part of the file/container.

Please see below:

Code: Select all

General
Unique ID                                : 100823356021557008391632230726625601725 (0x4BD9DF3E609B847E0019AC3FF85728BD)
Complete name                            : C:\Users\kingm\Desktop\videofile1.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 531 MiB
Duration                                 : 12 min 24 s
Overall bit rate                         : 5 983 kb/s
Encoded date                             : UTC 2020-08-28 17:33:41
Writing application                      : mkvmerge v34.0.0 ('Sight and Seen') 64-bit
Writing library                          : libebml v1.3.7 + libmatroska v1.5.0

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 12 min 24 s
Bit rate                                 : 5 917 kb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 29.970 (30000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.095
Stream size                              : 525 MiB (99%)
Default                                  : Yes
Forced                                   : No

Audio
ID                                       : 2
Format                                   : AAC LC SBR
Format/Info                              : Advanced Audio Codec Low Complexity with Spectral Band Replication
Commercial name                          : HE-AAC
Format settings                          : Explicit
Codec ID                                 : A_AAC-2
Duration                                 : 12 min 24 s
Bit rate                                 : 64.0 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 23.438 FPS (2048 SPF)
Compression mode                         : Lossy
Stream size                              : 5.68 MiB (1%)
Language                                 : English
Default                                  : Yes
Forced                                   : No

Text
ID                                       : 3
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Duration                                 : 11 min 15 s
Bit rate                                 : 82 b/s
Count of elements                        : 236
Stream size                              : 6.82 KiB (0%)
Language                                 : English
Default                                  : No
Forced                                   : No
Last edited by kingmustard on Fri Dec 18, 2020 12:34 pm, edited 1 time in total.
Woodstock
Posts: 10381
Joined: Sun Jul 24, 2011 11:21 pm

Re: Trim MKV without reencode AND keeping subtitles?

Post by Woodstock »

Depending on where you trim the video, the timing in the SRT file could be slightly (or wildly) off.

It's possible to use mkvmerge to copy out the parts you want, but I'm not sure it would be as "clean" as doing it with an editor, where you can make sure there is a key frame at the start. I've tried this before with "all in one" files, and the key frames are as much as two seconds off from where the actual video split should be.
Chetwood
Posts: 983
Joined: Mon Aug 30, 2010 9:16 am

Re: Trim MKV without reencode AND keeping subtitles?

Post by Chetwood »

kingmustard wrote:
Tue Dec 15, 2020 10:07 am
Please see attached screenshot.
In Mediainfo simply select View -> Text and you can paste it here. No need for screenshots.
MultiMakeMKV: MakeMKV batch processing (Win)
MultiShrink: DVD Shrink batch processing
Offizieller Uebersetzer von DVD Shrink deutsch
kingmustard
Posts: 3
Joined: Sun Dec 13, 2020 10:46 pm

Re: Trim MKV without reencode AND keeping subtitles?

Post by kingmustard »

Chetwood wrote:
Wed Dec 16, 2020 5:43 am
kingmustard wrote:
Tue Dec 15, 2020 10:07 am
Please see attached screenshot.
In Mediainfo simply select View -> Text and you can paste it here. No need for screenshots.
Fixed :)
Post Reply