flvlib is a Python library for manipulating FLV files.
The library comes with a script that can identify the content of the file, including the codecs used to encode its content, the audio rate, keyframe density, etc. It also prints out the file's metadata if present.
Another script included in the library can be used to index FLV files, that is to update the file's metadata with information about seekpoints. Most Flash players can use it to enable seeking without having to transfer the full file.
C:\> debug-flv MyFile.flv === `MyFile.flv' === #00001 <AudioTag at offset 0x0000000D, time 0, size 162, MP3> #00002 <AudioTag at offset 0x000000BE, time 0, size 105, MP3> #00003 <VideoTag at offset 0x00000136, time 0, size 33903, VP6 (keyframe)> #00004 <AudioTag at offset 0x000085B4, time 26, size 105, MP3> (...)
C:\> index-flv -U MyFile.flv
C:\> debug-flv --metadata MyFile.flv
=== `MyFile.flv' ===
#00001 <ScriptTag onMetaData at offset 0x0000000D, time 0, size 259>
{'duration': 9.979000000000001,
'keyframes': {'filepositions': [407.0,
605.0],
'times': [0.0,
1.5]},
'metadatacreator': 'flvlib 0.x.x'}
flvlib is released under the MIT License. You can freely use it in your programs
Discussion