Node-1st-gen/ffmpeg-convert-audio/README.md
This sample uses ffmpeg / fluent-ffmpeg and automatically converts audio files that are uploaded to Cloud Storage to FLAC file format with mono-channel audio @ 16000hz.
See file functions/index.js for the audio conversion code.
The audio conversion is performed using ffmpeg. The audio is first downloaded locally from the Cloud Storage bucket to the tmp folder using the google-cloud SDK.
The dependencies are listed in functions/package.json.
The function triggers on upload of any file to your Firebase project's default Cloud Storage bucket.
To deploy and test the sample:
git clone https://github.com/firebase/functions-samplescd functions-samples/ffmpeg-convert-audiofirebase use --add and select your Firebase projectfirebase deploy_output.flac suffix will be created in the same folder (make sure you refresh the UI to see the new file).