[SOLVED] Build CEF with proprietary codecs 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.

Re: [SOLVED] Build CEF with proprietary codecs support

Postby Jonas » Tue Dec 20, 2016 11:33 am

When building with ffmpeg support enabled I don't see any difference in the output files generated in the binary_distrib folder:
D:\cefbuild\CEF2785\chromium\src\cef\binary_distrib\cef_binary_3.2785.1486.g8c4ba9f_windows64_minimal\Release

Should I be generating an additional dll for the codec support?

This is my build command
Code: Select all
python d:/cefbuild/automate-git.py --download-dir=d:/cefbuild/CEF2785 --branch=2785 --no-debug-build --minimal-distrib-only --x64-build --no-update


And my environment variables
Code: Select all
set CEF_USE_GN=1
set GN_DEFINES=is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome
Jonas
Techie
 
Posts: 39
Joined: Thu Jul 10, 2014 2:23 pm

Re: [SOLVED] Build CEF with proprietary codecs support

Postby amaitland » Tue Dec 20, 2016 6:01 pm

Chromium statically links ffmpeg by default so there is no additional DLL.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1291
Joined: Wed Jan 14, 2015 2:35 am

Re: [SOLVED] Build CEF with proprietary codecs support

Postby sburke » Tue Jun 06, 2017 11:19 am

This thread has been quiet for a while and so I presume that means that most people have succeeded in adding support for proprietary codecs. As for myself, I'm still trying to get it to work. I've tried multiple approaches to no avail. Right now, my environment is setup as follows:

Code: Select all
C:\>set cef_use_gn
CEF_USE_GN=1

C:\>set gn_defines
GN_DEFINES=is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome


When I build after changing these environment variables (ninja -C out\Default chrome), ninja thinks for a short while and then returns "ninja: no work to do." If I browse to https://vimeo.com/1084537 and attempt to play the video, it says "Curses! This video can't be played with your current setup." If I surf to the same URL in regular Chrome then it works fine. So I know that the third-party codec support is not enabled.

If you got this to work then please post pointers as to what I may be missing.
sburke
Mentor
 
Posts: 54
Joined: Tue May 30, 2017 1:17 pm

Re: [SOLVED] Build CEF with proprietary codecs support

Postby magreenblatt » Tue Jun 06, 2017 12:39 pm

sburke wrote:This thread has been quiet for a while and so I presume that means that most people have succeeded in adding support for proprietary codecs. As for myself, I'm still trying to get it to work. I've tried multiple approaches to no avail. Right now, my environment is setup as follows:

Code: Select all
C:\>set cef_use_gn
CEF_USE_GN=1

C:\>set gn_defines
GN_DEFINES=is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome


When I build after changing these environment variables (ninja -C out\Default chrome), ninja thinks for a short while and then returns "ninja: no work to do." If I browse to https://vimeo.com/1084537 and attempt to play the video, it says "Curses! This video can't be played with your current setup." If I surf to the same URL in regular Chrome then it works fine. So I know that the third-party codec support is not enabled.

If you got this to work then please post pointers as to what I may be missing.

The GN_DEFINES environment variable is specific to CEF. Are you running cef_create_projects.bat? It would seem not, since you're running "ninja -C out\Default chrome"
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: [SOLVED] Build CEF with proprietary codecs support

Postby sburke » Tue Jun 06, 2017 1:07 pm

I did run cef_create_projects.bat before building. However, I saw the one post about quotes versus no quotes on "Chrome". So, I updated the GN_DEFINES environment variable to is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome as opposed to is_official_build=true proprietary_codecs=true ffmpeg_branding="Chrome", but I didn't re-run the batch file. I was of the impression that the environment variable would be taken into account at build time, not when the projects are generated. I guess it stands to reason that the batch file may create a modified version of Build.gn? I have tried manually editing Build.gn to include dependencies such as //third_party/webrtc/api/video_codecs:video_codecs_api (and others), but that had no impact. I'll re-run the batch file and give it a shot.

Do we know if the quotes on "Chrome" are required or not?

Thanks for responding.
sburke
Mentor
 
Posts: 54
Joined: Tue May 30, 2017 1:17 pm

Re: [SOLVED] Build CEF with proprietary codecs support

Postby sburke » Tue Jun 06, 2017 1:11 pm

Correction to my previous post: I ran gn gen --ide=vs out\Default, not cef_create_projects.bat. I recall running that batch file at some point in my journey, but now I can't even find it on my hard drive. I'm looking into that...
sburke
Mentor
 
Posts: 54
Joined: Tue May 30, 2017 1:17 pm

Re: [SOLVED] Build CEF with proprietary codecs support

Postby magreenblatt » Tue Jun 06, 2017 1:15 pm

sburke wrote:Do we know if the quotes on "Chrome" are required or not?

You probably need quotes. If you're not building CEF then you should use "gn args out\Config" and set the values yourself. See the Chromium gn documentation.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: [SOLVED] Build CEF with proprietary codecs support

Postby sburke » Tue Jun 06, 2017 1:25 pm

Now it's coming back to me...I had first attempted this by building CEF as described at https://bitbucket.org/chromiumembedded/ ... ckStart.md. I did get Chromium to build but, after setting the environment variables and attempting to rebuild, I ran into all sorts of errors. After several attempts to accomplish the build, I then abandoned that effort and instead followed the instructions at https://chromium.googlesource.com/chrom ... uctions.md. Again, I was able to build Chromium but the environment variables seem to have no impact on it as pertains to H.264 codec support. I'll revert back to the CEF image and go from there. Thanks again.
sburke
Mentor
 
Posts: 54
Joined: Tue May 30, 2017 1:17 pm

Re: [SOLVED] Build CEF with proprietary codecs support

Postby rjxray » Wed Jun 07, 2017 4:58 am

I too am struggling to get this working.
I am building CEF 3.3029.1619 using VS2015 and Windows 10

When I visit http://www.igloovision.com using cefclient the introductory video is not played and in console.log I see
[0607/102030.398:ERROR:process_win.cc(140)] Unable to terminate process: Access is denied. (0x5)
[0607/102036.716:ERROR:render_media_log.cc(30)] MediaEvent: MEDIA_ERROR_LOG_ENTRY {"error":"FFmpegDemuxer: open context failed"}
[0607/102036.717:ERROR:render_media_log.cc(30)] MediaEvent: PIPELINE_ERROR demuxer: could not open

My own application gives the same render_media_log errors and then generates a fatal error
FATAL:elementanimations.cpp(109)] Check failed: *m_baseComputedStyle == *computedStyle.

I set the gn_defines environment variable to is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome.
Then I reran cmake and then rebuilt CEF but it makes no difference.

I also tried setting the gn_defines environment variable to is_official_build=true proprietary_codecs=true ffmpeg_branding="Chrome" but that didn't work either.

Thanks for any help
rjxray
Expert
 
Posts: 115
Joined: Wed Jun 07, 2017 4:31 am

Re: [SOLVED] Build CEF with proprietary codecs support

Postby sburke » Thu Jun 08, 2017 1:37 pm

Results after building CEF are the same. Still can't play https://vimeo.com/1084537.
sburke
Mentor
 
Posts: 54
Joined: Tue May 30, 2017 1:17 pm

PreviousNext

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 55 guests