|
From: | Rik |
Subject: | [Octave-bug-tracker] [bug #60888] Extend audioread() to read files where header does not specify number of samples |
Date: | Wed, 7 Jul 2021 15:26:50 -0400 (EDT) |
User-agent: | Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36 |
Update of bug #60888 (project octave): Severity: 3 - Normal => 1 - Wish Priority: 5 - Normal => 3 - Low Item Group: Unexpected Error or Warning => Feature Request Release: 5.2.0 => dev Summary: Cannot read a FLAC from ffmpeg that sox and VLC can => Extend audioread() to read files where header does not specify number of samples _______________________________________________________ Follow-up Comment #3: I checked in a changeset that improves this somewhat: http://hg.savannah.gnu.org/hgweb/octave/rev/6dc298d3261c. If the header does not specify the number of samples then audioinfo() now returns -1 for the TotalSamples and Duration fields to indicate that the results are not accurate. The function audioread() now emits a more specific error message "audioread: malformed header does not specify number of samples" when this situation is encountered. The reason why Octave has a problem with the test file is just as you suspected: the code works by creating an array of the proper size (TotalSamples X #_of_Channels) and then filling it in. I put a FIXME note in the code that it would be nice to fix this by using an expandable C++ data container and reading the file into memory in chunks. I've changed this issue report to be a Feature Request for the behavior above. In the meantime, there are easy workarounds such as using sox to read the file and write a complete header. For example, this works sox fftest.flac good.flac Because there are easy workarounds I've lovered the Priority. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?60888> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |