0

i have video URL of uploaded video on youtube, vimeo etc. How i can get first frame of video in image format usimg ffmpeg or other technique.

  • I think following link will answer your question: http://stackoverflow.com/questions/3575311/how-can-i-save-first-frame-of-a-video-as-image – mrd May 23 '12 at 11:34

1 Answers1

0

Here is small java script function

 function getScreen( url, size )
    {
      if(url === null){ return ""; }

      size = (size === null) ? "big" : size;
      var vid;
      var results;

      results = url.match("[\\?&]v=([^&#]*)");

      vid = ( results === null ) ? url : results[1];

      if(size == "small"){
        return "http://img.youtube.com/vi/"+vid+"/2.jpg";
      }else {
        return "http://img.youtube.com/vi/"+vid+"/0.jpg";
      }
    }

imgUrl_big   = getScreen("uVLQhRiEXZs"); 
imgUrl_small = getScreen("uVLQhRiEXZs", 'small');

For more help you can check this jquery plugin jYoutube

Imran Rashid
  • 3,352
  • 4
  • 31
  • 41