Whytze Posted November 18, 2006 Share Posted November 18, 2006 I need help for my video website related to adding the videos. Each video has a screenshot and the video itself following it. What I need help with is saving the file on my website if its not hosted under root (ex www.mywebsite.com/filefile). Example, if someone posts a link from website xyz in the form, then the website automatically downloads a copy into the database (Screenshot[picture] and the video itself). I've seen this work with avatar systems all the time on invision. Quote Link to comment Share on other sites More sharing options...
simcoweb Posted November 18, 2006 Share Posted November 18, 2006 If i'm understanding your question, if a user doesn't actually upload a video but instead pastes in a link to a video ( like a YouTube link ) then you want to somehow download the video from YouTube into a folder on your site? Quote Link to comment Share on other sites More sharing options...
Whytze Posted November 18, 2006 Author Share Posted November 18, 2006 bingo. its not neccesary for the video though (and not flash, i was thinking more .avi .mpg. .mov. mp4 etc), im more interested in the screenshot process being saved. Quote Link to comment Share on other sites More sharing options...
simcoweb Posted November 18, 2006 Share Posted November 18, 2006 Ok, gotcha. In regards to the video types...hardly anyone uses those formats anymore on sites showcasing mass amounts of vids. Too big. The .FLV format is taking over. Let's take your concept and break it down a bit. The 'screenshot' for a typical YouTube preview/thumbnail has a location and reference like this:[quote]http://sjl-static6.sjl.youtube.com/vi/JzqumbhfxRo/2.jpg[/quote]Which is a hyperlink pointing to this:[quote]http://www.youtube.com/watch?v=JzqumbhfxRo[/quote]And, if they wanted to embed that video on your site they'd use this link:[quote]<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/JzqumbhfxRo"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/JzqumbhfxRo" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>[/quote]The common ID in all this is the 'JzqumbhfxRo' identifier. I can't think of a way that would strip out all the other characters and isolate or even identify that part of the hyperlink. Some heavy duty use of regular expressions is the only thing I can imagine would work. If your goal is to snag the picture then assuming your 'user' enters the embed code above. You would need to isolate the ID part and then surround it by the necessary code to identify it on their site (which could be totally random as well without a specific pattern) and then somehow copy the file to a folder on your site, make a reference to it for that particular user/video upload. Maybe i'm looking at this wrong but that appears to be the challenge. Quote Link to comment Share on other sites More sharing options...
Whytze Posted November 29, 2006 Author Share Posted November 29, 2006 [quote author=simcoweb link=topic=115418.msg470105#msg470105 date=1163870211]Ok, gotcha. In regards to the video types...hardly anyone uses those formats anymore on sites showcasing mass amounts of vids. Too big. The .FLV format is taking over. Let's take your concept and break it down a bit. The 'screenshot' for a typical YouTube preview/thumbnail has a location and reference like this:[quote]http://sjl-static6.sjl.youtube.com/vi/JzqumbhfxRo/2.jpg[/quote]Which is a hyperlink pointing to this:[quote]http://www.youtube.com/watch?v=JzqumbhfxRo[/quote]And, if they wanted to embed that video on your site they'd use this link:[quote]<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/JzqumbhfxRo"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/JzqumbhfxRo" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>[/quote]The common ID in all this is the 'JzqumbhfxRo' identifier. I can't think of a way that would strip out all the other characters and isolate or even identify that part of the hyperlink. Some heavy duty use of regular expressions is the only thing I can imagine would work. If your goal is to snag the picture then assuming your 'user' enters the embed code above. You would need to isolate the ID part and then surround it by the necessary code to identify it on their site (which could be totally random as well without a specific pattern) and then somehow copy the file to a folder on your site, make a reference to it for that particular user/video upload. Maybe i'm looking at this wrong but that appears to be the challenge.[/quote]Appriciate the help but im working with old styles suck as.avi and .mpg Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.