
It can help you handle big files easily without breaking any sweat. Video Merger +įFmpeg is a great library that can help you convert, resize, merge, or combine videos easily when any other process fails. Lazily enough, I created a temporary directory on Desktop where I was storing the intermediate files as well as a single resulting video file.Video Editing Tips TRY IT FREE TRY IT FREE 1. First, it read two command line arguments, with the first ( $1) containing the path to the video file and with the second ( $2) storing the path to the file with the timestamps.

Once such file was ready, I applied the following script:Įcho "Video cutting and assembling: $video_file "Įcho "Timestamps file: $timestamps_file "ĭo # Make array from the line (space-separated timestamps)Ĭlip_end = $ -gt 1 ] thenįfmpeg -y -f concat -safe 0 -i "$filelist " -c copy "$tmp_dir /merged.mp4" fi My approach to recording timestamps was to create a line for each “good” small portion of the video I wanted to produce, delimited with a starting and ending timestamp im the format of HH:MM::SS: 01:26:10 01:44:04 Once I was done with a portion of the original file that would further constitute a smaller clip with removed “bad” parts, I ran a bash script utilizimg ffmpeg to cut the big video in a set of smaller ones and then assemble them back in one single file. My overall workflow was quite simple: I was rewatching the videos in VLC and recorded timestamps I wanted to cut away in a text file. In this blog post I am going to summarize my experience with this task. Surely, I wanted to do this programmatically using ffmpeg.


Most parts of the videos contained the content I wanted to preserve, but I wanted to cut away some small portions and, additionally, split the big video files into a series of smaller ones. This summer I had a task of processing a large collection of videos that I recorded myself while teaching a course at NTNU.
