Skip to content

SIPSorceryMedia.Encoders Why not support VP9  #7

@tangxiaohui1984

Description

@tangxiaohui1984
        //var setConfigRes = vpx_encoder.VpxCodecEncConfigDefault(vp8cx.VpxCodecVp8Cx(), vp8EncoderCfg, 0);
        var setConfigRes = vpx_encoder.VpxCodecEncConfigDefault(vp8cx.VpxCodecVp9Cx(), vp8EncoderCfg, 0);
        if (setConfigRes != VpxCodecErrT.VPX_CODEC_OK)
        {
            throw new ApplicationException($"Failed to set VP8 encoder configuration to default values, {setConfigRes}.");
        }

        //var initEncoderRes = vpx_encoder.VpxCodecEncInitVer(_vpxEncodeCtx, vp8cx.VpxCodecVp8Cx(), vp8EncoderCfg, 0, VPX_ENCODER_ABI_VERSION);
        var initEncoderRes = vpx_encoder.VpxCodecEncInitVer(_vpxEncodeCtx, vp8cx.VpxCodecVp9Cx(), vp8EncoderCfg, 0, VPX_ENCODER_ABI_VERSION);
        if (initEncoderRes != VpxCodecErrT.VPX_CODEC_OK)
        {
            throw new ApplicationException($"Failed to initialise VP8 encoder, {vpx_codec.VpxCodecErrToString(initEncoderRes)}.");
        }

Get the latest libvpx source code

Building libvpx:
git clone https://github.com/webmproject/libvpx.git

==> 64 bit build
mkdir build-win-x64
cd build-win-64
../configure --disable-static --disable-examples --disable-tools --disable-docs --target=x86_64-win64-vs17
make
Probably fail due to msbuild not in path but should still produce a vpx.sln
open vpx.sln:

  • change "vpx" General->Configuration Type from "Static Library" to "Dynamic Library".
  • set the mdoule definition file, Linker->Input->Module Definition File to vpx.def, the file should have been created by the make step.
    change to Release build
    build

vs2022 ---> x86_64-win64-vs17

But it still doesn't work, please tell me how to support vp9

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions