Content

Getting VP9/VP9

Build VP9/Vp8 Source for Windows

Running VP9/VP8

 

 

Getting VP9/VP8 Source

The official VP9/VP8 source: https://chromium.googlesource.com/webm/libvpx

git clone https://chromium.googlesource.com/webm/libvpx  vpx

 

Build VP9/VP8 Source for Windows

Open (or run) MSYS2

Note: if you have not MSYS2 installed on your machine, you need to install it from https://www.msys2.org .

Check that MSYS2 contains gcc, make, nasm and diffutils, merely type ‘gcc‘ and if ‘command not found’ appears then ‘gcc‘ is not installed.

To install the above tools type the following commands: 

pacman -S mingw-w64-ucrt-x86_64-gcc 

pacman -S make

pacman -S nasm

pacman -S diffutils

 

In the MSYS2 window enter to the folder vpx (e.g. ‘cd /c/Tools/vpx‘) and type the following command to create make-files:

./configure –disable-unit-tests –enable-vp8 –as=nasm –enable-vp9 –target=x86_64-win64-gcc

Note: you can create make-files to build Visual Studio solution: ./configure –disable-unit-tests –enable-vp8 –as=nasm –enable-vp9 –target=x86_64-win64-vs17

but the build of the code is tricky (you need install pthread and manually retarget Toolsets, if your VS is 2019 or higher).

 

In the MSYS2 window  run ‘make‘ to compile the sources vpxenc.exe and vpxdec.exe are created in the folder ‘vpx’.

 

Running VP9/VP8 Codec

Encoding

Example [encode 100 frames in VP9, VBR Rate Control, target bitrate 10Mbps, single pass, fast mode]:

vpxenc.exe  Fifa1080p.yuv -w 1920 -h 1080 --limit=100 --codec=vp9 --cpu-used=5 --passes=1 --kf-max-dist=30 --end-usage=vbr --target-bitrate=10000 -o test.webm

--cpu-used=5                     fast mode

--passes=1                          single pass Rate Control

--end-usage=vbr             VBR Rate Control

--target-bitrate=10000  target bitrate in kbps (only in units of kbps)

--codec=vp9                     VP9 standard

--kf-max-dist=30                GOP length in frames

-o test.webm                       output file in the format WebM

To encode VP8 use ‘--codec=vp8'

Anyway, you can get full hep by typing ‘vpenc.exe --help‘ .

 

Decoding

To create output yuv in yuv420p format use --rawvideo

vpxdec --rawvideo -o test1080p.yuv   test.webm

Here test.webm is input file and ‘-o test1080p.yuv‘ is the output yuv-file, the resolution is signaled within WebM header (so, no sense to type the resolution).

With ‘ffplay’ you can run the output yuv-file (by default ffplay set pixel format to yuv420p):

ffplay -f rawvideo -video_size 1920×1080 test1080p.yuv

10 Responses

  1. I like what you guys are up too. Such clever work and reporting! Carry on the superb works guys I?ve incorporated you guys to my blogroll. I think it will improve the value of my website 🙂

  2. This is very interesting, You are a very skilled blogger. I have joined your feed and look forward to seeking more of your excellent post. Also, I have shared your web site in my social networks!

  3. I am now not certain the place you are getting your information, but great topic. I needs to spend some time learning much more or working out more. Thank you for fantastic info I was in search of this info for my mission.

  4. After examine a few of the blog posts in your web site now, and I actually like your method of blogging. I bookmarked it to my bookmark website list and might be checking again soon. Pls take a look at my site as properly and let me know what you think.

Leave a Reply

Your email address will not be published. Required fields are marked *