mp4转vp9

./ffmpeg -i test.mp4 -pix_fmt yuv420p10le -c:v libvpx-vp9 -b:v 0 -crf 31 -speed 1 -quality good -static-thresh 4  -lag-in-frames 25  -f webm out.webm

yuv转vp9,需要指定yuv的高宽

//转vp9
./ffmpeg -pix_fmt yuv420p -s 704*576  -i  out.yuv  -c:v libvpx-vp9  -speed 4 -static-thresh 4  -lag-in-frames 25  -f webm out_vp9.webm//转vp8
./ffmpeg -pix_fmt yuv420p -s 704*576  -i  out.yuv  -c:v libvpx  -speed 4 -static-thresh 4  -lag-in-frames 20  -f webm out_vp8.webm

VP9 Encoding Guide

Last Modified: 2016-05-18

Examples given are for 2-pass VP9 encoding with FFMpeg. Ensure that your FFMpeg has been built with libvpx support.

VOD Recommended Settings

ffmpeg -i <source> -c:v libvpx-vp9 -pass 1 -b:v 1000K -threads 8 -speed 4 \-tile-columns 6 -frame-parallel 1 \-an -f webm /dev/nullffmpeg -i <source> -c:v libvpx-vp9 -pass 2 -b:v 1000K -threads 8 -speed 1 \-tile-columns 6 -frame-parallel 1 -auto-alt-ref 1 -lag-in-frames 25 \-c:a libopus -b:a 64k -f webm out.webm

c:v libvpx-vp9 tells FFmpeg to encode the video in VP9.

c:a libopus tells FFmpeg to encode the audio in Opus.

b:v 1000K tells FFmpeg to encode the video with a target of 1000 kilobits.

b:a 64k tells FFmpeg to encode the audio with a target of 64 kilobits.

Most of the current VP9 decoders use tile-based, multi-threaded decoding. In order for the decoders to take advantage of multiple cores, the encoder must set tile-columns and frame-parallel.

Setting auto-alt-ref and lag-in-frames >= 12 will turn on VP9's alt-ref frames, a VP9 feature that enhances quality.

speed 4 tells VP9 to encode really fast, sacrificing quality. Useful to speed up the first pass.

speed 1 is a good speed vs. quality compromise. Produces output quality typically very close to speed 0, but usually encodes much faster.

Multi-threaded encoding may be used if -threads > 1 and -tile-columns > 0.

DASH Recommended Settings

See http://wiki.webmproject.org/adaptive-streaming/instructions-to-playback-adaptive-webm-using-dash for WebM DASH settings.

Best Quality (Slowest) Recommended Settings

ffmpeg -i <source> -c:v libvpx-vp9 -pass 1 -b:v 1000K -threads 1 -speed 4 \-tile-columns 0 -frame-parallel 0 \-g 9999 -aq-mode 0 -an -f webm /dev/nullffmpeg -i <source> -c:v libvpx-vp9 -pass 2 -b:v 1000K -threads 1 -speed 0 \-tile-columns 0 -frame-parallel 0 -auto-alt-ref 1 -lag-in-frames 25 \-g 9999 -aq-mode 0 -c:a libopus -b:a 64k -f webm out.webm

tile-columns 0frame-parallel 0: Turning off tile-columns and frame-parallel should give a small bump in quality, but will most likely hamper decode performance severely.

Constant Quality Recommended Settings

Objective is to achieve a constant (perceptual) quality level without regard to bitrate.

(Note that Constant Quality differs from Constrained Quality, described below.)

ffmpeg -i <source> -c:v libvpx-vp9 -pass 1 -b:v 0 -crf 33 -threads 8 -speed 4 \-tile-columns 6 -frame-parallel 1 \-an -f webm /dev/nullffmpeg -i <source> -c:v libvpx-vp9 -pass 2 -b:v 0 -crf 33 -threads 8 -speed 2 \-tile-columns 6 -frame-parallel 1 -auto-alt-ref 1 -lag-in-frames 25 \-c:a libopus -b:a 64k -f webm out.webm

crf is the quality value (0-63 for VP9). To trigger this mode, you must use a combination of crf <q-value> and b:v 0bv MUST be 0.

Constrained Quality Recommended Settings

Objective is to achieve a constant (perceptual) quality level as long as the bitrate achieved is below a specified upper bound. Constrained Quality is useful for bulk encoding large sets of videos in a generally consistent fashion.

ffmpeg -i <source> -c:v libvpx-vp9 -pass 1 -b:v 1400K -crf 23 -threads 8 -speed 4 \-tile-columns 6 -frame-parallel 1 \-an -f webm /dev/nullffmpeg -i <source> -c:v libvpx-vp9 -pass 2 -b:v 1400K -crf 23 -threads 8 -speed 2 \-tile-columns 6 -frame-parallel 1 -auto-alt-ref 1 -lag-in-frames 25 \-c:a libopus -b:a 64k -f webm out.webm

The quality desired is provided as the crf <q-value> parameter and the bitrate upper bound is provided as the b:v <bitrate> parameter, where bitrate MUST be non-zero.

Both crf <q-value> and b:v <bitrate> MUST be provided. In this mode, bitrate control will kick in for difficult videos, where the quality specified cannot be achieved within the given bitrate.

For easy videos, this mode behaves exactly like the constant quality mode, and the actual bitrate achieved can be much lower than the specified bitrate in the b:v parameter.

One caveat in FFMpeg is that if you do not provide the b:v parameter, FFMpeg will assume a default target bitrate of 256K -- so the constrained quality mode will be triggered with a potentially very low target bitrate.

