[Ffmpeg-devel] Patch to add header info to flv format

Adam McCann adam.mccann
Sat Aug 5 23:16:55 CEST 2006


Chris Dolan wrote:
> On Aug 5, 2006, at 2:28 PM, Adam McCann wrote:
>
>> Thanks Chris, however they won't be using that either, only being 2 
>> weeks old :)
>
> I understand that point for youtube, etc.  Most of them probably use 
> commercial tools.  For example, I sometimes see this tag in some 
> commercial FLVs:
>    'metadatacreator' => 'Manitu Group FLV MetaData Injector 2',
> However, not from YouTube.  All of the FLV files that I have ever 
> captured from YouTube lack metadata tags, and they instead pass the 
> video duration in on the URL query string.  FLVs from video.google.com 
> have somewhat odd metadata tags (including 'onTransition' events) that 
> I suspect comes from a custom engine.
>
> I was simply offering an alternative for you that is indeed open 
> source and unix-friendly.  Obviously, direct support for metadata via 
> ffmpeg/mplayer would be simpler, but if you want a solution that is 
> either usable or hackable *today*, mine is pretty powerful and has 
> richer metadata than ffmpeg SVN (except for file size, which mine lacks).
>
>> It seems to look good, but what I actually need is to add the 
>> duration, as well as the keyframe data needed to seek the file.  
>> There are a couple of tools about, one I've heard a lot about is 
>> FLVTool2, however this apparently hogs your system from several 
>> minutes to hours for files of any reasonable size.
>
> Mine does duration already, and I just coded up support for keyframe 
> times 5 minutes ago.  :-)  The major limitation of my metadata is the 
> lack of byte offsets.  That's doable, I just lack round tuits.
>
> I've read the code of flvtool2 extensively, and I can assure you that 
> it is pretty efficient.  From my understanding of that code it appears 
> it should take seconds, not minutes or hours, to generate metadata for 
> real world FLVs.  My library is conceptually quite similar to flvtool2 
> (and in fact I credit them in my library's documentation for help in 
> deciphering the metadata de-facto standard).  My library takes roughly 
> one second per 3 minutes of source FLV to generate metadata.
>
> Here's an example of the metadata that my library emits for a very 
> short MX FLV test movie:
>
>         {
>           'width' => '320',
>           'videocodecid' => '2',
>           'videodatarate' => '280',
>           'audiocodecid' => '2',
>           'metadatacreator' => 'FLV::File v0.12',
>           'keyframes' => {
>              'times' => [
>                    '0',
>                    '3',
>                    '6',
>                    '7.4'
>                  ]
>            },
>           'metadatadate' => 'Sat Aug  5 20:24:16 2006',
>           'duration' => '7.4',
>           'videosize' => '171210',
>           'height' => '240',
>           'audiodelay' => '0',
>           'creationdate' => 'Sat Aug  5 20:24:16 2006',
>           'framerate' => '20',
>           'lasttimestamp' => '7.4',
>           'canSeekToEnd' => '1',
>           'audiosize' => '119118',
>           'audiodatarate' => '128'
>         }
>
> And for a VP6 (Flash 8) encoding of the same source:
>
>        {
>          'width' => '320',
>          'videocodecid' => '4',
>          'videodatarate' => '280',
>          'audiocodecid' => '2',
>          'metadatacreator' => 'FLV::File v0.12',
>          'keyframes' => {
>                'times' => [
>                  '0',
>                  '2.4',
>                  '2.85',
>                  '5.85',
>                  '7.4'
>                ]
>              },
>          'metadatadate' => 'Sat Aug  5 20:54:50 2006',
>          'duration' => '7.4',
>          'videosize' => '218664',
>          'height' => '240',
>          'audiodelay' => '0',
>          'creationdate' => 'Sat Aug  5 20:54:50 2006',
>          'framerate' => '20',
>          'lasttimestamp' => '7.4',
>          'canSeekToEnd' => '1',
>          'audiosize' => '119118',
>          'audiodatarate' => '128'
>        }
>
> Chris
>
> -- 
> Chris Dolan, Software Developer, http://www.chrisdolan.net/
> Public key: http://www.chrisdolan.net/public.key
> vCard: http://www.chrisdolan.net/ChrisDolan.vcf
>
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel

Thanks Chris, some really great info there.  This module looks 
fantastic, and whilst waiting for the mencoder/ffmpeg bugs to be fixed 
(should it be a bug and not my configuration), I'll be testing it out 
along with FLVTool2 (which, at first glance, appears to be working).

Cheers,
Adam


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.7/409 - Release Date: 04/08/2006






More information about the ffmpeg-devel mailing list