Sure, ffmpeg is the right tool for this job. I still have not the slightest clue what this amazing piece of code can do and where its limits are ... but judging from the enormous list of command line options, its functions must be legion.
For my task at hand, I just needed to extract some part of a video file without any loss of quality. Put to task on one of my GoPro HD Hero 3 video files, the command line looks like this:
ffmpeg -i video.mp4 -ss 00:11:00 -t 00:01:00 -vcodec copy -acodec copy cutvid.mp4The options are as follows:
- -i input-file: name of the source (or input) video file, here: «video.mp4».
- -ss start-timestamp: the timestamp in format HH:MM:SS, from which the video should be copied into a new file. If you leave out this option, then ffmpeg will copy right from the beginning of the source video file.
- -t duration: duration of video to copy, again in format HH:MM:SS.
- output-file: the name of the output video file to be created. For instance, in our example this will be «cutvid.mp4».