Trim Video and Add Logo Slug to Beginning of Video

Mindwatering Incorporated

Author: Tripp W Black

Created: 05/12 at 04:09 PM

 

Category:
Animation
Other

Task:
Take existing MP4 which requires some trimming. We need to trim off the old intro, trim off the content after a certain time, and add a new animation intro video.

Prerequisites:
Make sure that both videos are encoded the same way:
e.g. h264, 30 fps, 1920x1080 resolution, audio - aac stereo

Copied video to trim to the bin folder since ffmpeg has not been installed to the $Path variable:
$ cd /Volumes/Apps/Other Apps/ffmpeg2020/bin/

Perform trim:
The following command trims off first 10 seconds of the file DockerLearningWebinar1.mp4.
$ ./ffmpeg -ss 00:00:10 -i DockerLearningWebinar1.mp4 -codec copy DockerLearningWebinar1b.mp4

The following command trims off the video after the first 2 minutes and 48 seconds:
$ ./ffmpeg -ss 00:00:00 -to 00:02:48 -i DockerLearningWebinar1b.mp4 -codec copy DockerLearningWebinar1c.mp4


Create a list of the files to concatenate. Verify the contents.
(Use TextEdit or the vi console program to create the list.)
e.g. cliplist.txt
$ cat cliplist.txt
file 'dustrevcolor.mp4'
file 'DockerLearningWebinar1c.mp4'

Perform the concatenation w/o recoding:
$ ./ffmpeg -f concat -safe 0 -i cliplist.txt -codec copy DockerLearningWebinar1Final.mp4

Notes:
- This only works if both clips have video and audio, and they are the same formats.
- Warning: If there is no audio in the intro clip, then the whole video will have no audio.

If the concat doesn't work, then do it the "long" way:
Open in Avid Media Composer, drop both the new intro and the trimmed mp4 in the timeline, and export again.
or
Open in Shotcut, drop both into the playlist, drag both into the timeline, and export again.





previous page