Author image Chris Dolan
and 1 contributors


FLV::Info - Extract metadata from Macromedia Flash Video files


    use FLV::Info;
    my $reader = FLV::Info->new();
    my %info = $reader->get_info();
    print "$info{video_count} video frames\n";
    print $reader->report();


This module reads Macromedia Flash Video (FLV) files and reports metadata about those files.


This work is based primarily on the file specification provided by Macromedia. Use of that specification is governed by terms indicated at the licensing URL specified below.


Copyright 2006 Clotho Advanced Media, Inc., <>

Copyright 2007 Chris Dolan, <>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


We care about code quality. The FLV-Info distribution complies with the following quality metrics:

  • Perl::Critic v0.21 passes

  • Devel::Cover test coverage almost 90%

  • Pod::Coverage at 100%

  • Test::Spelling passes

  • Test::Portability::Files passes

  • Test::Kwalitee passes



Creates a new instance.


Reads the specified file. If the file does not exist or is an invalid FLV stream, an exception will be thrown via croak().

There is no return value.


Returns a hash with all FLV metadata. Any fields that are multivalued are concatenated with a slash (/) with the most common values specified first. For example, a common case is the video_type which is often interframe/keyframe since interframes are more common than keyframes. A less common case could be audio_type of mono/stereo if the FLV was mostly one-channel but had some packets of two-channel audio.


Returns a summary of all FLV metadata as a string. This is a human-readable version of the data returned by get_info().


Returns the FLV::File instance. This will be undef until you call parse().



This is a rather nice Ruby implementation that can read and write FLV files. This code helped me figure out that the FLV documentation was wrong for the order of attributes in video tags. It also helped me understand the meta tags.


This is a Perl implementation of the project to create an open source representation of the Flash remote communication protocol. This module leverages a small part of AMF::Perl to parse FLV meta tags.


FFmpeg is a powerful media conversion utility. It is capable of reading and writing FLVs and SWFs. However as of this writing, I believe it does not support fast transcoding between FLV and SWF formats.


This module should work with FLV v1.0 and FLV v1.1 files. Any other versions (none known as of this writing) will certainly fail.

Interaction with FLVs using the screen video codec or using alpha channels is not yet tested. If someone has short videos employing those features that can be released with the FLV::Info test suite, please contact me.


Chris Dolan

This module was originally developed by me at Clotho Advanced Media Inc. as part of our MediaLandscape project. Now I maintain it in my spare time. I do not anticipate adding new features.