PEAR File_Ogg reports ogg/flac having 0 second length if total sample count field missing
Open, NormalPublic

Description

Ogg/flac files are allowed to have the total sample count field set to unknown (aka 0). When this happens, File_Ogg (and by extension TMH) reports the flac file has a length of 0 seconds, which is wrong.

I think what needs to happen in these situations is to take the approx_granule_pos and divide by sample_rate.


To quote ogg/flac spec:

"Redundant fields in the STREAMINFO packet may be set to zero (indicating "unknown" in native FLAC), which also facilitates single-pass encoding. These fields are: the minimum and maximum frame sizes, the total samples count, and the MD5 signature. "Unknown" values for these fields will not prevent a compliant native FLAC or Ogg FLAC decoder from decoding the stream."

Example file: https://commons.wikimedia.org/wiki/File:Tim_Berners-Lee_-_Today_(flac_-sample_s16_-f_ogg).oga

See also: https://commons.wikimedia.org/w/index.php?title=Commons:Village_pump&oldid=115012285#FLAC_on_Apple_devices


Version: unspecified
Severity: normal
URL: https://upload.wikimedia.org/wikipedia/commons/archive/1/16/20140124185340%21Tim_Berners-Lee_-_Today_%28flac_-sample_s16_-f_ogg%29.oga

Details

Reference
bz60554
bzimport raised the priority of this task from to Needs Triage.
bzimport set Reference to bz60554.
Bawolff created this task.Jan 29 2014, 1:18 AM
Gilles triaged this task as Normal priority.Nov 24 2014, 2:55 PM
Gilles added a subscriber: Gilles.
Jdforrester-WMF moved this task from Untriaged to Backlog on the Multimedia board.Sep 4 2015, 6:37 PM
Restricted Application added subscribers: Matanya, Aklapper. · View Herald TranscriptSep 4 2015, 6:37 PM