Building CEF with MP3 Support

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Building CEF with MP3 Support

Postby ShayanRC » Mon Jun 10, 2013 10:33 am

My issue is similar to this one:
viewtopic.php?f=6&t=10553&p=17064&hilit=mp3+support#p16186

I need to include MP3 support in my application (without Flash).
As far as i understand from reading this:
http://code.google.com/p/chromiumembedd ... ?id=371#c8

In order to use proprietary audio and video codecs in Chromium/CEF you need to:

1. Acquire ffmpeg libraries that support the proprietary codecs.
2. Add 'proprietary_codecs': 1 to your cef.gypi configuration so that USE_PROPRIETARY_CODECS will be defined as required by net/base/mime_util.cc.


So here's my question:
a) Where can I get the required " ffmpeg libraries that support the proprietary codecs."
b) I am new to gypi files, so can any one tell me where to add: 'proprietary_codecs': 1
c) Someone also mentioned replacing : avcodec-53.dll avformat-53.dll and avutil-51.dll in windows -
c1) Where would I find these?
c2) What is the equivalent of these in Linux ?
ShayanRC
Techie
 
Posts: 18
Joined: Mon Jun 03, 2013 9:20 am

Re: Building CEF with MP3 Support

Postby magreenblatt » Mon Jun 10, 2013 10:47 am

The ffmpeg libraries are built as part of the Chromium build process with current Chromium versions. The 'proprietary_codecs': 1 value should be set in cef.gypi. Build CEF/Chromium as described at https://code.google.com/p/chromiumembed ... ndBuilding.
magreenblatt
Site Admin
 
Posts: 12402
Joined: Fri May 29, 2009 6:57 pm

Re: Building CEF with MP3 Support

Postby JRub » Fri Jul 05, 2013 7:54 am

Hi,

Once I've made all the aforementioned modifications, what should I do?
I mean, is rebuilding Chromium and CEF enough, or should I execute some of the scripts like cef_create_project and such?
CEF 3.1453.1255 on Windows 7 32bits
JRub
Mentor
 
Posts: 92
Joined: Wed Sep 19, 2012 8:32 am
Location: Paris, France

Re: Building CEF with MP3 Support

Postby magreenblatt » Sun Jul 07, 2013 12:16 pm

It requires some changes in Chromium as well so you will need to rebuild Chromium/CEF. You need to run the cef_create_projects script or the project files won't be regenerated to include the gyp changes.
magreenblatt
Site Admin
 
Posts: 12402
Joined: Fri May 29, 2009 6:57 pm

Re: Building CEF with MP3 Support

Postby JRub » Mon Jul 08, 2013 7:51 am

Ok, I did it.
So now http://html5test.com tells me that cefclient support MP3 and H264, but not MP4.
I thought MP4 videos were always encoded using H264 and reciprocally.
Are there HTML5 mp4 videos not encoded with H264?
Are there H264 encoded videos not using the mp4 MIME type?

magreenblatt wrote:The ffmpeg libraries are built as part of the Chromium build process with current Chromium versions. The 'proprietary_codecs': 1 value should be set in cef.gypi. Build CEF/Chromium as described at https://code.google.com/p/chromiumembed ... ndBuilding.

Neither MP3 nor H264 encoded MP4 are actually played by my newly built cefclient.
So I guess I missed a step.
Should I do something with cef.sln ffmpeg projects?
Configure them?
CEF 3.1453.1255 on Windows 7 32bits
JRub
Mentor
 
Posts: 92
Joined: Wed Sep 19, 2012 8:32 am
Location: Paris, France

Re: Building CEF with MP3 Support

Postby JRub » Tue Jul 09, 2013 8:02 am

JRub wrote:So now http://html5test.com tells me that cefclient support MP3 and H264, but not MP4.
I thought MP4 videos were always encoded using H264 and reciprocally.
Are there HTML5 mp4 videos not encoded with H264?
Are there H264 encoded videos not using the mp4 MIME type?

