Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FFmpeg 音视频转码命令 #105

Open
Qingquan-Li opened this issue Jul 13, 2018 · 0 comments
Open

FFmpeg 音视频转码命令 #105

Qingquan-Li opened this issue Jul 13, 2018 · 0 comments
Labels

Comments

@Qingquan-Li
Copy link
Owner

Qingquan-Li commented Jul 13, 2018

环境:

  • macOS

一、FFmpeg 简介

  1. 维基百科: https://zh.wikipedia.org/wiki/FFmpeg
  2. 官网: http://ffmpeg.org


二、FFmpeg 安装

macOS 环境下使用 Homebrew 安装:

$ brew install ffmpeg


三、FFmpeg 使用

语法:

$ ffmpeg -i input.mp4 output.avi

实例:

ffmpeg01

FFmpeg常用基本命令

参考: http://www.cnblogs.com/dwdxdy/p/3240167.html

常用的参数:

  • -crf : 控制转码后视频的质量,取值范围为 0 到 51 ,其中 23 是默认值(如果没有指定此参数)。值越小,质量越高,但文件也越大,建议的值范围是 18 到 28 。而值 18 是视觉上看起来接近无损的,当然不代表是数据(技术上)的转码无损,并且文件不会过大。更多参考: FFmpeg视频转码技巧之-crf参数

    $ ffmpeg -i /Users/fatli/Desktop/video01.wmv -crf 18 video01.mp4
  • -s : 分辨率控制。

    $ ffmpeg -i /Users/fatli/Desktop/video02.wmv -s 1920x1080 video02.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant