Link to home
Start Free TrialLog in
Avatar of Azarudeen Mohamed
Azarudeen MohamedFlag for India

asked on

Client Side Video Download/Upload/Stream website theme

Hi All,

I need a theme for my new website, which allows users to upload, download and stream videos on my website.

I have domain and cloud hosting.

for example : https://mybb.com/ 

This is the forum website which is open source I can download and upload these file to my hosting.
like same I need a website for videos.

thanks
Avatar of David Favor
David Favor
Flag of United States of America image

You said... "I need a theme for my new website, which allows users to upload, download and stream videos on my website" which encompasses several different features.

Unlikely you'll find a single theme to do this, as what your asking... partial functionality lives outside your theme.

Here's a starting point you might consider.

1) Use GeneratePress (theme) + Elementor or Beaver (Page Builders) for your site layout.

2) Write a simple Per User File Uploads which will be 20-30 lines of code.

3) Write a simple Per User File Downloads which will be 20-30 lines of code.

4) Streaming videos... This is the part which has zero to do with WordPress + requires some consideration. Here's how I do this.
_______

Few items off the top of my head.

If you stop at any of the following items + think... geez... how do I do that... best hire someone to manage your site hosting + video management.

1) Start with a dedicated server. You must use a dedicated server. Period. A bare metal server, so no fake VM based servers like AWS/EC2 or any VPS system. These simply won't work.

2) Run Ubuntu Bionic (5 Year support).

3) Run build system to pull nightly changes + rebuild ffmpeg every day from source.

4) Search for site:github.com php pseudo streaming 206 + choose some PHP pseudo streaming code to use, so you'll truly be streaming videos, rather than pushing downloads (which simply won't work, as downloads will rapidly saturate your net connection).

5) Use a dedicated server from OVH, which provides unlimited IPs + unlimited bandwidth for fixed cost.

6) If you're hosting more than a handful of videos, you're going to require massive disk space. You have two options.

a) Expensive option - Lease an OVH media server with big disks.

b) Dirt cheap option - At your home/office, run high speed lines, like Google Fiber for $100/month for 1G symmetric.

You must use a minimum of 1G symmetric for this to work well.

Build a disk array + use your OVH 2T or 4TB local disk space as a cache (recently accessed videos) + your disk array for storage.

Likely best to use a Linux system running http://www.freenas.org/.

Be sure to use a RAID card which implements stepped disk spin up at power on, so if you have 100x 12TB IronWolf drives running, if they all try to power on at the same time, likely your computer PSU will die or you'll start flipping breakers. Stepped disk spin up does what it sounds like, each disk powers on + spins up, one at a time. Power on sequences are longer this way + you can use standard PSUs + low amperage wiring, rather than wiring a NOC (Network Operations Center).

7) Then you must enforce video codec type + bitrate, so if a user uploads .mp4 videos with stereo AAC audio + h.264/h.265 codecs... say... <2500 kb/s + duration < 1hr, then you publish the video, as-is, with no re-transcoding.

If duration is to long, delete the video + notify user. You must set some duration cap, else you'll end up with someone uploading a months worth of security footage. I suggest a duration/video cap or if they're paying, no cap.

Other parameters are similar, as you must have AAC (audio) + 264/265 (video) + MP4 (container) to play on all devices. I'd allow 265, as no browser will play these right now + most mobile devices have h.265 decoders.

If parameters are incorrect, then give uploader the option of fixing their video or having your service re-transcode their video for a per minute cost.

This is where nightly builds of ffmpeg come in, which can pretty much take any video footage + transcode it to AAC + h.264 + MP4.

When transcoding videos, run nice -19 ffmpeg so transcodes use all threads + run at a lower priority than streaming, so never starve your streaming resources.

8) Likely best to come up with some way to purge/prune videos too.

For example, if a video hasn't been watched in a year, send uploader a message video will be deleted in 72 hours, if they'd like to download a copy.

Or, charge for storage + keep videos forever.
Avatar of Azarudeen Mohamed

ASKER

OMG this is best explanation ever, I have my hosting and domain in godaddy, with wordpress. I thought I can do with some wordpress theme where I can store the uploaded videos in my hosting(as it is unlimited).

but as you mentioned there is less chance to do this with WordPress and I don't really want to go for dedicated servers etc...

I believe I need to dig more about streaming videos in site.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.