Upload videos to website

Thor

Honorary Master
Joined
Jun 5, 2014
Messages
44,427
Reaction score
7,530
Location
Bellville
Hello, can someone just help me to explain how one would go about doing the following:

I want to create a website, probably going to use the bootstrap framework again, but I want visitors to be able to upload their own videos about the event.

These videos must then be displayed in a "feed" like Youtube's home screen.

Essentially

Website will be as follows:
----------------------
Menu XXX XXX XXX
----------------------
----------------------
Logo
----------------------
Text
----------------------
----------------------
Videos


----------------------
footer
----------------------
 
Wouldn't it be easier to have them upload to youtube and you just create the frontend on your site for the already-hosted videos? Means you don't have to deal with different video formats being uploaded and converting them etc.
 
Wouldn't it be easier to have them upload to youtube and you just create the frontend on your site for the already-hosted videos? Means you don't have to deal with different video formats being uploaded and converting them etc.

I initially thought this might be the better way, but I'm trying to make it as easy and straightforward for users as possible, how will the videos show up on the site if they upload it on their individual YouTube accounts
 
Wouldn't it be easier to have them upload to youtube and you just create the frontend on your site for the already-hosted videos? Means you don't have to deal with different video formats being uploaded and converting them etc.

Thats the method I followed for a client who is not very tech-savy.

I created a plugin for wordpress where all the client has to do is add the url for the YouTube or Vimeo video and then it would be displayed on the front page linking to a custom post page where the actual video is displayed.

If the OP wants to see it in action on the actual website, please PM me
 
Thats the method I followed for a client who is not very tech-savy.

I created a plugin for wordpress where all the client has to do is add the url for the YouTube or Vimeo video and then it would be displayed on the front page linking to a custom post page where the actual video is displayed.

If the OP wants to see it in action on the actual website, please PM me

PM in Comming.


With that said I don't want to use a CMS like WordPress, since I'm still learning I think this is a nice start, just not sure where to start :D
 
If you use wordpress there is a very nice plugin that lets you customize the front end and it takes your videos from youtube. Quick and easy. I'll find it and add the link here for you if you change your mind :D
 
If you use wordpress there is a very nice plugin that lets you customize the front end and it takes your videos from youtube. Quick and easy. I'll find it and add the link here for you if you change your mind :D

At this point it can't hurt :)
 
This is what I currently have, but it's not working so well, like I try to upload the video but no luck, images etc works well.

Here is the link to the test - http://mordor.co.za/

PHP:
PHP:
<?php

$allowedExts = array("jpg", "jpeg", "gif", "png", "mp3", "mp4", "wma");
$extension = pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION);

if ((($_FILES["file"]["type"] == "video/mp4")
|| ($_FILES["file"]["type"] == "audio/mp3")
|| ($_FILES["file"]["type"] == "audio/wma")
|| ($_FILES["file"]["type"] == "image/pjpeg")
|| ($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/jpeg"))

&& ($_FILES["file"]["size"] < 50000000)
&& in_array($extension, $allowedExts))

  {
  if ($_FILES["file"]["error"] > 0)
    {
    echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
    }
  else
    {
    echo "Upload: " . $_FILES["file"]["name"] . "<br />";
    echo "Type: " . $_FILES["file"]["type"] . "<br />";
    echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
    echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";

    if (file_exists("upload/" . $_FILES["file"]["name"]))
      {
      echo $_FILES["file"]["name"] . " already exists. ";
      }
    else
      {
      move_uploaded_file($_FILES["file"]["tmp_name"],
      "upload/" . $_FILES["file"]["name"]);
      echo "Stored in: " . "upload/" . $_FILES["file"]["name"];
      }
    }
  }
else
  {
  echo "Invalid file";
  }
?>
 
Why don't you try clip bucket? It's free and looks like this:

youtube-clone-clipbucket-template.jpg
 
You don't have to use that specific template. But you knew that already...

I know :P but I want THAT template.

Actually it's a bit too much i want a simple upload button in the menu and then after the video is uploaded it should be visible in the playlist feed on the home screen.

Preferably all on bootstrap
 
I know :P but I want THAT template.

Actually it's a bit too much i want a simple upload button in the menu and then after the video is uploaded it should be visible in the playlist feed on the home screen.

Preferably all on bootstrap

I checked on Softaculous and there's several YouTube style apps that should be fine for what your want.
 
I'm using Embera to embed videos into a web page. Oembed is worth looking into.

Essentially all you have to get from the user is the URL to their video from whichever service they used to upload it. Embera figures out the embed code and you paste it in or go fancy and use the video's details to show a placeholder that the user can click to play.
 
Last edited:
I hope you have enough bandwidth on your server to allow the streaming of these videos
 
Top
Sign up to the MyBroadband newsletter
X