0

So, I'm developping an easy interface for my client, so they can make content for an app that use supabase as a backend.

Amoung the types of contents, their is stuffs that require my client to upload a video or choose from those in a supabase bucket.

Since my client doesn't want to pay a ton of money in bandwidth, I want to help them save cost by only showing the first frame of a video that already is on supabase, that would act as a thumbnail, so they can choose the correct video.

Is it possible to do something like that with supabase ?

2
  • Find out if Supabase server can accept "ranged requests". The answer of how & what to do with these requests will depend on the video format itself (what are you working with here? MP4? WebM?). Generally the process means: (1) Read the expected header byte size and all bytes up to length of first frame's ending byte position. (2) Pass those extracted bytes (put in Array) to the built-in createObjectURL function and use the result of it as .src of the video tag. This would show you a one-frame preview... PS: The more professional solution is to get/paste frame data into a template video Commented Apr 16 at 7:17
  • (...forgot to paste...): In the above, "Template video" means some already pre-saved one-frame video (ie: make one with a video editor). The idea is to read bytes of the client's video and extract the first frame (so you need to understand the un-mentioned video format), then overwrite the bytes of template's existing one frame (usually a key frame, but again that type/setting depends on the specific video format). PPS: Since you have a client you might not have time to learn, try a tool like FFmpeg or hire a JS coder who can create just functions to read the video format bytes. Commented Apr 16 at 7:34

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.