I've found the answer to this one: H.264 (or AVC) is one of the codec family that can be used for video encoding and decoding in MPEG-4, but others can be used, such as MPEG-4 Visual.
This is explained here: http://wiki.whatwg.org/wiki/Video_type_parameters

JRub wrote:
magreenblatt wrote:The ffmpeg libraries are built as part of the Chromium build process with current Chromium versions. The 'proprietary_codecs': 1 value should be set in cef.gypi. Build CEF/Chromium as described at https://code.google.com/p/chromiumembed ... ndBuilding.

Neither MP3 nor H264 encoded MP4 are actually played by my newly built cefclient.
So I guess I missed a step.
Should I do something with cef.sln ffmpeg projects?
Configure them?

I'm still stuck on this part...
Has anyone succeeded in actually activating MP4 and MP3 support in CEF?
If yes, could you give me a hint?
CEF 3.1453.1255 on Windows 7 32bits
JRub
Mentor
 
Posts: 92
Joined: Wed Sep 19, 2012 8:32 am
Location: Paris, France

Re: Building CEF with MP3 Support

Postby JRub » Wed Jul 10, 2013 9:23 am

Please, I really need help to build a Chromium version that support playing mp3 and mp4.

I've successfully built CEF and cefclient with 'proprietary_codecs': 1 but mp3 and mp4 files won't actually play.
JS method video.canPlayType() returns "probably" for all the codecs I use for my videos, though.

Thank you in advance
CEF 3.1453.1255 on Windows 7 32bits
JRub
Mentor
 
Posts: 92
Joined: Wed Sep 19, 2012 8:32 am
Location: Paris, France

Re: Building CEF with MP3 Support

Postby magreenblatt » Thu Jul 11, 2013 11:38 am

Sounds like you'll need to do some debugging. Searching for USE_PROPRIETARY_CODECS is a good start. You can set breakpoints in functions like net/base/mime_util.cc MimeUtil::InitializeMimeTypeMaps() and media/filters/stream_parser_factory.cc CheckTypeAndCodecs() to see what's going on.
magreenblatt
Site Admin
 
Posts: 12402
Joined: Fri May 29, 2009 6:57 pm

Re: Building CEF with MP3 Support

Postby nook » Mon Apr 21, 2014 4:13 am

Right now I have the situation exactly as JRub almost year ago:

JRub wrote:Please, I really need help to build a Chromium version that support playing mp3 and mp4.

I've successfully built CEF and cefclient with 'proprietary_codecs': 1 but mp3 and mp4 files won't actually play.
JS method video.canPlayType() returns "probably" for all the codecs I use for my videos, though.


Any fresh solutions for now?
nook
Newbie
 
Posts: 2
Joined: Mon Apr 21, 2014 3:53 am

Re: Building CEF with MP3 Support

Postby nook » Thu Apr 24, 2014 4:46 am

Well, for now, CEF started to play .mp4 video file when (applicable for linux):
1) Install package chromium-codecs-ffmpeg-extra
2) copy /usr/lib/chromium-browser/libffmpegsumo.so to CEF binary and make distributable
3) compile cefsimple and cefclient

I'm still struggling with making mp4 playable libffmpegsumo.so from the CEF/ffmpeg source distribution

So returning back to the CEF instruction:
In order to use proprietary audio and video codecs in Chromium/CEF you need to:

1. Acquire ffmpeg libraries that support the proprietary codecs.
2. Add 'proprietary_codecs': 1 to your cef.gypi configuration so that USE_PROPRIETARY_CODECS will be defined as required by net/base/mime_util.cc.

Am I right thinking that "1.Acquire ffmpeg libraries that support the proprietary codecs" means getting binary libraries as I did, NOT a build ffmpeg libraries with proprietary codecs support from CEF code repository?
nook
Newbie
 
Posts: 2
Joined: Mon Apr 21, 2014 3:53 am

Next

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 42 guests