Welcome to 16892 Developer Community-Open, Learning,Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I want to compress a 1 minute video in less than a minute on Android using ffmpeg in the best possible quality. But when the time is short, the quality is low and when the quality is good, it takes a long time to compress. Do you know the right command?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
611 views
Welcome To Ask or Share your Answers For Others

1 Answer

For "best quality" at fastest encoding speed:

ffmpeg -i input.mp4 -c:v libx264 -crf 18 -preset veryfast output.mp4
  • This assumes you want H.264 + AAC in MP4.
  • If input audio is AAC add -c:a copy.
  • If -preset veryfast is too slow use -preset ultrafast.
  • See FFmpeg Wiki: H.264 for more info and examples.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to 16892 Developer Community-Open, Learning and Share
...