zoukankan      html  css  js  c++  java
  • ffmpeg+libx264编码H.264的视频

    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

  • 相关阅读:
    如何解决加载动态链接库DLL失败,返回0,GetLastError返回错误码126
    如何实现点击激活窗体同时窗体不跑到最前覆盖其他窗体
    数据库04
    数据库03
    数据库02
    数据库01
    Linux02
    Linux01
    软件质量
    HTML04
  • 原文地址:https://www.cnblogs.com/super119/p/1904329.html
Copyright © 2011-2022 走看看