Add fade to black transition to MP4 video #
3 methods, from least to most efficient. Original MP4 video clip ≈ 2.4MB.
- iMovie 10.1.2:
- File > New Movie...
- Drag MP4 video into project
- Window > Content Library > Transitions
- Click and drag Fade to Black transition to end of video
- File > Share > File...
- At the lowest resolution and quality settings, the resulting MP4 was ≈ 12.5MB
- ScreenFlow 5.0.6:
- File > New > New Document
- Set custom width and height to match existing MP4 file
- Insert > Choose... > select MP4 file
- Highlight imported video clip
- Edit > Add Ending Transition
- File > Export...
- With no scaling and using the "Web - Low" preset, the resulting MP4 was ≈ 2.7MB
- ffmpeg 2.6.2:
- Open original MP4 in QuickTime
- Navigate to end of video and change time display to Frame Number, noting the number displayed (e.g., 927)
- $ ffmpeg -i in.mp4 -vf "fade=out:900:27" -acodec copy out.mp4
- Resulting MP4 was ≈ 2.1MB (yes, smaller than the original!)
Thanks to LordNeckbeard's tip and link to FFmpeg's fade filter documentation.
UPDATE:
Add fade in and fade out:
$ ffmpeg -i in.mp4 -vf "fade=in:0:10,fade=out:900:27" -acodec copy out.mp4
Concatenate MP4 files:
$ cat mp4s.txt
file '/path/to/1.mp4'
file '/path/to/2.mp4'
file '/path/to/3.mp4'
$ ffmpeg -f concat -safe 0 -i mp4s.txt -c copy out.mp4
Added -safe 0 to resolve "Unsafe file name" error.
/mac | Nov 24, 2016
Subscribe or visit the archives.