ffmpeg 命令转vp9相关推荐

  1. 【FFmpeg】ffmpeg命令详解(三)高级选项

    ffmpeg命令详解(三)高级选项 1.-map 2.-ignore_unknown 3.-copy_unknown 4.-map_channel 5.-map_metadata 6.-map_cha ...

  2. 【FFmpeg】ffmpeg命令详解(二)

    ffmpeg命令详解(二) 4.流选择 4.1 自动选择流 4.2 手动选择流 5.命令行选择详解 5.1 命令行选项的值说明: 5.2 流说明符 5.3 通用选项 5.4 主选项 5.5 视频相关选 ...

  3. 【FFmpeg】ffmpeg命令详解(一)

    ffmpeg命令详解(一) 1.命令格式 2.简述 3.详细说明 3.1 过滤器 3.1.1 简单的过滤器图 3.1.2 复杂的过滤器图 3.2 流拷贝 1.命令格式 ffmpeg [global_o ...

  4. java rtmp_搭建rtmp直播流服务之2:使用java实现ffmpeg命令接口化调用(用java执行ffmpeg命令)...

    一.环境搭建 1.安装ffmpeg 下载对应系统的ffmpeg安装包,个人采用windows平台进行开发,所以安装了windows版本(各平台ffmpeg命令都是一样的,无须纠结) 2.ffmpeg的 ...

  5. android音视频工程师,音视频学习 (十三) Android 中通过 FFmpeg 命令对音视频编辑处理(已开源)...

    ## 音视频学习 (十三) Android 中通过 FFmpeg 命令对音视频编辑处理(已开源) ## 视音频编辑器 ## 前言 有时候我们想对音视频进行加工处理,比如视频编辑.添加字幕.裁剪等功能处 ...

  6. linux下使用ffmpeg命令录屏桌面

    1 获取自己的屏幕分辨率 之所以要获取屏幕的分辨率,是因为录屏需要选择录制的范围! 1.在linux中可以直接使用xrandr命令查看屏幕当前分辨率(参考) xrandr base) shl@zhih ...

  7. 【FFmpeg】ffmpeg 命令查询二 ( 比特流过滤器 | 可用协议 | 过滤器 | 像素格式 | 标准声道布局 | 音频采样格式 | 颜色名称 )

    FFmpeg 系列文章目录 [FFmpeg]Windows 搭建 FFmpeg 命令行运行环境 [FFmpeg]FFmpeg 相关术语简介 ( 容器 | 媒体流 | 数据帧 | 数据包 | 编解码器 ...

  8. 【FFmpeg】Windows 搭建 FFmpeg 命令行运行环境

    文章目录 前言 一.下载 FFMPEG 二.拷贝可执行文件 三.拷贝动态库文件 四.运行 ffmpeg 命令 总结 前言 Android 中需要使用到 FFMPEG , 先在 Windows 中搭建一 ...

  9. ffmpeg命令详解(转)

    一.ffmpeg命令详解 ffmpeg非常强大,轻松几条命令就可以完成你的工作. 把darkdoor.[001-100].jpg序列帧和001.mp3音频文件利用mpeg4编码方式合成视频文件dark ...

  10. ffmpeg命令_使用ffmpeg命令为多个短视频修改视频备注说明

    今天主要给大家讲一下使用视频剪辑高手中的ffmpeg命令为多个短视频修改备注说明的详细步骤,有需要和感兴趣的宝贝们可以跟随小编一起来试试. 收集视频 将需要剪辑的短视频保存到同一文件夹上 进入软件 双 ...

最新文章

  1. 反射效果,自己公司内部编码,在text上输入内容后,通过输入内容查询数据库,弹出下拉框
  2. 6.Spring Cloud Alibaba教程:Sentinel流量防卫兵的介绍与基本使用
  3. Sage CRM升级注意事项一
  4. MySQL 高级 while循环
  5. github 检查代码质量_Android(8): 代码质量检查
  6. [html] H5的video可以播放哪些类型的文件?可以播放rtsp流吗?
  7. Arcgis自下而上从左到右进行编号
  8. mac 下更新python
  9. 判断两个时间段是否重叠的算法
  10. 计算机机房用发电机组,应急康明斯计算机机房用发电机组怎么选有窍门
  11. 阿里将开源进行到底!
  12. 学习HanNLP2015年12月4日 16:24:53
  13. python的猴子补丁monkey patch
  14. 锐捷校园网环境下使用虚拟机上网
  15. 微信小程序登录界面的实现
  16. ADC模数转换器 动态范围,精确度bit和分辨率最低辨别电压多少V
  17. 数学建模笔记——评价类模型(二)
  18. 微信小程序入门开发教程(详解)
  19. 【Unity3D】学习笔记(第2记) 2D游戏开发基本技巧之背景制作
  20. STM32F4设置NVIC中断优先级分组

热门文章

  1. electron仿制百度网盘客户端2(登录界面制作)
  2. k8s 删除资源卡住
  3. HTML课程导航作业,北大青年课程导航.html
  4. psv leapftp使用教程,psv leapftp使用教程图解
  5. 如鹏网.NET软件工程师提高班 杨中科.net高级视频
  6. 远程时间管理软件 - 工时通
  7. 揭秘淘宝286亿海量图片存储与处理架构
  8. o2o模式主要利用在哪些领域 企业怎么发展o2o模式?
  9. O2O两种典型运作模式结合案例分析
  10. 如何开展o2o营销活动?