storage icon indicating copy to clipboard operation
storage copied to clipboard

@vercel/blob - Support for Thumbnail in Video Uploads

Open bhupesh98 opened this issue 1 year ago • 3 comments

Summary

I am working on a project where I have to display all the videos that are uploaded in blob. But I have to manually take out the a thumbnail image and uploading it there. For streaming purposes, it is important to have a thumbnail to show.

I propose an addition in response API of upon uploading and listing videos.

{
  pathname: 'profilesv1/user-12345.txt',
  contentType: 'text/plain',
  contentDisposition: 'attachment; filename="user-12345.txt"',
  url: 'https://ce0rcu23vrrdzqap.public.blob.vercel-storage.com/profilesv1/user-12345-NoOVGDVcqSPc7VYCUAGnTzLTG2qEM2.mp4'
  downloadUrl: 'https://ce0rcu23vrrdzqap.public.blob.vercel-storage.com/profilesv1/user-12345-NoOVGDVcqSPc7VYCUAGnTzLTG2qEM2.mp4?download=1',
  thumbnail: 'https://ce0rcu23vrrdzqap.public.blob.vercel-storage.com/.thumbnail/user-12345-NoOVGDVcqSPc7VYCUAGnTzLTG2qEM2.png'
}

Here, .thumbnail folder can be made which is used to store metadata like thumbnail. I would like to discuss its complexity & contribute if it is approved by maintainers of this repo.

bhupesh98 avatar Jun 21 '24 06:06 bhupesh98

Hey @bhupesh98 are you suggesting that Vercel Blob could create a thumbnail from your videos automatically? Thanks!

vvo avatar Jun 21 '24 07:06 vvo

Hey @bhupesh98 are you suggesting that Vercel Blob could create a thumbnail from your videos automatically? Thanks!

Yes, while uploading videos, it should randomly take out a frame and save it in .thumbnail folder under same pathname. Also, for videos, a config object can be sent to customize which timestamp of video frame to take as a thumbnail.

bhupesh98 avatar Jun 21 '24 11:06 bhupesh98

+1 for thumbnail generation

gyurisc avatar Nov 29 '24 16:11 gyurisc