Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8084613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:51:04+00:00 2026-06-05T17:51:04+00:00

How to create a youtube like video preview? That is in youtube, it is

  • 0

enter image description hereHow to create a youtube like video preview? That is in youtube, it is showing the preview of the video when we mouseover the progress bar? How to do that kind of preview using ffmpeg or mencoder or is there any other way to do that? Have a look at this image. Please go here for a live preview.

http://www.youtube.com/watch?v=yto4_QFoLdA&feature=watch-now-button&wide=1

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T17:51:05+00:00Added an answer on June 5, 2026 at 5:51 pm

    You can use the ffmpeg extension. Below is some ancient code that I wrote to choose six thumbnails from a video.

    The notable parts are:

    $frame = $vid->getFrame(); // pull a frame from the video
    $gd = $frame->toGDImage(); // turn the frame into a GD image
    imagejpeg($gd, "filename.jpg", 70); // save jpeg of the frame using 70% quality
    

    $vid = new ffmpeg_movie ( $fileName );
    $frameRate = $vid->getFrameRate ();
    $gapSize = max(10,$vid->getDuration()-10) * $frameRate / 6;
    $n = 0; $curFrame = 5 * $frameRate;
    while ( $n != 6 ) {
        $f = $vid->getFrame ( $curFrame );
        if ((1==$curFrame && false!==$f) || false !== ($f = $vid->getNextKeyFrame ())) {
            $thumbnails [$n] = array (
                'path' => "muveethumb-$muveeId-$n.jpg", 
                'time' => ceil ( ($vid->getFrameNumber () - 1) * 1000 / $frameRate ) 
            );
            $gd = $f->toGDImage ();
            imagejpeg ( $gd, $targetFolder.$thumbnails [$n] ['path'], 70 );
            ++ $n;
            $curFrame += $gapSize;
        } elseif ($n > 0) {
            while ( $n != 6 ) {
                $thumbnails [] = $thumbnails [$n - 1];
                ++ $n;
            }
        } else {
            if ($curFrame!=1) {
                // attempt to get first frame as a last resort
                $curFrame = 1;
            } else {
                // unless we already tried that
                throw new Exception ( "Could not create thumbnails" );
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Youtube video embedded in a slideshow that I would like to
YouTube has URL's like these: http://www.youtube.com/watch?v=zKqeCtjFGFc When I create a PHP page mine would
I have an IFrame embedding a youtube video. I want to create a textbox
I have a working script like this: jQuery(document).ready(function(){ $('.video-thumb img').bind('mouseover',function(){ var new = $(this).attr('src').replace(/default.jpg/,'1.jpg');
I would like to create a function that would allow me to embed my
I would like to re-create the animation of the delete confirmation button that Apple
I'm trying to create a form that will handle video file uploads from the
I'm trying to submit a user uploaded video to youtube using an html input
I'd like to create a reusable Django app that handles status updates of the
if there's a html like the following <div class=comment> [youtube]http://www.youtube.com/watch?v=videoid1[/youtube] random text </div> <div

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.