Click here to get back home

Multimedia file stats in Perl?

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Multimedia file stats in Perl? Ilya Zakharevich 11-06-2006
Posted by John Bokma on November 8, 2006, 11:11 am
Please log in for more thread options



> Each day the MP3::Tag module I maintain *looks* more and more like a
> module to deal with arbitrary multimedia types... At least a lot of
> APIs make sense for many other multimedia types; and the scripts
> supplied with the module work mostly via these API.
>
> But to actually address this similarity, I need (as a minimum) a way
> to inspect a multimedia file, and get some stats about it.
>
> The stats which come to my mind are
>
> a) does it contain audio, video, stills, slideshows (or combinations
> thereof)?
>
> b) What is the duration, number of frames, framerate, size of (the
> first?) image frame?
>
> c) which module to use to get the embedded metadata?
>
> d) what is the imbedded metadata?
>
> Are there ready-to-use Perl solutions to these problems?
>
> Thanks,
> Ilya
>
> P.S. The other (meta)questions is: which questions does it make sense
> to ask about a given multimedia file if you do not care what is
> the "format" of the file. This metaquestion should definitely
> have been addressed by any multimedia architecture which
> delegates the actual work to installable multimedia codecs.
>
> Anyone knowing about this?

For stills, look into EXIF, things I want to know are: which device was
used, settings, copyright information, title, author, date, time, etc.

Probably you want to normalize field names, and create a wrapper that is
able to offer meta data in raw format, and normalized.

$meta_info->get_field_names();
$meta_info->get_field_names_raw();
$meta_info->get_value_for( 'title' );
$meta_info->get_value_for_raw( 'title' );

Something like the above :-)

--
John Experienced Perl programmer: http://castleamber.com/

Perl help, tutorials, and examples: http://johnbokma.com/perl/

Similar ThreadsPosted
How to include a connection file in perl December 2, 2006, 3:11 pm
I want an perl module for conver large html page file to multi little pages November 14, 2004, 3:02 am
install HTML::Template - Problem reading cache file / Bad file number July 24, 2004, 7:55 pm
Reading contents of an excel file from a test file May 15, 2007, 2:49 am
A do-file location: how the code inside that do-file find it? January 20, 2008, 12:32 am
DBD:mysql doesn't read mysql option file /etc/my.cnf file January 27, 2005, 11:19 pm
Win32::File August 29, 2004, 9:08 pm
SGI::FAM and File::PathConvert June 14, 2005, 10:58 am
file upload January 5, 2006, 7:00 am
How to read an IFO file ? February 25, 2006, 3:12 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap