<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=2634489&amp;fmt=gif">

Getting Started with Google Cloud, Cloud Operations

Create thumbnail of video in Firebase with Google Cloud function

By Kevin O'Connell | August 15, 2022

I'm trying to create a cloud function to create a thumbnail image from a video uploaded to Firebase storage and save the thumbnail image as a .PNG with the same name as the video and in the same folder in Firebase.

I've tried several different solutions without any luck.

Is there anyone that could lend a hand pointing me in the right direction on how to achieve this?


Thanks in advance. 


Best answer by malamin

Thank you for asking the question.  But you didn’t mention here which type of error message you're receiving.

However, The sound is good you have experience with Google cloud functions and firebase.  I think you should check the following common scenario that might help you to find a solution for your case. Please review the following steps for your exiting experiment.

  • Please ensure that the Firebase and Google Cloud accounts are set up with appropriate permissions.
  • Don’t forget to enable the cloud function API and billing for your project.
  • You should make sure your cloud storage file read and write permissions are well defined.
  • Check that the video file upload source destination and target save storage location are correctly mentioned in your code.
  • Then, verify that the video file name is unique and that it contains a function that will be used for your png file.
  • Sometimes you will find video encoding errors based on your source media such as android camera video or iPhone video encoding may give you an extra headache to upload in cloud storage. Please look at the iPhone and Android video information.
  • Examine your code carefully for any transformation functions, such as image height and weight.
  • Check your video thumbnail for the Language library that was declared at the top of the function and is it successfully imported?
  • More examples of common media transformation functions including transcoding images, moderating content, extracting EXIF metadata. The full list of examples is available on GitHub.

Also, Check the video  tuorial and links below  it might be help you to implemention the code as example.


Recent Articles

Google Cloud Strategy

AI Cheat Sheet

AI is no more and no less the drive to create robots with human minds so they can do everything we do and more. Use this cheat sheet to help decode the space.
By Leah Zitter
AI and Machine Learning

CarCast with Bruno Aziza: What Makes Us Better Than AI?!

Unlock the secrets of human cognitive superiority over AI in this compelling CarCast with Bruno Aziza and Kenneth Cukier.
By Bruno Aziza
AI and Machine Learning

CarCast with Bruno Aziza: The Metrics You CAN'T Afford To ...

Discover essential CEO metrics: Rule of 40, CAC Ratio, NRR/GRR, and more. Optimize your business for success now!
By Bruno Aziza