En la documentación de Image::ExifTool se muestran los tags de los que se puede extraer información.
Mira ver si esos valores te interesan:
http://search.cpan.org/src/EXIFTOOL/Ima ... kTime.html
exiftool -v -v -v video.mpeg
portatil:~ # cpan install Image::ExifTool
...
portatil:~ # exiftool /home/explorer/.mldonkey/incoming/files/Droste\ Print\ Gallery\ \(M.C.\ Escher\ 1956\)\ loop.mpeg
ExifTool Version Number : 6.90
File Name : Droste Print Gallery (M.C. Escher 1956) loop.mpeg
Directory : /home/explorer/.mldonkey/incoming/files
File Size : 10 MB
File Modification Date/Time : 2007:05:04 21:14:26
File Type : MPEG
MIME Type : video/mpeg
Image Width : 400
Image Height : 400
Aspect Ratio : 1:1
Frame Rate : 25 fps
Video Bitrate : 5000000
Duration : 0:00:16.09 (approx)
Image Size : 400x400
portatil:~ # exiftool -v /home/explorer/.mldonkey/incoming/files/Droste\ Print\ Gallery\ \(M.C.\ Escher\ 1956\)\ loop.mpeg
ExifToolVersion = 6.90
FileName = Droste Print Gallery (M.C. Escher 1956) loop.mpeg
Directory = /home/explorer/.mldonkey/incoming/files
FileSize = 10053632
FileModifyDate = 1178306066
FileType = MPEG
MIMEType = video/mpeg
ImageWidth = 400
ImageHeight = 400
AspectRatio = 1
FrameRate = 3
VideoBitrate = 12500
portatil:~ # exiftool /home/explorer/.mldonkey/incoming/files/Escher\ -\ Print\ Gallery\ -\ Spiral.avi
ExifTool Version Number : 6.90
File Name : Escher - Print Gallery - Spiral.avi
Directory : /home/explorer/.mldonkey/incoming/files
File Size : 10 MB
File Modification Date/Time : 2007:04:25 02:35:29
File Type : AVI
MIME Type : video/avi
Frame Rate : 25
Max Data Rate : 610.4 kB/s
Frame Count : 400
Stream Count : 1
Stream Type : Video
Codec : MP42
Quality : 4294967295
Sample Size : 480000 bytes
Image Width : 400
Image Height : 400
Planes : 1
Bit Depth : 24
Compression : Unknown (MP42)
Image Length : 480000
Pixels Per Meter X : 0
Pixels Per Meter Y : 0
Num Colors : Use BitDepth
Num Important Colors : All
Duration : 16.00s
Image Size : 400x400
portatil:~ # exiftool -v /home/explorer/.mldonkey/incoming/files/Escher\ -\ Print\ Gallery\ -\ Spiral.avi
ExifToolVersion = 6.90
FileName = Escher - Print Gallery - Spiral.avi
Directory = /home/explorer/.mldonkey/incoming/files
FileSize = 10003150
FileModifyDate = 1177461329
FileType = AVI
MIMEType = video/avi
RIFF 'LIST_hdrl' chunk (188 bytes of data):
+ [RIFF directory, 188 bytes]
| AVIHeader (SubDirectory) -->
| + [BinaryData directory, 56 bytes]
| | FrameRate = 40000
| | MaxDataRate = 625000
| | FrameCount = 400
| | StreamCount = 1
| | ImageWidth = 400
| | ImageHeight = 400
| Stream (SubDirectory) -->
| + [Stream directory, 112 bytes]
| | StreamHeader (SubDirectory) -->
| | + [BinaryData directory, 56 bytes]
| | | StreamType = vids
| | | Codec = MP42
| | | Quality = 4294967295
| | | SampleSize = 480000
| | VideoFormat (SubDirectory) -->
| | + [BinaryData directory, 40 bytes]
| | | ImageWidth = 400
| | | ImageHeight = 400
| | | Planes = 1
| | | BitDepth = 24
| | | Compression = 842289229
| | | ImageLength = 480000
| | | PixelsPerMeterX = 0
| | | PixelsPerMeterY = 0
| | | NumColors = 0
| | | NumImportantColors = 0
RIFF 'LIST_movi' chunk (9996518 bytes of data):
(end of parsing)
portatil:~ # exiftool -v -v /home/explorer/.mldonkey/incoming/files/Escher\ -\ Print\ Gallery\ -\ Spiral.avi
ExifToolVersion = 6.90
FileName = Escher - Print Gallery - Spiral.avi
Directory = /home/explorer/.mldonkey/incoming/files
FileSize = 10003150
FileModifyDate = 1177461329
FileType = AVI
MIMEType = video/avi
RIFF 'LIST_hdrl' chunk (188 bytes of data):
+ [RIFF directory, 188 bytes]
| AVIHeader (SubDirectory) -->
| - Tag 'avih' (56 bytes)
| + [BinaryData directory, 56 bytes]
| | FrameRate = 40000
| | - Tag 0x0000 (4 bytes, int32u[1])
| | MaxDataRate = 625000
| | - Tag 0x0001 (4 bytes, int32u[1])
| | FrameCount = 400
| | - Tag 0x0004 (4 bytes, int32u[1])
| | StreamCount = 1
| | - Tag 0x0006 (4 bytes, int32u[1])
| | ImageWidth = 400
| | - Tag 0x0008 (4 bytes, int32u[1])
| | ImageHeight = 400
| | - Tag 0x0009 (4 bytes, int32u[1])
| Stream (SubDirectory) -->
| - Tag 'LIST_strl' (112 bytes)
| + [Stream directory, 112 bytes]
| | StreamHeader (SubDirectory) -->
| | - Tag 'strh' (56 bytes)
| | + [BinaryData directory, 56 bytes]
| | | StreamType = vids
| | | - Tag 0x0000 (4 bytes, string[4])
| | | Codec = MP42
| | | - Tag 0x0001 (4 bytes, string[4])
| | | Quality = 4294967295
| | | - Tag 0x000a (4 bytes, int32u[1])
| | | SampleSize = 480000
| | | - Tag 0x000b (4 bytes, int32u[1])
| | VideoFormat (SubDirectory) -->
| | - Tag 'strf' (40 bytes)
| | + [BinaryData directory, 40 bytes]
| | | ImageWidth = 400
| | | - Tag 0x0004 (4 bytes, int32u[1])
| | | ImageHeight = 400
| | | - Tag 0x0008 (4 bytes, int32u[1])
| | | Planes = 1
| | | - Tag 0x000c (2 bytes, int16u[1])
| | | BitDepth = 24
| | | - Tag 0x000e (2 bytes, int16u[1])
| | | Compression = 842289229
| | | - Tag 0x0010 (4 bytes, int32u[1])
| | | ImageLength = 480000
| | | - Tag 0x0014 (4 bytes, int32u[1])
| | | PixelsPerMeterX = 0
| | | - Tag 0x0018 (4 bytes, int32u[1])
| | | PixelsPerMeterY = 0
| | | - Tag 0x001c (4 bytes, int32u[1])
| | | NumColors = 0
| | | - Tag 0x0020 (4 bytes, int32u[1])
| | | NumImportantColors = 0
| | | - Tag 0x0024 (4 bytes, int32u[1])
RIFF 'LIST_movi' chunk (9996518 bytes of data):
(end of parsing)
portatil:~ # exiftool -v -v -v /home/explorer/.mldonkey/incoming/files/Escher\ -\ Print\ Gallery\ -\ Spiral.avi
ExifToolVersion = 6.90
FileName = Escher - Print Gallery - Spiral.avi
Directory = /home/explorer/.mldonkey/incoming/files
FileSize = 10003150
FileModifyDate = 1177461329
FileType = AVI
MIMEType = video/avi
RIFF 'LIST_hdrl' chunk (188 bytes of data):
+ [RIFF directory, 188 bytes]
| AVIHeader (SubDirectory) -->
| - Tag 'avih' (56 bytes):
| 0020: 40 9c 00 00 68 89 09 00 00 00 00 00 10 09 00 00 [@...h...........]
| 0030: 90 01 00 00 00 00 00 00 01 00 00 00 00 00 10 00 [................]
| 0040: 90 01 00 00 90 01 00 00 00 00 00 00 00 00 00 00 [................]
| 0050: 00 00 00 00 00 00 00 00 [........]
| + [BinaryData directory, 56 bytes]
| | FrameRate = 40000
| | - Tag 0x0000 (4 bytes, int32u[1]):
| | 0020: 40 9c 00 00 [@...]
| | MaxDataRate = 625000
| | - Tag 0x0001 (4 bytes, int32u[1]):
| | 0024: 68 89 09 00 [h...]
| | FrameCount = 400
| | - Tag 0x0004 (4 bytes, int32u[1]):
| | 0030: 90 01 00 00 [....]
| | StreamCount = 1
| | - Tag 0x0006 (4 bytes, int32u[1]):
| | 0038: 01 00 00 00 [....]
| | ImageWidth = 400
| | - Tag 0x0008 (4 bytes, int32u[1]):
| | 0040: 90 01 00 00 [....]
| | ImageHeight = 400
| | - Tag 0x0009 (4 bytes, int32u[1]):
| | 0044: 90 01 00 00 [....]
| Stream (SubDirectory) -->
| - Tag 'LIST_strl' (112 bytes):
| 0064: 73 74 72 68 38 00 00 00 76 69 64 73 4d 50 34 32 [strh8...vidsMP42]
| 0074: 00 00 00 00 00 00 00 00 00 00 00 00 e8 03 00 00 [................]
| 0084: a8 61 00 00 00 00 00 00 90 01 00 00 00 00 10 00 [.a..............]
| 0094: ff ff ff ff 00 53 07 00 00 00 00 00 90 01 90 01 [.....S..........]
| 00a4: 73 74 72 66 28 00 00 00 28 00 00 00 90 01 00 00 [strf(...(.......]
| [snip 32 bytes]
| + [Stream directory, 112 bytes]
| | StreamHeader (SubDirectory) -->
| | - Tag 'strh' (56 bytes):
| | 006c: 76 69 64 73 4d 50 34 32 00 00 00 00 00 00 00 00 [vidsMP42........]
| | 007c: 00 00 00 00 e8 03 00 00 a8 61 00 00 00 00 00 00 [.........a......]
| | 008c: 90 01 00 00 00 00 10 00 ff ff ff ff 00 53 07 00 [.............S..]
| | 009c: 00 00 00 00 90 01 90 01 [........]
| | + [BinaryData directory, 56 bytes]
| | | StreamType = vids
| | | - Tag 0x0000 (4 bytes, string[4]):
| | | 006c: 76 69 64 73 [vids]
| | | Codec = MP42
| | | - Tag 0x0001 (4 bytes, string[4]):
| | | 0070: 4d 50 34 32 [MP42]
| | | Quality = 4294967295
| | | - Tag 0x000a (4 bytes, int32u[1]):
| | | 0094: ff ff ff ff [....]
| | | SampleSize = 480000
| | | - Tag 0x000b (4 bytes, int32u[1]):
| | | 0098: 00 53 07 00 [.S..]
| | VideoFormat (SubDirectory) -->
| | - Tag 'strf' (40 bytes):
| | 00ac: 28 00 00 00 90 01 00 00 90 01 00 00 01 00 18 00 [(...............]
| | 00bc: 4d 50 34 32 00 53 07 00 00 00 00 00 00 00 00 00 [MP42.S..........]
| | 00cc: 00 00 00 00 00 00 00 00 [........]
| | + [BinaryData directory, 40 bytes]
| | | ImageWidth = 400
| | | - Tag 0x0004 (4 bytes, int32u[1]):
| | | 00b0: 90 01 00 00 [....]
| | | ImageHeight = 400
| | | - Tag 0x0008 (4 bytes, int32u[1]):
| | | 00b4: 90 01 00 00 [....]
| | | Planes = 1
| | | - Tag 0x000c (2 bytes, int16u[1]):
| | | 00b8: 01 00 [..]
| | | BitDepth = 24
| | | - Tag 0x000e (2 bytes, int16u[1]):
| | | 00ba: 18 00 [..]
| | | Compression = 842289229
| | | - Tag 0x0010 (4 bytes, int32u[1]):
| | | 00bc: 4d 50 34 32 [MP42]
| | | ImageLength = 480000
| | | - Tag 0x0014 (4 bytes, int32u[1]):
| | | 00c0: 00 53 07 00 [.S..]
| | | PixelsPerMeterX = 0
| | | - Tag 0x0018 (4 bytes, int32u[1]):
| | | 00c4: 00 00 00 00 [....]
| | | PixelsPerMeterY = 0
| | | - Tag 0x001c (4 bytes, int32u[1]):
| | | 00c8: 00 00 00 00 [....]
| | | NumColors = 0
| | | - Tag 0x0020 (4 bytes, int32u[1]):
| | | 00cc: 00 00 00 00 [....]
| | | NumImportantColors = 0
| | | - Tag 0x0024 (4 bytes, int32u[1]):
| | | 00d0: 00 00 00 00 [....]
RIFF 'LIST_movi' chunk (9996518 bytes of data):
(end of parsing)
portatil:~ #
ExifTool Version Number : 6.90
File Name : video.mpeg
Directory : .
File Size : 18 MB
File Modification Date/Time : 2007:08:27 23:41:02
File Type : MPEG
MIME Type : video/mpeg
Image Width : 320
Image Height : 240
Aspect Ratio : 1:1
Frame Rate : 24 fps
Video Bitrate : Variable
MPEG Audio Version : 2
Audio Layer : 2
Audio Bitrate : 128000
Sample Rate : 22050
Channel Mode : Single Channel
Mode Extension : Bands 4-31
Copyright Flag : False
Original Media : True
Emphasis : None
Image Size : 320x240
zozo666 escribiste:En el modulo figura esto:Using perl Syntax Highlighting'Bit32-49' => {
Name => 'VideoBitrate',
ValueConv => '$val eq 0x3ffff ? "Variable" : $val * 400',
},
# these tags not very interesting
#'Bit50' => 'MarkerBit',
#'Bit51-60' => 'VBVBufferSize',
#'Bit61' => 'ConstrainedParamFlag',
#'Bit62' => 'IntraQuantMatrixFlag',
);
# composite tags
%Image::ExifTool::MPEG::Composite = (
Duration => {
Groups => { 2 => 'Video' },
Require => {
0 => 'FileSize',
},
Desire => {
1 => 'AudioBitrate',
2 => 'VideoBitrate',
},
# calculate duration as file size divided by total bitrate
# (note: this is only approximate!)
ValueConv => q{
return undef unless $val[1] or $val[2];
return undef if $prt[1] and not $prt[1] =~ /^\d+$/;
return undef if $val[2] and not $val[2] =~ /^\d+$/;
return (8 * $val[0]) / (($prt[1]||0) + ($val[2]||0));
},
PrintConv => q{
my $h = int($val / 3600);
my $m = int($val / 60 - $h * 60);
my $s = $val - $h * 3600 - $m * 60;
return sprintf("%d:%.2d:%05.2f (approx)",$h,$m,$s);
},
},
);Coloreado en 0.003 segundos, usando GeSHi 1.0.8.4
Ahi algo que no me muestre "duration"???
Voy a trabajar con este modulo, pero quiero estar seguro de que funcione con mpeg.
Con los demas archivos usa las siguientes instrucciones:
3gp -----"duration"
mpg------"duration"
avi------"duration"
mov-----"duration"
asf------"playduration"
wmv-----"PlayDuration"
mpeg-----NO TIENEE
Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 46 invitados