Jump to content
xisto Community
Sign in to follow this  
dasmeaty

Youtube Style Video Streaming

Recommended Posts

Okay my aim is to provide youtube style streaming, except I don't want to use videos uploaded to the site I want to stream videos from user submitted urls.I am pretty certain I will be using a modified Drupal as my backend (My knowledge of PHP is limited and my starting budget is nil so creating my own system or hiring a coder is out of the question, I want to build this up slowly).My questions are does anyone know some good starting ideas for achieving this, I watched an interesting seminar called Drutube off google explaining what nodes and adjustments can be made to create youtube style video hosting in drupal but that relies on user uploads and since I want to keep my bandwidth as low as possible I wish to play these from external urls.Is it legal for me to display invideo ads on videos that users have submitted to the site despite having limited control on whether they are copyrighted or not?Does anyone know any basic packages for working out advert income per page and being able to split this up and offer a percentage to a user? (Similar to the one on Xisto for inforum ads but I'm guessing that it is inhouse coded?)Is there anyway to protect the original video urls (Such as rmtp) but on the videos that are linked externally and not managed by myself without spending large amounts of money and is this legal?I have an idea for how to achieve this, but I'm always open to better suggestions.Thanks any answers to any of these questions will help me out greatly.

Edited by dasmeaty (see edit history)

Share this post


Link to post
Share on other sites

This is just a quick write-up and isn't necessarily what you would call 'advanced', but it should be a sufficient base if you were to go about implementing something like this.

 

-mysql db (drupal)

--posts

----id

----yid

 

-- phpMyAdmin SQL Dump-- version 3.2.4-- phpmyadmin.net/home_page/index.php---- Host: localhost-- Generation Time: Mar 30, 2010 at 05:09 PM-- Server version: 5.1.41-- PHP Version: 5.3.1SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;/*!40101 SET NAMES utf8 */;---- Database: `drupal`---- ------------------------------------------------------------ Table structure for table `posts`--CREATE TABLE IF NOT EXISTS `posts` (  `id` int(11) NOT NULL AUTO_INCREMENT,  `yid` text NOT NULL,  PRIMARY KEY (`id`)) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2;---- Dumping data for table `posts`--INSERT INTO `posts` (`id`, `yid`) VALUES(1, 'kCIZhS_Vp8c');/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

and then...

<?php	$id = $_GET['id'];	$mysql = mysql_connect('localhost', 'root', '');	mysql_select_db('drupal');	$query = mysql_query('SELECT * FROM posts WHERE id = '.$id, $mysql);	$resultset = mysql_fetch_array($query);	$code = $resultset['yid'];	echo '<object width="640" height="385">		<param name="movie" value="youtube.com/watch?v=&%2339;.$code.'		</param>		<param name="allowFullScreen" value="true">		</param>		<param name="allowscriptaccess" value="always">		</param>		<embed src="youtube.com/watch?v=&%2339;.$code.'" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385">		</embed>	</object>	';?><html>	<head>		<title>Video</title>	</head>	<body>		<p> The video you requested. </p>	</body></html>

LOCALHOST/video.php?id=1

 

Result:

Posted Image

Share this post


Link to post
Share on other sites

Thanks for the reply and the time to put these code snippets. I will start toying with these and see what I can put in the backend, the main aim is to get it to work with the member levels in drupal as I hope to assign certain uploaders to have unmanaged uploading and for my usual members to have all content reviewed before it is published... this is indeed a start and I thank you.Although I will not be using actual youtube videos as the content of the site is more adult orientated, but the youtube part is easily modified.Like I said my knowledge of PHP is limited, I can piece together a script that I can see to an extent but I don't have the confidence to write from scratch ;)

Share this post


Link to post
Share on other sites

Yes and I suppose I should thank you as well, since I was planning on doing something like this for my website (preferably with video upload however it doesn't really matter) and I needed something to do.

Thanks for the reply and the time to put these code snippets. I will start toying with these and see what I can put in the backend, the main aim is to get it to work with the member levels in drupal as I hope to assign certain uploaders to have unmanaged uploading and for my usual members to have all content reviewed before it is published... this is indeed a start and I thank you.
Although I will not be using actual youtube videos as the content of the site is more adult orientated, but the youtube part is easily modified.

Like I said my knowledge of PHP is limited, I can piece together a script that I can see to an extent but I don't have the confidence to write from scratch ;)


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.