Last post Sep 24, 2019 07:11 AM by Yang Shen
Sep 24, 2019 03:28 AM|olybobo|LINK
I am trying to save a video as a binary or bytes into my database. This video should be retrievable as well Can you please help in explaining how to go about doing that. The video would have fixed resolution and size to prevent the data from being too big.
All help is appreicated.
Sep 24, 2019 07:11 AM|Yang Shen|LINK
save a video as a binary or bytes into my database. This video should be retrievable as well
You can find many samples online store videos in SQL database as varbinary(max) and show them in your page, here's two:
1. Video Uploader Control for SQL Server
2. Upload Save Retrieve and Play MP4 Video files with live streaming from Database in ASP.Net
using C# and VB.Net
They both need a Generic Handler and the second will need a 3rd-party tool to show the video.
However, i have tested them both and both of them failed at the process of showing the videos i uploaded successfully before.
Thus, you can give them a try by yourself (if you met a problem "Maximum request length exceeded.", please follow the link to solve it)or you can find another way to
store and retrieve your videos.
Usually, store a file path of videos is a better practice, you save the file path in your database and retrieve the path to append to the <video>'s src value, like below:
<video src='<%#Eval("Video")%>' width="500" controls="controls"></video>