Capturing Youtube Video screenshot

Discussion in 'PHP' started by yleiko, Aug 26, 2008.

  1. #1
    Hi,
    I want to embed youtube videos on my site, but before showing embedded video, I want to show videos as small thumbnails (I dont want to use embedding on browse videos page)
    How can I take image preview of a youtube video.

    Another question, is this a unique way (getting video capture from anıther site), or do i need specific methods for each site, say youtube, dailymotion, metacefe etc.
     
    yleiko, Aug 26, 2008 IP
  2. cornetofreak

    cornetofreak Peon

    Messages:
    170
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    i would do something with curl to get it from the sites ur taking the embed from.

    this is an example

    
    <?php
    //CURL FUNCTION YOUTUBE
    
    //CURL FUNCTION METACAFE
    
    if(site = metacafe){
    //use the matacafe curl function that grabs the thumb url and instert to database
    }
    
    elseif(site = youtube){
    //use the youtube curl function that grabs the thumb url and instert to database
    }
    
    // AND SO ON
    ?>
    
    PHP:
     
    cornetofreak, Aug 26, 2008 IP
  3. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #3
    If you add in your scripting the option to choose for mediaplayer, flash, quicktime and realplayer then you have all grounds covered! for video extensions. And most video hosting sites will create there own thumbsnails, maby you can use those!? there free if you cache on your own site. (read there rules for using anything!)
     
    EricBruggema, Aug 26, 2008 IP