[Red5devs] FLV metadata strikes back
mabrek
mabrek at gmail.com
Fri Aug 15 08:42:16 PDT 2008
Metadata is different when playing file from position 0 (onMetadata tag from
file being sent) and when playing from position >0 (FLVReader.createFileMeta
generates another onMetadata tag).
Duration calculation code relies on tag timestamps, so generated duration
equals to the last found timestamp. But it is not correct in all cases
because real duration may be longer or shorter. Compare duration and
timestamp of the last tag in output of
flvtool2 -PD webapps/oflaDemo/streams/city_of_ember.flv
Metadata tag can have different data size (check it for city_of_ember.flv
and for some recorded by red5 stream). The code in FLVWriter.close rewrites
metadata tag without regard to length of existing tag. It causes file
corruption.
So I record stream to file, run flvtool -U on it, than append it from red5,
and file gets corrupted.
I tried to fix this issue, but found that FLVReader creation from
FLVWriter.close just to get size of metadata tag has large overhead in
reading full file by analizeKeyframes from FLVReader.postInitialize.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5devs_osflash.org/attachments/20080815/7cf19433/attachment.html
More information about the Red5devs
mailing list