VCDQuality Forums
Show all 5 posts from this thread on one page

VCDQuality Forums (http://www.vcdhq.com/forum/index.php)
- Jargon, Encoding/Conversion and Burning (http://www.vcdhq.com/forum/forumdisplay.php?forumid=9)
-- making sample jpegs (http://www.vcdhq.com/forum/showthread.php?threadid=64518)


Posted by gf3k on 07-08-2005 04:32 AM:

making sample jpegs

what program should i use to make decent sample jpegs
from a video source?

thanks for your help, it may be a dumb question but i still need help


Posted by Neversoft on 07-08-2005 11:01 AM:

Most movie playback software will allow you to take a snapshot - from WinDVD to VLC

__________________
Statistically... 9 out of 10 people actually enjoy gang rape.


Posted by horizonstar on 07-09-2005 09:02 AM:

Here's how I do it using mplayer, ImageMagick, and Perl. Sorry about the spacing, but the code didn't paste too well ...


.:. sampleJPEGs.pl .:.
#!/usr/bin/perl -w

# usage: sampleJPEGs.pl [-vop <vop options (scale=640:480, etc.)] [-jump <time>] filename

# if the file is a .avi, then we'll try -ss instead of -sb

use strict 'vars';
use Getopt::Long;

my $vop;
my $jump;

&Getopt::Long::GetOptions("vop=s" => \$vop, # string of -vop options for mplayer
"jump=i" => \$jump); # seconds to jump in AVI samples (default 12)

my $movieFile = shift(@ARGV) || die "usage: sampleJPEGs.pl [-vop <vop options (scale=640:480, etc.)] [-jump <sec>] filename\n";
my @statResults = stat $movieFile;
my $fileSize = $statResults[7];

my $bytePos = int($fileSize * .1);
my $timePos = 5;

# do 4 cap segments starting 1/10 of the way through, and leaping by 1/4
if ((!defined $jump) || ($jump == 0)) {
$jump = 12;
}
for (my $letter='a'; $bytePos<$fileSize; $bytePos+=int($fileSize*.25), $timePos+=$jump, $letter++) {

my $mplayerCommand = "mplayer-1.0pre1 -vo jpeg -jpeg quality=100 -nosound -osdlevel 0";
if (defined $vop) {
$mplayerCommand .= " -vop $vop";
}
if ($movieFile =~ /\.avi/) {
print "timePos = $timePos.\n";
$mplayerCommand .= " -ss $timePos -frames 20 $movieFile";
} else {
print "bytePos = $bytePos.\n";
$mplayerCommand .= " -sb $bytePos -frames 20 $movieFile";
}
system($mplayerCommand);
system("rename 000000 $letter *");
}
-------------------------------------------------------------------------

.:. makeSample.pl .:.
#!/usr/bin/perl -w

use strict;
use Env qw($PWD);
use Getopt::Long;

# start
my $noblack; my $vspace; my $tspace; my $bspace; my $fontsize; my $justtwo; my $help;

&Getopt::Long::GetOptions
("noblack" => \$noblack, # set this flag if there is already black vertical space
"vspace=i" => \$vspace, # amount of vspace to set between the center and the watermarks
"tspace=i" => \$tspace, # amount of vspace to set between the center and the top mark
"bspace=i" => \$bspace, # amount of vspace to set between the center and the bottom mark
"fontsize=i" => \$fontsize, # font size for the main label (default = 36)
"justtwo" => \$justtwo, # only use two images (b10 and c10) despite not being dvdr
"help" => \$help);

if (shift(@ARGV) || defined($help)) {
die "usage: makeSample.pl [-noblack] [-vspace=i] [-tspace=i] [-bspace=i] [-fontsize=i] [-justtwo] [-help]\n";
}

# get the geometry of the sample images
my $identifyString = `/opt/local/bin/identify b10.jpg`;
#print STDERR $identifyString;
$identifyString =~ m/^\S+ \S+ (\d+)x(\d+)\+/;
my $width = $1; my $height = $2;
#print STDERR "width: $width, height: $height\n";
#exit;

# figure out the name of this release
#print STDERR "pwd: $PWD\n";
$PWD =~ m,/([^/]+)/Sample$,i;
my $rlsName = $1;

my $tileString = "2x2";
my $inputFileString = "?10.jpg";
my $verticalSpacing = 30;

# if this is a DVDR, then we only do a 1x2 tile (use b10.jpg and c10.jpg ... sure, why not)
if ($rlsName =~ m/\bdvdr\b/i || $justtwo) {
$tileString = "1x2";
$inputFileString = "b10.jpg c10.jpg";
}

if ($noblack) {
$verticalSpacing = 0;
}

if (!defined $fontsize) {
$fontsize = 36;
}

system("/opt/local/bin/montage -tile $tileString -background black -geometry $width".
"x$height+0+$verticalSpacing $inputFileString temp.bmp");

# the default font turns out to work pretty well for what we want, I guess
# -font Helvetica-Bold
if ($noblack) { # then add a bit more space between center and watermarks, as the bad height is probably kinda big
if (!defined $vspace) {
$vspace = 100;
}
&setSpaces();
system("/opt/local/bin/convert -quality 95 -fill tan -pointsize $fontsize -gravity Center -draw 'text 0,0 \"$rlsName\"' ".
"-fill cyan -pointsize 12 -draw 'text 0,-$tspace \"www.vcdquality.com\"' " .
"-draw 'text 0,$bspace \"www.vcdquality.com\"' temp.bmp sample.jpg");
} else {
if (!defined $vspace) {
$vspace = 60;
}
&setSpaces();
system("/opt/local/bin/convert -quality 95 -fill tan -pointsize $fontsize -gravity Center -draw 'text 0,0 \"$rlsName\"' ".
"-fill cyan -pointsize 12 -draw 'text 0,-$tspace \"www.vcdquality.com\"' " .
"-draw 'text 0,$bspace \"www.vcdquality.com\"' temp.bmp sample.jpg");
}

# set the tspace and bspace variables
sub setSpaces {
if (!defined $tspace) {
$tspace = $vspace;
}
if (!defined $bspace) {
$bspace = $vspace;
}
}
---------------------------------------------------------------


Hope that helps!

__________________


Scrobble all you want, we'll make more!


Posted by skinegibbs on 07-12-2005 06:14 AM:

Hypersnap DX5 works too


Posted by sunup on 07-15-2005 05:20 AM:

i know windvd, bsplayer and maybe a few others but i was always curious about the screenshot featured within windows itself, alt + print screen is a desktop SS, but it just records blank screens of the playback picture. just curious to see if anyone knows why this method doesnt work, cuz it's got me.


i would say bsplayer is good for ss's it has a few options like, Capture Frame >Original Size or 'What you See' for like full-screen

you can resize images easily in photoshop


All times are GMT. The time now is 07:15 PM.
Show all 5 posts from this thread on one page

Powered by: vBulletin Version 2.3.0
Copyright © Jelsoft Enterprises Limited 2000 - 2002.