ffmpeg+libx264不是装好就能work的,具体来说,需要在ffmpeg的命令行中加入一些option才能工作,具体请看这篇文章

下面是正确的命令行:

x264 – Recommended General Options

For all rate control methods you will probably want libx264 to select the number of threads to use to maximise its performance on your CPU(s):

-threads 0

Two-Pass Example

So if you wanted to encode using two-pass VBR, the command line would be something like:

ffmpeg -i INPUT -an -pass 1 -vcodec libx264 -vpre slow_firstpass -b BIT_RATE -bt BIT_RATE -threads 0 OUTPUT.mp4

Note: We don’t encode the audio in the first pass because we will not be using the data that was output.

ffmpeg -i INPUT -acodec libfaac -ab 128k -pass 2 -vcodec libx264 -vpre slow -b BIT_RATE -bt BIT_RATE -threads 0 OUTPUT.mp4

Single-Pass Constant Rate Factor (CRF) Example

Or for a single pass CRF encode:

ffmpeg -i INFILE -acodec libfaac -ab 96k -vcodec libx264 -vpre slow -crf 22 -threads 0 OUTPUT.mp4

相关文章:

  • 2022-12-23
  • 2021-10-25
  • 2021-10-22
  • 2021-09-23
  • 2022-12-23
  • 2021-07-30
  • 2021-07-10
猜你喜欢
  • 2021-05-27
  • 2022-12-23
  • 2022-03-08
  • 2021-04-03
  • 2021-07-21
相关资源
相似解决方案