Closed Bug 646331 Opened 14 years ago Closed 6 years ago

Duration of media files stored in content/media/manifest.js is inaccurate

Categories

(Core :: Audio/Video: Playback, defect)

defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: cpearce, Unassigned)

Details

(Whiteboard: [leave open after merge] )

Attachments

(2 files)

We store the duration of many files in content/media/manifest.js, and compare these with the durations which we actually calculated from files. We consider them correct if they're within 100ms (checkMetadata() in manifest.js does this test), but we can be more accurate. We should figure out the actual duration of all files, and reduce the error margin. Use a combination of OggIndex, ogginfo, oggz-info to find the duration.
Summary: Duration of stored in content/media/manifest.js is inaccurate → Duration of media files stored in content/media/manifest.js is inaccurate
Attachment #598982 - Flags: review?(cpearce) → review+
Note we still need to verify/fix the durations of the other media; some of the Oggs at least are still wrong. So don't close this bug when merging Roc's patch to central please.
Whiteboard: [leave open after merge]
Attachment #648185 - Flags: review?(cpearce) → review+
What'd you use to compute the duration? ogginfo gives 0.233s for 320x240.ogv. It'd be good to standardize on a tool if that's wrong.
OggIndex gives 0.266 for that file, and Firefox agrees with that. I'm not sure which of ogginfo or OggIndex is correct here, but since I wrote OggIndex I'm biased towards favouring it! ;)
I think ogginfo is wrong. When I play the video through our code, currentTime is 0.266, and that matches the number of samples we've produced. Chrome agrees.
Opera says it's 7s, but I think we can safely discard that result as an error :-)
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #8) > I think ogginfo is wrong. When I play the video through our code, > currentTime is 0.266, and that matches the number of samples we've produced. > Chrome agrees. ogginfo is wrong. There's 8 frames, but this is an old 3.2.0 bitstream, which started counting the granule position at 0 instead of 1. However, nothing in the ogginfo code corrects for this difference, so it assumes there are only 7 frames. The exact duration is 8000000/30000299, or 0.266664..., seconds. I'll fix ogginfo.
Component: Audio/Video → Audio/Video: Playback
Mass closing do to inactivity. Feel free to re-open if still needed.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: