Page MenuHomePhabricator

Length of mpg video on Commons has wildly inaccurate size report
Open, LowPublic

Description

Hi. Looking at https://commons.wikimedia.org/wiki/File:El_Presto_vs_Fabiola_Ya%C3%B1ez.mpg , the length is reported at "0.4 s" as a part of "MPEG audio/video file, MPEG-2, length 0.4 s, 406 × 720 pixels, 104.45 Mbps overall, file size: 37.55 MB", when the actual video is 4m7s or 247s long (some 600x longer). This may also affect the transcode bitrate reports.

Event Timeline

We've seen this before. I think the duration calculator in GetID3, which does the file parsing, isn't too smart.
Will require someone to debug the upstream software.

This file throws:

Warning: Trying to access array offset on null in /Users/djhartman/Development/wikimedia/getID3/getid3/module.audio-video.mpeg.php on line 508
PHP Warning: Trying to access array offset on null in /Users/djhartman/Development/wikimedia/getID3/getid3/module.audio-video.mpeg.php on line 508

Last GOP == 516, but there is no gop data value collected for key 516 in $info['mpeg']['group_of_pictures'] (but the key exists).

This is because of the GOP reader. The GOP counter is increased unconditionally, but there is an if condition that only conditionally writes the array associated with the key. This makes the gop counter inconsistent with the gop array index , which breaks reading back the time code later on.

TheDJ moved this task from Backlog to Reported Upstream on the Upstream board.
TheDJ added a subscriber: bvibber.

@bvibber I believe we run our own version of getID3 ? If so we can update.

Also asking the user which software was used to make this clip, that might be helpful for any other clips generated with a similar path.

https://github.com/wikimedia/getID3/pull/2 should make 1 mergeable :D i undid my local version of an older fix