Code snippets and examples for Google Cloud Functions.
Inspired by the Stack Overflow question: Can you call out to FFMPEG in a Firebase Cloud Function?
The ffmpeg binary is included in the Cloud Functions environment. See complete list of included system packages.
Two Cloud Functions examples in ffmpeg/index.js:
- ffmpegTest() - Use the npm module
fluent-ffmpegto resize a video. This module provides a nice, easy to use wrapper over the ffmpeg command- line interface. - ffmpegShellTest() - invoke the
ffmpegbinary directly to get info about a video file.
cd ffmpeg/
./deploy.shI'm Bret McGowen, drop me a line at @BretMcG on Twitter or my website bretmcg.com.
- Example video from From the State Archives of North Carolina/Flickr.