ffmpeg + mp4 encoding

Here’s two example ffmpeg commands for two-pass encoding:
First pass:
ffmpeg -i <inputfile> -title “<title>” -vcodec mpeg4 -acodec libfaac -b 672k -ab 96k -ar 24000 -s 480×272 -aspect 16:9 -g 300 -aic 2 -mbd 2 -cmp 3 -precmp 3 -subcmp 3 -trellis 2 -flags +4mv+trell -pass 1 -f psp Video.mp4
Second pass:
ffmpeg -i <inputfile> -title “<title>” -vcodec mpeg4 -acodec libfaac -b 672k -ab 96k -ar 24000 -s 480×272 -aspect 16:9 -g 300 -aic 2 -mbd 2 -cmp 3 -precmp 3 -subcmp 3 -trellis 2 -flags +4mv+trell -pass 2 -f psp Video.mp4

The meaning of the options:
-i <inputfile>
-title <title>
-acodec <audio codec>
-ab <audio bitrate>
-ar <audio rate>
-vcodec <video codec>
-b <video bitrate>
-s <resolution>
-aspect <aspect ratio>
-f <format>
All the other flags are options to optimize the video quality, at the expense of encoding speed.

서진우

슈퍼컴퓨팅 전문 기업 클루닉스/ 상무(기술이사)/ 정보시스템감리사/ 시스존 블로그 운영자

You may also like...

페이스북/트위트/구글 계정으로 댓글 가능합니다.