Hi everybody,

i wrote a C++ wrapper lib and based on that some perl bindings
that let me execute this little script attached at the bottom.

It can be downloaded at:

http://www.s.netic.de/tmohr/lavperl-0.1.0.tar.bz2


Best regards,
Torsten.



#! /usr/bin/perl -w

use LAV;

# some objects to hold some inbetween values
$jpeg_in = LAVJPEG->new();
$ycbcr_in = LAVYCbCr->new();
$rgba = LAVRGBA->new();
$ycbcr_out = LAVYCbCr->new();
$jpeg_out = LAVJPEG->new();


$s = LAVSettings->new();
$i = LAVInFile->new('../res.avi');
$i->fillSettings($s);
$s->setAudio(0, 0, 0);
$s->show();
$n = $s->getNumFrames();

$o = LAVOutFile->new('out.avi', $s);

for($j = 0; $j < $n; $j++) {
        print "frame $j\n";
        $i->readJPEG($jpeg_in, $j);
        $ycbcr_in->fillFromJPEG($jpeg_in, $s);
        $rgba->fillFromYCbCr($ycbcr_in, $s);
        $ycbcr_out->fillFromRGBA($rgba, $s);
        $jpeg_out->fillFromYCbCr($ycbcr_out, $s);
        $o->writeJPEG($jpeg_out);
}


# delete it, to make sure it will be closed
$o = undef;




-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
_______________________________________________
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to