Youtube style video playback on directory site

This is a discussion on "Youtube style video playback on directory site" within the Flash & Multimedia Forum section. This forum, and the thread "Youtube style video playback on directory site are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Aug 29th, 2007, 05:40
SuperMember

SuperMember
Join Date: Apr 2007
Location: Sydney
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Youtube style video playback on directory site

Hi,

I have a directory site listing various audio and video profesionals. When a user clicks on a person in the search results they get sent to a page like www.somedomain.com/profile.php?member=membername

I want to allow members to upload a showreel and have it play back similar to youtube. I am fine to do this when I create the flash file and video on my pc here then upload it to the server.. it streams no problem.. but how do I go about doing this dynamically??

So basically every members profile page will use the same player code, but dynamically call in a different video to play??

Also can I convert their video from whatever format they upload it in to probably FLV server side??

If someone knows of a tutorial to do something similar, I'd be greatful! (I tried google but found nothing..)

Thanks,

Nathan.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Aug 29th, 2007, 20:05
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Youtube style video playback on directory site

Man, this gets pretty complex.....

Yes you can build a flash player/steaming server that calls in dynamic files to the player based on variables and code on the page just like YouTube...there aren't many tutorials around about this...and it would involved buying a streaming server from Adobe.

But, you might be able to do the same thing with progressive download player, so google for those two terms: Streaming Flash Player and Progressive Flash Player.

As for converting the files serverside, this is also possible. You'd need t use Asp/Php/Flex to upload it sever side and then you need to either write or find a prewritten .flv encoder to handle the conversion, so, google for that as well.

Our programming team here at my office built one...and it wasn't easy...
Last Blog Entry: Yay!? (Oct 8th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Aug 29th, 2007, 23:27
SuperMember

SuperMember
Join Date: Apr 2007
Location: Sydney
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Youtube style video playback on directory site

Hi Sgaspar11,,

The playback side of things was quite easy, I'll post it for anyone who might come accross this and be trying to do the same thing.

Basically create a fla with 2 layers, player and script. Drag a media compononent onto the stage in the first frame of the player layer, name the instance player. Put the following AS in the first frame of the script layer:

Code: Select all
 
stop();
var passed:String = video;
player.setMedia(video);
I saved and published as videotest.swf

Use the following code to call the swf from the php page:

Code: Select all
$showreel = $row['showreel']; // taken from mySQL database
<script language="javascript" type="text/javascript">
   if (AC_FL_RunContent == 0) {
    alert("This page requires AC_RunActiveContent.js");
   } else {
    AC_FL_RunContent(
    'codebase', 'https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0',
    'width', '240',  
    'height', '180',
    'src', ' videotest',
    'quality', 'high',
    'pluginspage', 'https://www.macromedia.com/go/getflashplayer',
    'align', 'middle',
    'play', 'true',
    'loop', 'false',
    'FlashVars', 'file=<? echo $showreel ?>', 
    'wmode', 'window',
    'devicefont', 'false',
    'id', 'videotest',
    'bgcolor', '#FFFFFF',
    'name', 'flash-animations',
    'menu', 'false',
    'allowScriptAccess','sameDomain',
    'movie', 'videotest',
    'salign', ''
    );
   }
  </script> 
  <noscript>
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/s...ersion=8,0,0,0" data="videotest.swf" width="240" height="180">
  <param name="movie" value="videotest.swf"/>
  <param name="menu" value="false"/>
  <param name="quality" value="high"/>
  <param name="FlashVars" value="file=<? echo $showreel ?>" />
  </object>
This method of embeding flash removes the "click to activate" thing in ie7, but requires the following two line of code in the head of the html page:

Code: Select all
<script language="javascript" type="text/javascript">AC_FL_RunContent = 0;</script>
<script src="./AC_RunActiveContent.js" language="javascript" type="text/javascript"></script>
and that you have th AC_RunActiveContent.js file in the same directory on your server. Google will find this file.

As you said this is progressive, not streamed. I apparently can't stream without flash media server installed on the server, hard when it's a shared server!! (and the cost!!). Probably going to have the same issues with the server side conversion, I'll be checking that out today,

Regards,

Nathan.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Aug 30th, 2007, 04:16
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Youtube style video playback on directory site

Yeah building/finding the players is very easy, the complex part is the conversion/streaming server....alot more code gets involved at that point and more money. :-)

I've built one for my company, a streaming player - awesome if you can afford it, and once it is built totally scalable.

P.S. Thanks for sharing your code. Always appreciated. If you find any good software to do the server side converstion let us know, I had my IT team of brain childs do it on their own so I didn't have to worry about figuring that part out.

Cheers,

Scott
Last Blog Entry: Yay!? (Oct 8th, 2007)

Last edited by Sgaspar11; Aug 30th, 2007 at 04:20.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Aug 30th, 2007, 06:35
SuperMember

SuperMember
Join Date: Apr 2007
Location: Sydney
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Youtube style video playback on directory site

Hi Sgaspar11,

Aparently ffmpeg will do the server side conversion, it is opensource too!!

This tute explains:

http://www.iepak.com/30/topicdetail.aspx

I don't believe this will work for me however as I don't have priveleges to install and execute software on the server. I will look into it more when Ihave the time (I've been sidetracked!!)

Regards,

Nathan.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Aug 30th, 2007, 16:38
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Youtube style video playback on directory site

Hey awesome information! Thank you for sharing!
Last Blog Entry: Yay!? (Oct 8th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
dynamic, flash, youtube style video

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
New Site Style Ducky Graphics and 3D 14 Jan 26th, 2008 00:26
How do I make a YouTube style on-screen play button. Zonglars Flash & Multimedia Forum 3 Dec 29th, 2007 08:12
Red Themed Blog style site nuksies Free Web Site Critique 3 Oct 9th, 2007 17:15
How to have swf video playback on site tab click? kisaragi JavaScript Forum 4 Feb 15th, 2007 18:36
Autotrader Style Site davepain Webforumz Cafe 4 Dec 17th, 2006 13:51


All times are GMT. The time now is 23:44.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42