Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Building a site that will facilitate video uploads of limited duration

Options
  • 02-02-2014 11:27pm
    #1
    Banned (with Prison Access) Posts: 388 ✭✭


    I am just wondering what the potential solutions are for allowing website users to upload a video to a site where the video will be hosted via the site - and where the video needs to be of a limited duration.

    So the idea is that each video will be restricted to 30 seconds max, as the idea is that these will be quick, snappy intros.

    Questions:

    -Is it possible to restrict video length when you plan to host the videos yourself (presume it has to be!)?

    -Any ideas on potential ballpark costs for hosting say 100 videos of max 20-30 seconds in length? The idea is that we will need to host them ourselves, since otherwise we would be redirecting people to YouTube or somewhere first, which is pretty awkward and not ideal - especially since people may not come back to the site at all that way.


Comments

  • Moderators, Society & Culture Moderators Posts: 17,642 Mod ✭✭✭✭Graham


    What video serving software are you planning on using?
    Are you going to be transcoding the videos as soon as they're uploaded?
    Will you be storing the videos in adaptive/multiple bit rates and encoding types to support assorted clients and connections?

    There are plenty of cloud based video hosting providers that will do all of this without hijacking your traffic/brand.

    DMCloud and Wistia are two I can think of off the top of my head.


  • Registered Users Posts: 6,152 ✭✭✭Talisman


    I had to do something similar to this for a project before. My solution was to upload the file directly to S3 - that gets you around the nightmare of how much storage do you require. The cost was a few cent per month, it's free to upload but you pay for storage and bandwidth when content is downloaded.

    Transcoding the files will cost you money and you may also need to cut the videos. You have no way of knowing how long a video clip is before it is uploaded, for this reason we implemented a size restriction on the upload. Hosting and streaming the transcoded video will also cost money.

    If you want to implement this as cheaply as possible then my advice would be to use YouTube for the project. Check out the YouTube API provided by Google.

    Steps:
    • Create your own YouTube channel.
    • Upload the video clips into it.
    • Build a playlist.
    • Use the API to pull the playlist (JSON) to your website.
    • Populate a gallery on your website.

    YouTube has the added benefit that it is well established and you could use it to bring traffic to your website if you wanted to.


  • Moderators, Society & Culture Moderators Posts: 17,642 Mod ✭✭✭✭Graham


    Don't YouTube show thumbnails of 'related' videos once your own video has stopped playing?


  • Banned (with Prison Access) Posts: 388 ✭✭Atomico


    Talisman wrote: »
    I had to do something similar to this for a project before. My solution was to upload the file directly to S3 - that gets you around the nightmare of how much storage do you require. The cost was a few cent per month, it's free to upload but you pay for storage and bandwidth when content is downloaded.

    Transcoding the files will cost you money and you may also need to cut the videos. You have no way of knowing how long a video clip is before it is uploaded, for this reason we implemented a size restriction on the upload. Hosting and streaming the transcoded video will also cost money.

    If you want to implement this as cheaply as possible then my advice would be to use YouTube for the project. Check out the YouTube API provided by Google.

    Steps:
    • Create your own YouTube channel.
    • Upload the video clips into it.
    • Build a playlist.
    • Use the API to pull the playlist (JSON) to your website.
    • Populate a gallery on your website.

    YouTube has the added benefit that it is well established and you could use it to bring traffic to your website if you wanted to.

    That sounds a bit complicated! I know you would save money that way, but this would be offset by the complications I would say.

    To give some more details, what we are after is a way to allow users to upload videos themselves, without us having to collect them and upload to a YouTube channel. We want to have a way of doing this without relying on YouTube. Perhaps we could restrict the video size permitted per upload, where a particular size would correspond to a specific time duration, even roughly? E.g. between 30 and 40 seconds.

    Any idea how this site does it? https://www.squeeler.com/

    I see a Vimeo integration (they appear to have hidden the wrapper). At the upload stage on that site, you can simply upload a video from your computer. But I presume they are using Vimeo in some shape or form too.

    Edit: I see what you're driving at though Talisman - hosting yourself looks fraught with both complexity and cost too!


  • Registered Users Posts: 6,152 ✭✭✭Talisman


    It was late when I wrote that and didn't explain the process clearly. The only manual process is that you need to create your YouTube channel.

    My advice would be to first upload the video to S3 so that you have a copy of the original. In hindsight this is easy enough - but at the time, I spent a few days banging my head against a brick wall trying to get it to work. I eventually figured out that S3 expects the parameters passed to it to be in the exact same order as listed in the signed policy which needs to be created for the upload request. In the whole project the S3 upload is probably the most complex part. I used a JavaScript library, Plupload to provide the upload functionality. The signed policy was generated on the server and inserted into the form using an AJAX request hooked into the FilesAdded event.

    You need some code to upload the video to YouTube from S3 and it looks like somebody wrote the code for you already in PHP - See Stackoverflow.

    Building the playlist is done through the API - Again this has already been done for you. See API Code Sample & Stackoverflow.

    The code for getting the play list in JSON is also written for you in the API Sample Code.


  • Advertisement
  • Registered Users Posts: 6,152 ✭✭✭Talisman


    Atomico wrote: »
    Any idea how this site does it? https://www.squeeler.com/

    I see a Vimeo integration (they appear to have hidden the wrapper). At the upload stage on that site, you can simply upload a video from your computer. But I presume they are using Vimeo in some shape or form too.
    I recognise the player, they're using Vimeo Pro. Vimeo have an API for their service but I've never used it.


  • Banned (with Prison Access) Posts: 388 ✭✭Atomico


    Talisman wrote: »
    I recognise the player, they're using Vimeo Pro. Vimeo have an API for their service but I've never used it.

    That's what I figured alright. So do you reckon they are using Vimeo using the process you outlined in relation to YouTube?

    Not a developer myself as you might have guessed :)


  • Registered Users Posts: 6,152 ✭✭✭Talisman


    I would think they are uploading directly to Vimeo and skipping the Amazon S3 step.


  • Banned (with Prison Access) Posts: 388 ✭✭Atomico


    Talisman wrote: »
    I would think they are uploading directly to Vimeo and skipping the Amazon S3 step.

    I signed up to Squeeler and when I click to upload a video on the site it gives me a dialog box to upload a file from my computer. That's the only option you get.

    So, I am guessing these are the steps on that site:

    1) I upload a file from my computer.

    2) The website owners take my file and manually upload it to their Vimeo account.

    3) They embed my video on their site, hiding the Vimeo branding.

    Sound about right? I guess that could work really well, at least in the initial stages when the volume of videos being uploaded is relatively small.


  • Registered Users Posts: 6,152 ✭✭✭Talisman


    If you sign up for the Vimeo Pro account the player is customizable and not branded.

    It's a single step process, the user selects the video clip on their computer and upload it to the Vimeo server.

    Vimeo upload process: http://developer.vimeo.com/apis/advanced/upload

    If you were to do as you propose using your own server you will encounter two issues quite quickly:

    1 - Bandwidth: You are allocated a bandwidth quota each month. The quota is usually shared between uploads and downloads.

    Now consider the approach you are taking using a 100MB file.
    User uploads it : 100MB.
    How do you get it in order to review the content? Download it -> Another 100MB.
    You'll use 200MB of your allocated server bandwidth before you've even uploaded anything to Vimeo.

    2 - How many concurrent uploads/downloads can your server handle?

    This is where cloud hosted services win.

    If you are going to use Vimeo then you let the user upload directly to the service via your branded upload facility. Looking at the API documentation I see that there is a privacy setting, so you would use amend the privacy of the uploaded video clip so that it can be reviewed. After it is reviewed you can choose to make it publicly available or delete it.


  • Advertisement
  • Banned (with Prison Access) Posts: 388 ✭✭Atomico


    Talisman wrote: »
    If you sign up for the Vimeo Pro account the player is customizable and not branded.

    It's a single step process, the user selects the video clip on their computer and upload it to the Vimeo server.

    Vimeo upload process: http://developer.vimeo.com/apis/advanced/upload

    If you were to do as you propose using your own server you will encounter two issues quite quickly:

    1 - Bandwidth: You are allocated a bandwidth quota each month. The quota is usually shared between uploads and downloads.

    Now consider the approach you are taking using a 100MB file.
    User uploads it : 100MB.
    How do you get it in order to review the content? Download it -> Another 100MB.
    You'll use 200MB of your allocated server bandwidth before you've even uploaded anything to Vimeo.

    2 - How many concurrent uploads/downloads can your server handle?

    This is where cloud hosted services win.

    If you are going to use Vimeo then you let the user upload directly to the service via your branded upload facility. Looking at the API documentation I see that there is a privacy setting, so you would use amend the privacy of the uploaded video clip so that it can be reviewed. After it is reviewed you can choose to make it publicly available or delete it.

    Ah cool, figured the paid account would allow you to hide their branding.

    Cloud-hosted seems to be the way go to for sure. I actually checked out their 'how much storage do I need' calculator, and it looks like you get a lot for your money.


  • Registered Users Posts: 92 ✭✭jgh_


    Another option is www.sproutvideo.com, not sure how they stack up against vimeo though


  • Registered Users Posts: 40,038 ✭✭✭✭Sparks


    Atomico wrote: »
    -Any ideas on potential ballpark costs for hosting say 100 videos of max 20-30 seconds in length? The idea is that we will need to host them ourselves, since otherwise we would be redirecting people to YouTube or somewhere first, which is pretty awkward and not ideal - especially since people may not come back to the site at all that way.

    The first part is cool, hence the thread still being open, but this part is outside the charter guys, so less of the hosting talk and more of the development talk please.


  • Banned (with Prison Access) Posts: 388 ✭✭Atomico


    Sparks wrote: »
    The first part is cool, hence the thread still being open, but this part is outside the charter guys, so less of the hosting talk and more of the development talk please.

    Web hosting not video hosting surely, no? :)

    Web Hosting
    1. Questions about specific web hosting companies or how to use their services aren't allowed.
    2. Looking for recommendations or suggestions for a web host are also prohibited.


  • Registered Users Posts: 40,038 ✭✭✭✭Sparks


    If you can find a video hosting company that doesn't use the web, go for it :)
    But don't forget, there's a reason for the rule...


Advertisement