Does Google App Script have something akin to ffmpeg?

753 views
Skip to first unread message

Josh Dalton

unread,
Mar 21, 2022, 5:03:10 AM3/21/22
to Google Apps Script Community
Hey guys, just wondering, does Google App Script have something akin to ffmpeg for converting an array of png blobs to a single mp4/gif/animation? 

I'm wondering as I'm trying to create myself a sort of Line Race Chart (without creating a html page that is, just a plain mp4 file containing said line race chart) with every frame being the next value in a google spreadsheet array.

Basically, I want to take "screenshots" of the chart, and when I'm finally done with the array, collate them into a single mp4 or any video file (anything that can be easily paused and played pretty much, with no autoplaying).

No worries if it isn't available, I'm just concerned if my only route is somehow converting them manually with bytecode (which I currently don't have a clue to do, as all answers on the internet have been to "find a library", which is sorta hard when working with Google App Script).

Martin Hawksey

unread,
Mar 21, 2022, 6:33:13 AM3/21/22
to Google Apps Script Community
Hi - route I would be going down would be looking at a suitable JS library that can handle web browser based image to gif conversion. Not aware of an existing implementation in Google Apps Script

You could probably shortcut the 'make a gif' bit by using the Creator Studio add-on which turns Google Slides into animations/video https://workspace.google.com/marketplace/app/creator_studio/509621243108  For this you would then just be looking for a way to add each chart frame to a Google Slide deck (an example for animating a Google Sheets chart is here https://medium.com/@milton.slonim/how-to-create-gifs-with-google-sheets-and-apps-script-1ed9b1606b5

Interested to hear how you get on with this idea :)

Clark Lind

unread,
Mar 21, 2022, 8:15:39 AM3/21/22
to Google Apps Script Community
Have you considered just animating the chart itself? I know this doesn't answer your question and may not meet your requirements, but charts does have some animation features. 

Bruce Mcpherson

unread,
Mar 21, 2022, 8:47:28 AM3/21/22
to Google Apps Script Community
For some aspects of this project

I used this
running in a docker image in Kubernetes, but you could more easily use cloud run for a simpler environment. You could then access by loading your files to google cloud storage, and invoking cloud run via apps script to do ffmpeg kind of things.

It's a lot of work stitiching all this together, but it'll give you a full ffmpeg instance to run whenever you need to

You might also find this useful to get stuff from Drive to cloud storage


On Monday, 21 March 2022 at 09:03:10 UTC dalto...@gmail.com wrote:

Brian Berneker

unread,
Mar 21, 2022, 3:42:27 PM3/21/22
to Google Apps Script Community
This doesn't sound to me like an apps script solution, but can be done using JavaScript libraries.





On Monday, March 21, 2022 at 5:03:10 AM UTC-4 dalto...@gmail.com wrote:

dimud...@gmail.com

unread,
Mar 26, 2022, 3:26:22 PM3/26/22
to Google Apps Script Community
Its possible. The V8 version of GAS has partial support for WebAssembly. So if you can find a WASM port of ffmpeg, you'll be able to build what you need directly in GAS. Far easier said than done though.
Reply all
Reply to author
Forward
0 new messages