Build of CEF With media codecs doesn't render MPEG4 files

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.

Build of CEF With media codecs doesn't render MPEG4 files

Postby callum » Sun Jul 10, 2016 11:58 am

I built CEF (2526 Win32 branch) with the media codecs turned on using this command:

Code: Select all
set GYP_MSVS_VERSION=2013
set GYP_DEFINES=proprietary_codecs=1 ffmpeg_branding=Chrome buildtype=Official
python automate-git.py --download-dir=C:\work\cef-2526.win.32.media --branch=2526


The build completes successfully but when I link my application to this build and navigate to an MP4 URL, I see a red screen with the message:

Loading error!
Message:
Code: -3

The cefclient.exe app that gets built renders the movie correctly.

I'm positive this has worked for me previously - any ideas what I may have done to break it?
callum
Expert
 
Posts: 326
Joined: Mon Feb 23, 2015 6:19 pm

Re: Build of CEF With media codecs doesn't render MPEG4 file

Postby Czarek » Sun Jul 10, 2016 3:46 pm

Chromium error code:

// An operation was aborted (due to user action).
NET_ERROR(ABORTED, -3)
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Build of CEF With media codecs doesn't render MPEG4 file

Postby callum » Sun Jul 10, 2016 4:15 pm

Thanks for tracking that down.

I don't trigger any user action - it's a link in a page that resolved to an MPEG4 movie trailer.

Will keep digging.
callum
Expert
 
Posts: 326
Joined: Mon Feb 23, 2015 6:19 pm

Re: Build of CEF With media codecs doesn't render MPEG4 file

Postby Czarek » Wed Jul 20, 2016 4:34 am

Check LoadHandler/RequestHandler/DownloadHandler in cefclient and see if there are any differencies in your app.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Build of CEF With media codecs doesn't render MPEG4 file

Postby callum » Thu Jul 21, 2016 11:09 am

Hi Czarek - sorry for the delayed reply - took my tired old machine a while to rebuild everything.

I checked all those overrides you mentioned and whilst I some things there (notify the main app in variouis places for example), if I remove them, the problem persists.

I don't see anything in cefsimple (works there too as well as cefclient) that I'm not doing.

Will continue to poke - thank you!
callum
Expert
 
Posts: 326
Joined: Mon Feb 23, 2015 6:19 pm

Re: Build of CEF With media codecs doesn't render MPEG4 file

Postby Czarek » Thu Jul 21, 2016 12:09 pm

callum wrote:I don't see anything in cefsimple (works there too as well as cefclient) that I'm not doing.

So if the issue doesn't seem to be in code then make sure your binaries are correct - old files overwritten and new copied, check if any new appeared.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Build of CEF With media codecs doesn't render MPEG4 file

Postby callum » Thu Jul 21, 2016 12:16 pm

Yep - I have scripts that make sure the binaries are all correct.

Only other thing I can think of is that I added "buildtype=Official" in the GYP_DEFINES to pick up what I read were some optimizations.

I *think* I omitted that several weeks when this worked - will kick off another build tonight and see if that makes a difference.
callum
Expert
 
Posts: 326
Joined: Mon Feb 23, 2015 6:19 pm

Re: Build of CEF With media codecs doesn't render MPEG4 file

Postby Czarek » Thu Jul 21, 2016 12:20 pm

Check binaries manually. Copy cefclient/cefsimple executables to your app's directory and run from there.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Build of CEF With media codecs doesn't render MPEG4 file

Postby Czarek » Thu Jul 21, 2016 12:36 pm

I can't find any occurence of the "Loading error!" string neither in Chromium nor in CEF. Is this your code displaying that message? Looks like you have implemented CefLoadHandler::OnLoadError wrongly. See in cefclient that you should ignore the ERR_ABORTED code (-3):

Code: Select all
void ClientHandler::OnLoadError(CefRefPtr<CefBrowser> browser,
                                CefRefPtr<CefFrame> frame,
                                ErrorCode errorCode,
                                const CefString& errorText,
                                const CefString& failedUrl) {
  CEF_REQUIRE_UI_THREAD();

  // Don't display an error for downloaded files.
  if (errorCode == ERR_ABORTED)
    return;
   
  ...
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Build of CEF With media codecs doesn't render MPEG4 file

Postby callum » Thu Jul 21, 2016 3:58 pm

You're right! That was it which also means that I could never have seen this working.

Behaves as expected now - thank you so much for finding that - much appreciated.
callum
Expert
 
Posts: 326
Joined: Mon Feb 23, 2015 6:19 pm


Return to Support Forum

Who is online

Users browsing this forum: Majestic-12 [Bot] and 114 guests