#2253 closed enhancement (fixed)
Support for VP8 and VP9 video codec
Reported by: | ming | Owned by: | ming |
---|---|---|---|
Priority: | normal | Milestone: | release-2.10 |
Component: | pjmedia-videodev | Version: | trunk |
Keywords: | Cc: | ||
Backport to 1.x milestone: | Backported: | no |
Description (last modified by nanang)
Add support for VP8 and VP9 video codec using libvpx.
During our testing, for the same bitrate, VP8 quality seems to be better than H264, but the encoding speed is noticeably slower. For VP9 however, as documented by several other sources as well [1][2], the encoding speed is much much slower, even though we have followed the recommended setting for "Real-time CBR Encoding and Streaming" from their doc here. Because of this, VP9 is currently by default disabled. To enable it, you can set PJMEDIA_HAS_VPX_CODEC_VP9 compile-time macro.
[1] https://blogs.gnome.org/rbultje/2014/02/22/the-worlds-fastest-vp9-decoder-ffvp9/
[2] https://www.streamingmedia.com/Articles/ReadArticle.aspx?ArticleID=111334
Steps to use VP8/VP9
- Download libvpx.
- Build and install. General build steps can be found in libvpx README file.
- For Android, these steps can be used:
export NDK=/path/to/Android-NDK export HOST_TAG=linux-x86_64 # adjust to your building host export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG export AR=$TOOLCHAIN/bin/aarch64-linux-android-ar export AS=$TOOLCHAIN/bin/aarch64-linux-android-as export CC=$TOOLCHAIN/bin/aarch64-linux-android21-clang export CXX=$TOOLCHAIN/bin/aarch64-linux-android21-clang++ export LD=$TOOLCHAIN/bin/aarch64-linux-android-ld export RANLIB=$TOOLCHAIN/bin/aarch64-linux-android-ranlib export STRIP=$TOOLCHAIN/bin/aarch64-linux-android-strip ./configure --target=arm64-android-gcc --enable-pic --disable-examples \ --disable-tools --disable-docs --enable-realtime-only \ --disable-install-bins --disable-unit-tests --disable-webm-io \ --disable-libyuv \ --prefix=/path/to/target/installation
- For Android, these steps can be used:
- Libvpx will then be autodetected by PJSIP configure script (alternatively, you can specify --with-vpx option).
Change History (7)
comment:1 Changed 5 years ago by ming
- Owner set to ming
- Resolution set to fixed
- Status changed from new to closed
comment:2 Changed 5 years ago by riza
In 6147:
comment:3 Changed 5 years ago by ming
In 6149:
comment:4 Changed 5 years ago by ming
In 6150:
comment:5 Changed 5 years ago by ming
In 6151:
comment:6 Changed 5 years ago by ming
In 6153:
comment:7 Changed 5 years ago by nanang
- Description modified (diff)
In 6110: