How to cut without reencoding (MKV file, on linux)

I have a 240MB MKV (h264 +mp3) video captured from vokoscreen capture program in linux (about 1 hour long), and there’s a segment in it I want to cut out, which is all good and fine from the editing aspect, but when I try to export the video again it [obviously] is reencoded and subsequently that nice compact 240MB becomes about 850MB with even 1500kbps average bit rate (h264 output).

Is there a proper way to export the edited video with the segment removed and preserve the existing encoding? Or am I better off working with a different tool for this task?

You will need ot use another tool for the task. I suggest avidemux for what you want to do.

Thank you. I tried Avidemux but for what ever reason it doesn’t see more than ~38 minutes of footage in the 1h05 mkv file.

Perhaps, someone can suggest what sort of export settings I could use to replicate the quality of this mkv, which seems to be encoded at about 530kbps but still good quality at 1920x1080@30fps; every time I try to export from Shotcut it needs about 800~1200MB to be the same quality (perhaps I should ask this in a different thread?

The problem is, if you re-encode the video you are losing quality. The only way to loose the minimum quality is by exporting with the maximum quality and that will mean bigger files than the original. I don’t know of any way to avoid this.

Oddly, it turns out by exporting as webm(vp9+opus) @40%QBR it came out very close to the original in terms of quality and size. Downside was the encoding duration was substantially longer than mp4(h264+aac ABR@2500kbps). Happy, with the eventual outcome, though unsure as to why the notably superior bit/quality ratio with the webm.

Thank you for your time regardless.

Since you are a Linux user, you might want to try the command line utility ffmpeg in the future. It’s so widely used that you can find examples of just about every type of edit imaginable.