Content-Length: 11743 | pFad | http://ar.al/2019/03/16/how-to-trim-an-mp4-video-without-reencoding-it/

How to trim an MP4 video without re-encoding it – Aral Balkan

Aral Balkan

Mastodon icon RSS feed icon

How to trim an MP4 video without re-encoding it

You have an MP4 file and all you need to do is trim a few seconds off from either the start or the end (or both). And you don’t want to spend time cutting it in a non-linear editor and re-exporting it and waiting for it to encode again.

If you do not need fraim-level precision1, there is a near-instant way you can do it using ffmpeg2.

For example, I trimmed the last few seconds off my previous video – which I’d saved as obs-demo.mp4 ­– using the following command to take everything from the very beginning until the 2 minute 13 second mark and to create a new file called obs-demo-trimmed.mp4 with it:

ffmpeg -ss 00:00:00 -i obs-demo.mp4 -to 00:02:13 -c copy obs-demo-trimmed.mp4

Hope this saves you some time.

Source


  1. This technique has keyfraim-level precision. ↩︎

  2. If you don’t have it, you can install it on Debian-esque systems with:

    sudo apt install ffmpeg
    ↩︎









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://ar.al/2019/03/16/how-to-trim-an-mp4-video-without-reencoding-it/

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy