FFMPEG VIDEO TRANSCODING COMMAND INTRODUCTION

  1. FFMPEG source code download

    Download link

  2. Install FFMPEG under Linux

    tar -xjvf ffmpeg-4.1.3.tar.bz2
    
    cd ffmpeg-4.1.3
    
    ./configure --enable-shared --prefix=/usr/local/
    
    make
    
    make install
    
    export PATH=\$PATH:/usr/local/bin
    

    --prefix=/usr/local is the installation path, which can be set by yourself, run ffmpeg in the terminal.

    Use –version to check whether the installation is successful.

  3. Transcoding command

    1. Convert H.264 encoded video to without B frame

      ffmpeg -i input.mp4 -c:v libx264 -x264-params "bframes=0:ref=1" -strict -2

      output.mp4

    2. Convert H.265 encoded video to without B frame

      ffmpeg -i input.mp4 -c:v libx265 -x265-params "bframes=0:ref=1" -strict -2

      output.mp4