Serverless-chrome: Using Chrome instead of Chromium

Created on 10 Jul 2018  Â·  5Comments  Â·  Source: adieuadieu/serverless-chrome

I see Chrome and Chromium used interchangeably in this repo but there are differences between the two. The main thing I am trying to work around is that vanilla Chromium cannot play mp4 media like Chrome can.

I tried to dig through the documentation on how I can bundle Chrome but it seems like only building Chromium is available at the moment. Is this correct? Any ideas on how I could use Chrome instead of Chromium? or how I could build Chromium with mp4 playback support?

question

Most helpful comment

You're right—"Chrome" and "Chromium" are used interchangeably. We always mean Chromium. "Chrome" is a special build of Chromium which can only be built by Google. The reason this project uses both is a bit of an identity/communication problem: people are thinking about "headless chrome" and not "headless chromium".

Without digging into it, I don't know how to build Chromium with mp4 playback support. It's probably a matter of making the dependencies available/known at build time, and making sure they can compile on amazonlinux.

For what reason are you trying to play back mp4 video on AWS Lambda?

All 5 comments

You're right—"Chrome" and "Chromium" are used interchangeably. We always mean Chromium. "Chrome" is a special build of Chromium which can only be built by Google. The reason this project uses both is a bit of an identity/communication problem: people are thinking about "headless chrome" and not "headless chromium".

Without digging into it, I don't know how to build Chromium with mp4 playback support. It's probably a matter of making the dependencies available/known at build time, and making sure they can compile on amazonlinux.

For what reason are you trying to play back mp4 video on AWS Lambda?

Anyone else make progress on this? I've seen some solutions for building older versions of Chromium.

Followup:
I followed https://intoli.com/blog/installing-google-chrome-on-centos/ in an ec2 instance, and then followed to the installation path in /opt/ & tarballed. Hope that helps :)

The usual problem is that Lambda has a maximum size limit for the deployment package which was 50 mb for a direct upload. This required the compilation of Chromium with special flags to reduce the output binary size, which is something that cannot be done for Chrome since chrome is not open-source.

However, the real Lambda limit is 250 MB and you can deploy a function through S3 as long as it's not bigger than 250 mb unpacked. If you are using the serverless framework and deploying an API this is what it does by default already, so in that case, it is (in theory) possible to include a Chrome distribution however you will need a binary that can run on an Amazon Linux.

@echrisinger what did you tarball? I tried this, but the path under /opt/ doesn't seem to have an executable shell, like the releases they share here.

Was this page helpful?
0 / 5 - 0 ratings