5

I want to have cef lib with support of mp3 and ffmpeg codecs. How can i re-compile the library of cef with these codec features inside it.

I want to learn, where should I edit inside the cef library or cefsharp? Then how to compile it to reuse it..

I am using cefsharp version 47.

Bilgin Kılıç
  • 8,707
  • 14
  • 41
  • 67

2 Answers2

11

NOTE: PLEASE CONSIDER LEGAL ISSUES BEFORE PROCEEDING

There is a way to enable MP3 support in CEF, but you'll have to modify the cef.gypi in the source distribution, regenerate the visual studio projects and rebuild.

Step by step instructions:

enter image description here enter image description here aenter image description here enter image description here aenter image description here enter image description here

null1941
  • 972
  • 8
  • 20
  • Its little big process.. :) @blgnklc – null1941 Mar 04 '16 at 18:34
  • you may delete your account name for security propose. I will contact you when I have done it. Igot your mail. thank you! – Bilgin Kılıç Mar 07 '16 at 12:01
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/105681/discussion-between-blgnklc-and-null1941). – Bilgin Kılıç Mar 08 '16 at 12:01
  • need to install cmake also :) – null1941 Apr 14 '16 at 07:33
  • Thanks for this workaround, it was extremely useful, since i was able to build the nuget packages. I followed your guide step-by step but in the end when I referenced my custom nuget packages in cefsharp the CefSharp.WinForms.Example was still unable to open mpeg4/h264 video tags. I tried building the 2987 branch and based on the chromium [wiki](https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding.md) i think the problem is that your guide is based on GYP constants but starting with the 2785 branch the automate script will use GN. Have you any clues about the GN constants? – Levente Püsök Jun 13 '17 at 09:01
  • @LeventePüsök GN Constants? Or GYP constants? – null1941 Jun 13 '17 at 12:58
  • @null1941 GN Constants. I managed to find the available GN constants, in the [GN build documentation](https://www.chromium.org/developers/gn-build-configuration) and i used these additional constants: `set CEF_USE_GN=1` `set GN_DEFINES=is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome` and it finally worked. – Levente Püsök Jun 14 '17 at 08:54
  • Hi I followed all the steps and was successfully able to build mp3 codecs. I am running into a problem where after compiling new cef binary into cefsharp I try to use the dll in my project but I dont see mp3 support in my project. Also my project depends on a library which bring CefSharp 55.0.0 as a dependency. Can somebody suggest what can I do – user2358262 Jul 02 '17 at 18:12
1

See this SO question: Chromium Embedded Framework MP3 support

It contains links to build instructions as well as the following:

Codecs like MP3 and AAC are included in Google Chrome releases but not Chromium builds. This is because these formats are not open and require licensing. Distributing these codecs with your application without a licensing agreement may violate the law in certain countries. You should discuss with a lawyer if appropriate.

I suggest reading through the entire answer and related links.

TehCorwiz
  • 365
  • 2
  • 9