How to cut a mp4 video
Problem:
You have a video and just need cut a part and save!. You don’t need to re-encode the video.
Solution 1: Using ffmpeg in bash
INPUT="/media/rogelio/curso-linux/Sesion 6.mp4"
OUTPUT="/media/rogelio/curso-linux/output.mp4"
ffmpeg -i "$INPUT" -ss 00:27:43 -to 03:05:57 -vcodec copy -acodec copy "$OUTPUT"
⚠️ Note: If you need to use a more precise unit, less than a second, you need to reencode the video (not copy vcodec or acodec). Example cut video from 0.5 to 12 seconds:
ffmpeg -i "$INPUT" -ss 00:00:0.5 -to 00:00:12 -c:v libx264 -acodec copy "$OUTPUT" && xdg-open $OUTPUT
Solution 2: Using Kdenlive software
If you are in for the easy graphical interface, then there’s actually a way to do this:
- Start Kdenlive or start new empty project.
- Drag your source video clip into the project bin.
- Select your clip, so it gets shown in the clip monitor.
- Use the clip monitor controls to play and pause, etc.
- To set the start point: this is termed in “in” point by simply pressing the “I” key. A marker will appear on the time scale in the clip monitor.
- To set the end point or “out” point: press the “O” key. A second marker appears and the region in between is highlighted.
- Right click in the monitor and select “save region” (or “Extract zone” in version 22).
- Enter new filename, click ok.
- Your clip in the project bin will show a progress bar. Wait for it to disappear.
Source:
https://thediveo-e.blogspot.com/2013/09/trimming-video-files-lossless-using.html
https://forum.kde.org/viewtopic.php?f=265&t=130552&p=459516#p459516