libvpx在windows下的编译

本文档详细介绍了在Windows环境下使用Libvpx进行安装配置的方法,并解决了安装过程中遇到的常见问题。此外,还提供了VP9编码器的具体命令参数示例,帮助读者快速上手视频编解码任务。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  

1、安装

 安装过程参考:https://stackoverflow.com/questions/20676347/building-libvpx-under-windows-7-yasm-error

也可参考:https://www.cnblogs.com/endv/p/6866947.html

 github上已有的vs2010工程:https://github.com/ooyanglinoo/Plugin_Videoplayer/tree/master/libvpx

 备注:MINGW下生成libvx的参数配置可参考configure --target=x86-win32-vs8 --enable-static-msvcrt --disable-install-docs

2、运行VS工程出现的问题

ISSUE1:

  出现的问题: yasm: FATAL: unrecognized object format `Win32'

REASON1;

There is a slight change in 1.3.0 YASM's naming of platforms. Libvpx build system need to be updated to be compatible for these changes: 
Yasm-1.2 -> Yasm-1.3
 Win32   ->  win32
 x64     ->  win64

SOLUTION1:

原因:区分大小写……应该用 win32 而不是 Win32,您可以改一下工程平台的名字,但默认都是 Win32,不太方便,所以我们要对 vsyasm.props 进行改造:

<CommandLineTemplate>"$(YasmPath)"vsyasm.exe -Xvc -f $(Platform) [AllOptions] [AdditionalOptions] [Inputs]</CommandLineTemplate>

替换为:

<CommandLineTemplate>"$(YasmPath)vsyasm.exe" -Xvc -f $(Platform.ToLower()) [AllOptions] [AdditionalOptions] [Inputs]</CommandLineTemplate>

或者:

<CommandLineTemplate>"$(YasmPath)vsyasm.exe" -Xvc -f win$(PlatformArchitecture) [AllOptions] [AdditionalOptions] [Inputs]</CommandLineTemplate>

保存即搞定,连 VS 都不需要重启。

3、VP9的命令参数

编码:
vpxenc.exe RaceHorses_416x240_30.yuv --width=416 --height=240  --codec=vp9 --rt --passes=1 --verbose --psnr --cpu-used=6 --threads=0 --auto-alt-ref=1 --profile=0 --lag-in-frames=0 --cq-level=20 --end-usage=0 --disable-kf --drop-frame=0 --static-thresh=0 --arnr-maxframes=7 --arnr-strength=5 --arnr-type=3 --sharpness=0 --undershoot-pct=100 --limit=50 --skip=0 --fps=30/1 --min-q=30 --max-q=38  -o RaceHorses_416x240_30.vp9 --tune=psnr

解码:
vpxdec.exe RaceHorses_416x240_30.vp9 -o RaceHorses_416x240_30_dec.yuv --i420


参考网址:http://blog.youkuaiyun.com/leixiaohua1020/article/details/19014955

参考网址:http://www.voidcn.com/article/p-reaanyla-boq.html

参考网址:https://bugs.chromium.org/p/webm/issues/detail?id=843


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值