VCDQuality Forums
Here you can view your subscribed threads, work with private messages and edit your profile and preferences Frequently Asked Questions Search Home  
VCDQuality Forums : Powered by vBulletin version 2.3.0 VCDQuality Forums > VCDQuality.com > Jargon, Encoding/Conversion and Burning > making sample jpegs
  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
gf3k
Jul 2005

Registered

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

Report this post to a moderator | IP: Logged

Old Post 07-08-2005 04:32 AM
gf3k is offline Click Here to See the Profile for gf3k Click here to Send gf3k a Private Message Find more posts by gf3k Add gf3k to your buddy list Edit/Delete Message Reply w/Quote
Neversoft
May 2002


Admin?

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.

Report this post to a moderator | IP: Logged

Old Post 07-08-2005 11:01 AM
Neversoft is offline Click Here to See the Profile for Neversoft Click here to Send Neversoft a Private Message Find more posts by Neversoft Add Neversoft to your buddy list Edit/Delete Message Reply w/Quote
horizonstar
Dec 2002


$uXor

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!

Report this post to a moderator | IP: Logged

Old Post 07-09-2005 09:02 AM
horizonstar is offline Click Here to See the Profile for horizonstar Click here to Send horizonstar a Private Message Find more posts by horizonstar Add horizonstar to your buddy list Edit/Delete Message Reply w/Quote
skinegibbs
Jul 2005

BANNED

Hypersnap DX5 works too

Report this post to a moderator | IP: Logged

Old Post 07-12-2005 06:14 AM
skinegibbs is offline Click Here to See the Profile for skinegibbs Click here to Send skinegibbs a Private Message Find more posts by skinegibbs Add skinegibbs to your buddy list Edit/Delete Message Reply w/Quote
sunup
Feb 2004


Registered

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

Report this post to a moderator | IP: Logged

Old Post 07-15-2005 05:20 AM
sunup is offline Click Here to See the Profile for sunup Click here to Send sunup a Private Message Find more posts by sunup Add sunup to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 07:25 PM. Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread

Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

< Contact Us - www.vcdhq.com >

Powered by: vBulletin Version 2.3.0
Copyright ©2000, 2001, Jelsoft Enterprises Limited.