Chris Dolan
and 1 contributors


FLV::Cut - Extract FLV segments into new files


See FLV::Info


   use FLV::Cut;
   my $converter = FLV::Cut->new();
   $converter->add_output('first_ten_sec.flv', undef, 10_000);
   $converter->add_output('middle_ten_sec.flv', 20_000, 30_000);
   $converter->add_output('tail.flv', 40_000, undef);


Efficiently extracts segments of an FLV into separate files.

WARNING: this tool does not help you find keyframes! If you pick a cut time that is not on a keyframe, you will see unpleasant video artifacts in the resulting media. For many input FLVs, you can use the following to find the keyframe times:

   my $flv = FLV::File->new;
   $flv->populate_meta; # optional
   my @times = @{ $flv->get_meta('keyframe')->{times} };



Instantiate a converter.

$self->add_output($flv_filename, $in_milliseconds, $out_milliseconds)

Register an output file for a particular time slice. Either the in or out times can be undefined to imply the beginning or end of the FLV, respectively. You can set both to undef, but that's pretty pointless... If the in or out times are not represented in the input FLV, that's OK -- you may just end up with less data than you expected in the output files.


Open and parse the specified FLV file. Alternatively, you may pass an instantiated and parsed FLV::File object.


Serialize all of the extracted FLVs to file.


See FLV::Info