Missing keyframes causing video to play sped up.

7 views
Skip to first unread message

Chris

unread,
Feb 22, 2008, 1:51:52 PM2/22/08
to FLVmeta Discussion
Hi all,

I've encoded some videos using mencoder and then tagged with flvtool2

Saw some weirdness when the duration was listed as 24 seconds when the
video was 59 seconds long.

Figured maybe it was a flvtool2 bug so I decided to switch to flvmeta.

Now I tag the FLV with flvmeta and here is a partial of the flvdump:

root@torque:/mnt/videos/# /opt/video/bin/flvdump longMovie_007.flv |
head -100
Magic: FLV
Version: 1
Has audio: yes
Has video: yes
Offset: 9
--- Tag #1 at 0xD (13) ---
Tag type: Meta
Body length: 882
Timestamp: 0
* Metadata event name: onMetaData
* Metadata contents: {
hasMetadata => true
hasVideo => true
hasAudio => true
duration => 59.951000
lasttimestamp => 59.925000
lastkeyframetimestamp => 22.200000
width => 456.000000
height => 342.000000
videodatarate => 191.041564
framerate => 10.008173
audiodatarate => 29.846640
audiosamplerate => 22000.000000
audiosamplesize => 16.000000
stereo => false
filesize => 1742304.000000
videosize => 1473201.000000
audiosize => 256575.000000
datasize => 1730696.000000
metadatacreator => flvmeta 1.0.4
metadatadate => Fri, 22 Feb 2008 12:10:46 +0000
audiocodecid => 2.000000
videocodecid => 2.000000
audiodelay => 0.000000
canSeekToEnd => false
hasCuePoints => false
cuePoints => [
]
hasKeyframes => true
keyframes => {
times: [
0.000000
2.000000
4.000000
6.000000
8.000000
8.520000
9.520000
9.680000
10.200000
12.200000
14.200000
16.200000
18.200000
20.200000
22.200000
]
filepositions: [
1030.000000
170020.000000
297914.000000
430581.000000
549969.000000
589497.000000
666946.000000
681649.000000
730375.000000
834746.000000
974013.000000
1121966.000000
1252998.000000
1409931.000000
1524782.000000
]
}
}

flvmeta gets the duration right, but in the flv player the video still
finishes in around 24 seconds.
Now pretty sure this is due to the keyframe times.

My question to the group... Is this a problem with the tagging tool
as the last keyframe is tagged at 22seconds or is this a mencoder
issue? I'm not that wise in the ways of flv meta data so assistance
would be appreciated.

Thanks

Chris

Marc Noirot

unread,
Feb 23, 2008, 8:35:05 AM2/23/08
to flvmeta...@googlegroups.com
Hello,
It seems to me that the FLV file output by mencoder might be somewhat
invalid, since flvmeta is unable to detect keyframes after 22 seconds.

Please note that the metadata, especially the keyframes, are not
necessary to play the FLV file, but mostly to enable random access
seeking in the video.

Could you please provide the exact mencoder command line used to encode
your file, and the full gzipped output of flvdump on the flv file,
_before_ using flvtool2 or flvmeta ?

Regards,
Marc

Reply all
Reply to author
Forward
0 new messages