Can anyone suggest to me how to read a video file from Perl without using any third-party tools?
I know the opencv
library for Python and C. I am not sure which one to use for Perl.
UPDATE
I get the output as
3 bytes read
´ˇÙ
Argument "M-+M-^?M-t" isn't numeric in bitwise and (&) at
0
I am novice in perl and I am missing something. I am reading 3 bytes from the file till EOF. I want to mask it and do some manipulation on the bits. I am reading pack/unpack
it really doesn't make a clue to me.
open (FILE, "<:raw", $InputFile) or die "Couldn't open";
my ($buf, $data, $n);
while (($n = read FILE, $data, 3) != 0) {
print "$n bytes read\n";
$buf = $data;
print $buf . "\n";
my $maskNumber = 0x4;
my $value = ($buf & $maskNumber);
print $value . "\n";
}