PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → [WD20] - How to store and play Videos from DB?
[WD20] - How to store and play Videos from DB?
Débuté par Yogi Yang, 06 aoû. 2018 09:37 - 3 réponses
Posté le 06 août 2018 - 09:37
Hello,

I would like to store video (approx size of each video will range between 300 MB to 800 MB) in database and user should be able to view videos directly in the application without the need to first export the video to a file and then play it back.

Most of the videos are in following formats:
mpeg
avi
asf
mp4

Please guide how this would be possible.

TIA
Posté le 06 août 2018 - 10:20
Hi,

the datafile is a binary memo and is fed into the file by HLinkMemo(..) and extracted by, surprise, surprise ... HExtractMemo(..)

It will work, however, this is no good in terms of performance. Imagine a dozen videos on the user's hard disk, which involves installing 10gb of files the user's hard disk. If these videos are generated on site (e.g. surveillance videos) then after a few days things will become unbearable. My advice: put the videos on a web site (no cost: Youtube, little cost, but terabytes possible: Vimeo) and let your users view the video in a browser. Perhaps you could even use the HTML control with enabled JavaScript for viewing?
Posté le 06 août 2018 - 17:09
Hi

I did that originally for my video courses (now on youtube) on my web site. The idea was to use a buffer variable to put the video in from the record, then do a stringdisplay of that buffer. The html video player was configured to call an awp page with the video ID in the URL.

I suppose you could do something similar with a video player inside an html control. Otherwise, you'll need a video player accepting a memory/buffer input...

Best regards
Posté le 06 août 2018 - 17:16
Hello,

Guenter & Fabrice,

Thanks for the tips.

Actually I was hoping to be able to stream a video directly from DB.

I will out your tip.

Regards,