If you are looking for fully open source video editing software for Linux, there are actually many options, but in my experience, they all lack something or other.
The closest thing you can get to professional video editing on Linux is Lightworks, but that’s still closed source.
Mind that the input file is using an MKV container, whereas the output file is using an MP4 container.Let’s admit it, professional grade video editing is still a weakness of the Linux desktop. If we have two different containers, we can specify the copying options separately: $ ffmpeg -i my_video.mkv -ss 00:00:15 -to 00:00:25 -acodec copy -vcodec copy clip.mp4 If we’re using different containers, we’ll be presented with a container mismatch error. The above command works well if we’re using the same container for both input and output videos.
Finally, it will carry out an audio correction to match the timestamp and re-encode the video with the original my_video.mp4 codec.Īlternatively, if we need a more time-accurate cut, we can manually add the keyframes to the start and end of the clipped video: $ ffmpeg -i my_video.mp4 -force_key_frames 00:00:15,00:00:25 clip.mp4 The value of -t is added to the sought timestamp, which is 15 seconds. The command above will process the my_video.mp4 input file and seek 15 seconds forward in the video. The value 1 will correct the start of the stream without any later correction.