Skip to content

FFmpeg_test

iPhone movie

iMovie


FFmpeg

site: Download

class: HTML5 MP4 ffmpeg encoding

1
2
3
4
5
6
7
variable bit rate 1080p MP3:

ffmpeg -i input_video -vcodec libx264 -crf 25 -preset medium -vf scale=-2:1080 -acodec libmp3lame -q:a 4 -ar 48000 -ac 2 output_video.mp4

fixed bit rate 1080p MP2:

ffmpeg -i input_video -vcodec libx264 -b:v 1000k -vf scale=-2:1080 -acodec mp2 -b:a 256k -ar 48000 -ac 2 output_video.mp4

variable bit rate 1080p MP3:

1
2
3
4
input_video -> imovie_out_Qhigh.mp4
output_video.mp4 -> ffmpeg_out_Qhigh_variableBitRate.mp4  

ffmpeg -i imovie_out_Qhigh.mp4 -vcodec libx264 -crf 25 -preset medium -vf scale=-2:1080 -acodec libmp3lame -q:a 4 -ar 48000 -ac 2 ffmpeg_out_Qhigh_variableBitRate.mp4

In Terminal

1
2
3
4
$ cd path/to/imovie_out_Qhigh.mp4
$ ls
imovie_out_Qhigh.mp4
$ ffmpeg -i imovie_out_Qhigh.mp4 -vcodec libx264 -crf 25 -preset medium -vf scale=-2:1080 -acodec libmp3lame -q:a 4 -ar 48000 -ac 2 ffmpeg_out_Qhigh_variableBitRate.mp4

fixed bit rate 1080p MP2:

1
2
3
4
input_video -> imovie_out_Qhigh.mp4
output_video.mp4 -> ffmpeg_out_Qhigh_fixedBitRate.mp4

ffmpeg -i imovie_out_Qhigh.mp4 -vcodec libx264 -b:v 1000k -vf scale=-2:1080 -acodec mp2 -b:a 256k -ar 48000 -ac 2 ffmpeg_out_Qhigh_fixedBitRate.mp4

In Terminal

1
2
3
4
$ cd path/to/imovie_out_Qhigh.mp4
$ ls
imovie_out_Qhigh.mp4
$ ffmpeg -i imovie_out_Qhigh.mp4 -vcodec libx264 -b:v 1000k -vf scale=-2:1080 -acodec mp2 -b:a 256k -ar 48000 -ac 2 ffmpeg_out_Qhigh_fixedBitRate.mp4

video.clip

Note

summary slide (presentation.png, 1920x1080)
video clip (presentation.mp4, 1080p HTML5, < ~minute, < ~10 MB) and put them in your root directory

copy or rename to presentation.mp4

Root directory

URL to be linked

1
2
http://fabacademy.org/2021/labs/kannai/students/your-name/presentation.mp4
http://fabacademy.org/2021/labs/kannai/students/your-name/presentation.png

Last update: May 24, 2021