Cant play video (mp4) in Chromium Embedded Framework

前端 未结 2 1130
陌清茗
陌清茗 2020-12-18 07:38

I am working with windows forms app and embedded Chromium Embedded Framework(CEF) everything working well except Video and Audio. How can i make it work.

Thanks in a

相关标签:
2条回答
  • 2020-12-18 08:26

    CEF doesn't supports propriety audio and video formats like mp3, mp4. it supports open formats. for more detailed info check out https://code.google.com/p/chromiumembedded/issues/detail?id=371

    0 讨论(0)
  • 2020-12-18 08:29

    you need to compile CEF with options to enable proprietary codecs (i.e. H.264 and MP3).

    you can read my answer with all the details on how to compile CEF with enabled proprietary codecs

    the magic now happens here:

    set GN_DEFINES=is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome
    

    there is 2 batch files that you should update/create (as found here):

    c:\code\chromium_git\update.bat:

    set CEF_USE_GN=1
    set GN_DEFINES=is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome
    set GN_ARGUMENTS=--ide=vs2015 --sln=cef --filters=//cef/*
    python ..\automate\automate-git.py --download-dir=C:\code\chromium_git --depot-tools-dir=C:\code\depot_tools --no-distrib --no-build
    

    c:\code\chromium_git\chromium\src\cef\create.bat:

    set CEF_USE_GN=1
    set GN_DEFINES=is_win_fastlink=true proprietary_codecs=true ffmpeg_branding=Chrome
    set GN_ARGUMENTS=--ide=vs2015 --sln=cef --filters=//cef/*
    call cef_create_projects.bat
    

    There is 2 wiki articles that explain how to build CEF/Chromium:

    1. https://bitbucket.org/chromiumembedded/cef/wiki/MasterBuildQuickStart.md
    2. and BranchesAndBuilding in the same wiki
    0 讨论(0)
提交回复
热议问题