https://bugzilla.wikimedia.org/show_bug.cgi?id=60554

       Web browser: ---
            Bug ID: 60554
           Summary: PEAR File_Ogg reports ogg/flac having 0 second length
                    if
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
               URL: https://commons.wikimedia.org/wiki/File:Tim_Berners-Le
                    e_-_Today_(flac_-sample_s16_-f_ogg).oga
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: TimedMediaHandler
          Assignee: md...@wikimedia.org
          Reporter: bawolff...@gmail.com
                CC: aarcos.w...@gmail.com, bawolff...@gmail.com,
                    fflo...@wikimedia.org, gti...@wikimedia.org,
                    jger...@wikimedia.org, mtrac...@member.fsf.org
    Classification: Unclassified
   Mobile Platform: ---

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to