How to include CEF with H.264 into CEFSharp nuget?

Having problems with building or using the CefSharp .NET binding? Ask your CEF-related questions here. Please ask general usage questions on StackOverflow.

Moderator: amaitland

How to include CEF with H.264 into CEFSharp nuget?

Postby bryanforst » Tue Aug 03, 2021 7:16 am

I have built and tested a CEF build with h.264 operating properly.
Trying to now get this files into CEFSharp nuget packages for WPF 64 bit

I thought I could build a CEFSharp nuget package by:
1. run build.ps1 vs2019 to get build files completely created.

2. Replace files in packages\cef.redist.x64.91.1.23\CEF folder with files in
chromium\src\out\Release_GN_x64 folder using
https://github.com/cefsharp/CefSharp/wi ... ibution%29
as a reference

3. run build.ps1 nupkg-only

4. Take nuget files from NuGet folder and use them locally in my VS C# app

Whenever I do this I see the standard CEF files in my app's bin and the nuget packages folder for cef redistribution.

I have also tried to directly copy the CEFSharp packages\cef.redist.x64.91.1.23
into my app packages/cef.redist.x64.91.1.23 but the build still puts the wrong files into my bin folder

All help is appreciated.
bryanforst
Newbie
 
Posts: 4
Joined: Mon Jun 21, 2021 5:54 am

Re: How to include CEF with H.264 into CEFSharp nuget?

Postby schandra09net » Tue Aug 03, 2021 7:52 am

Hello @bryanforst,
Even I was at the same situation last month, the possible solution which I tried and working is :
1. Created a Dependencies folder and added 2 binaries "libcef.dll" and "v8_context_snapshot*.bin" into C# WPF project (Only these two files will allow CEFBrowser to play videos/mp3)
2. Created a Project post build action to copy these files at runtime (Project Properties => Builds =>Post Build Action)
Ex:
XCOPY /Y "$(TargetDir)libcef.dll" "$(SolutionDir)WPFProject\$(OutDir)"
XCOPY /Y "$(TargetDir)v8_context_snapshot.bin" "$(SolutionDir)WPFProject\$(OutDir)"

3. Run the project (Either via F5 Debug or from the bin\x64 folder)
Attachments
2021-08-03_18h04_47.png
Only required files
2021-08-03_18h04_47.png (15.3 KiB) Viewed 5495 times
schandra09net
Newbie
 
Posts: 6
Joined: Mon Aug 02, 2021 10:41 pm

Re: How to include CEF with H.264 into CEFSharp nuget?

Postby bryanforst » Mon Aug 09, 2021 4:44 am

Additional info:

After running build.ps1 vs2019 I then copied the files from my CEF/h.264 release area into the packages/cef.redist.x64.91.1.23\CEF folder.

Then I copied the .nuspec file from the cef.redist.x64.91.1.23.nupkg file in the folder and modified it as an h264 variant.
Then I build a new cef.redist.x64.91.1.23.nupkg file from my .nuspec

And then re-ran build.ps1 vs2019 noticing that it picked up my cef.redist.x64.91.1.23.nupkg file and did not redeploy it from the nuget repo

Using the resulting files locally: cef.redist.x64.91.1.23.nupkg, CefSharp.Common.91.1.230.nupkg, and CefSharp.Wpf.91.1.230.nupkg
I rebuilt my app.

It still fails the h264 test in html5test.com !?!

Im only modifying the 64bit cef.redist because my app configuration is for 64 bit.
Is there a chance the cef 32bit version is being used?????

Any other pieces of advice?
bryanforst
Newbie
 
Posts: 4
Joined: Mon Jun 21, 2021 5:54 am


Return to CefSharp Forum

Who is online

Users browsing this forum: No registered users and 13 guests

cron