user37172: Occasionally, the video-files need to be cut to keep only the relevant parts. Thus, how does one go about cutting the common video files (H.264, MPEG) without any re-encoding and thus quality loss?

user37521: Avidemux is the perfect tool for this. It's also free, open source and available for Windows, macOS and Linux.
H.264 and H.265 encoded videos have certain complete frames (keyframes) that are called I-frames or Intra Frames.
To ensure that you don't have to re-encode a video when you delete some some portions of it, just make sure that you select and delete the portion of video between two I-frames.
Avidemux makes finding keyframes or I-Frames very easy - just open the video in it, and use the UP or DOWN arrow keys to move between keyframes. To select a portion of video between keyframes, use the UP and DOWN arrow keys on your keyboard to find the first keyframe of the video portion, and click the [A button on AviDemux. Then use the UP and DOWN arrow keys to again move to the final key frame of the video portion, and click the ][B button on Avidemux. This will select the portion of video between the 2 keyframes.
You can now either delete this portion or click save to just extract and save this portion of the video. No re-encoding will be done.
More information on how to cut or extract videos on Avidemux can be read here - Simple cutting on Avidemux.

37172: <p>Occasionally, the video-files need to be cut to keep only the relevant parts. Thus, how does one go about cutting the common video files (H.264, MPEG) without any re-encoding and thus quality loss?</p>
 37521: <p><a href="http://fixounet.free.fr/avidemux/" rel="nofollow noreferrer">Avidemux</a> is the perfect tool for this. It's also free, open source and available for Windows, macOS and Linux.</p>
<p>H.264 and H.265 encoded videos have certain complete frames (<strong>keyframes</strong>) that are called <strong>I-frames</strong> or <strong>Intra Frames</strong>.</p>
<p>To ensure that you don't have to re-encode a video when you delete some some portions of it, just make sure that you select and delete the portion of video <em>between</em> two <strong>I-frames</strong>.</p>
<p>Avidemux makes finding keyframes or I-Frames very easy - just open the video in it, and use the <kbd>UP</kbd> or <kbd>DOWN</kbd> arrow keys to move between keyframes. To select a portion of video between keyframes, use the <kbd>UP</kbd> and <kbd>DOWN</kbd> arrow keys on your keyboard to find the first keyframe of the video portion, and click the <strong><code>[A</code></strong> button on AviDemux. Then use the <kbd>UP</kbd> and <kbd>DOWN</kbd> arrow keys to again move to the final key frame of the video portion, and click the <strong><code>][B</code></strong> button on Avidemux. This will select the portion of video between the 2 keyframes.</p>
<p>You can now either delete this portion or click save to just extract and save this portion of the video. No re-encoding will be done.</p>
<p>More information on how to cut or extract videos on Avidemux can be read here - <a href="https://www.avidemux.org/admWiki/doku.php?id=using:cutting" rel="nofollow noreferrer">Simple cutting on Avidemux</a>.</p>
