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-ffmpeg
to resize a video. This module provides a nice, easy to use wrapper over the ffmpeg command- line interface. - ffmpegShellTest() - invoke the
ffmpeg
binary directly to get info about a video file.
cd ffmpeg/
./deploy.sh
I'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.