筆記:重新編譯libvpx來支援vp9 profile2的HDR

緣由

因為Android新版本的文件寫到我的手機有支援VP9 Profile2功能,所以就想來嘗試一下


首先移除掉之前裝的套件libvpx

sudo apt-get remove libvpx-dev

下載libvpx新的程式碼

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


編譯libvpx

cd libvpx

./configure --enable-vp9-highbitdepth --enable-webm-io --disable-docs --disable-examples --disable-tools

make

sudo make install

    [INSTALL] /usr/local/include/vpx/vp8.h

    [INSTALL] /usr/local/include/vpx/vp8cx.h

    [INSTALL] /usr/local/include/vpx/vpx_ext_ratectrl.h

    [INSTALL] /usr/local/include/vpx/vp8dx.h

    [INSTALL] /usr/local/include/vpx/vpx_codec.h

    [INSTALL] /usr/local/include/vpx/vpx_frame_buffer.h

    [INSTALL] /usr/local/include/vpx/vpx_image.h

    [INSTALL] /usr/local/include/vpx/vpx_integer.h

    [INSTALL] /usr/local/include/vpx/vpx_decoder.h

    [INSTALL] /usr/local/include/vpx/vpx_encoder.h

    [INSTALL] /usr/local/lib/libvpx.a

    [INSTALL] /usr/local/lib/pkgconfig/vpx.pc


轉檔

至於重新編譯ffmpeg的方式就不綴述了

把一般SDR影片拿去轉HDR的偷懶方式

ffmpeg -i bunny.mp4 -pix_fmt yuv420p10le -crf 35 -profile:v 2 -c:v libvpx-vp9 -an -t 10 test.webm



留言