video thumbnail help

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
COKEDUDE

video thumbnail help

Post by COKEDUDE »

How do you make video thumbnails like this in Linux? The only program I know of that can do this is Media Player Classic. I hope there is a way to do this in Linux. What would these types of thumbnails be called?

Image
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
dagon
Level 7
Level 7
Posts: 1655
Joined: Mon Dec 06, 2010 4:33 am
Location: Kungälv, Sweden
Contact:

Re: video thumbnail help

Post by dagon »

in synaptic.
search: video thumbnail

Surely one of the results should be useful.
unexistance

Re: video thumbnail help

Post by unexistance »

Hi,

You can try to run MPC in wine, good if it's working :D

Regards,
rich2005

Re: video thumbnail help

Post by rich2005 »

you could try the script on this page

http://minhtech.com/linux/fedora-linux- ... rl-script/

for flv format change the format from mp4 on line 12 and make the script executable.

needs mplayer, ffmpeg and imagemagick all in the repo.

modified script is here:

Code: Select all

#!/usr/bin/perl -w

use strict;
use POSIX;

my $dir = getcwd();
my ($width, $height, $length);

opendir(DIR, $dir) or die $!;

while (my $file = readdir(DIR)) {
   next unless ($file =~ m/\.flv$/);

   my @info = `mplayer -benchmark -nosound -quiet -vo null -frames 1 -identify $file`;

   foreach (@info) {
      if (substr($_, 0, 15) eq "ID_VIDEO_WIDTH=") {
         $width = substr($_, 15);
      }
      elsif (substr($_, 0, 16) eq "ID_VIDEO_HEIGHT=") {
         $height = substr($_, 16);
      }
   elsif (substr($_, 0, 10) eq "ID_LENGTH=") {
         $length = substr($_, 10);
      }
   }

   $width = floor($width / 3);
   $height = floor($height / 3);
   my ($tile_x, $tile_y, $frame) = (6, 4, 1);
   my ($position, $files);

   while ($frame < ($tile_x * $tile_y + 1)) {
      $position = $frame * floor($length / ($tile_x * $tile_y));

      system("ffmpeg -ss $position -i $file -vcodec mjpeg -vframes 1 -s $width"."x"."$height -an -f rawvideo -y __$frame.jpg 2> /dev/null");

      $files = $files . " __$frame.jpg";

      $frame += 1;
   }

   system("montage -title \"$file\" -geometry $width"."x"."$height"."+"."1"."+"."1 -tile $tile_x"."x"."$tile_y$files $file.jpg");

   system("rm __*.jpg");
}

closedir(DIR);

put the script and your <filename>.flv file into home, open a terminal then run
./thumbs.pl
and it will make a jpg <filename>.flv.jpg

using the only flv file (a tv advert, what else!) I have, the output is:
http://www.imageno.com/8t8zvnp88o40pic.html

always seems to produce 6 wide x 4 deep but the script is probably tweakable.
COKEDUDE

Re: video thumbnail help

Post by COKEDUDE »

unexistance wrote:Hi,

You can try to run MPC in wine, good if it's working :D

Regards,
I don't wanna use wine :P. I have no interest in opening myself up for viruses.

Thank you rich2005. I will test that out shortly.
COKEDUDE

Re: video thumbnail help

Post by COKEDUDE »

I have searched various sites and found these 4 programs for creating thumbnails.

totem, gframecatcher, videocut, smplayer

gframecatcher- Untested
http://developer.berlios.de/projects/gframecatcher/

videocut- This has problems mp4's and mov's. The only type of video I have been able to make thumnails of is avi's and wmv's.
File, open file, export

totem- I have had no problems with any type of video I have tried. I tried avi, wmv, mp4, and mov.
Edit, Create screenshot gallery, save

smplayer- smplayer has the most features so if you like features I recommend using smplayer. I have had no problems with any type of video I have tried. I tried avi, wmv, mp4, and mov.
Video, Preview, ok, save
Locked

Return to “Software & Applications”