-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unsupported WAV format #2
Comments
Haha, sorry, you got unlucky there! It's not The resampling tool uses 32-bit floats internally (it's targeted at embedded, real time applications) and I decided to only support formats that are losslessly converted to/from 32-bit floats. That includes everything reasonably common, but does exclude 32-bit integers and 64-bit anything. Those are uncommon (at least outside of SoX output, it seems) and not very useful (at least in my opinion). But more importantly, any advantage of those formats would be lost after converting with ART (because of the internal representation) so that's where the decision comes from. I suggest using another tool if those formats are important to you. Like maybe SoX... 😄 |
Hmmm. $ mediainfo song.flac
Format : FLAC
Format/Info : Free Lossless Audio Codec
Duration : 5 min 12 s
Bit rate mode : Variable
Bit rate : 1 684 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Bit depth : 24 bits
Compression mode : Lossless
Stream size : 62.7 MiB (100%)
Writing library : libFLAC 1.4.3 (2023-06-23)
$ flac -d song.flac
$ mediainfo song.wav
Format settings : WaveFormatExtensible
Format : PCM
Format settings : Little / Signed
Codec ID : 00000001-0000-0010-8000-00AA00389B71
Duration : 5 min 12 s
Bit rate mode : Constant
Bit rate : 2 304 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Bit depth : 24 bits
Stream size : 85.8 MiB (100%)
$ art -4 -r44100 -o16 song.wav song.resampled.wav
^
(digression: intuitively,
b is for bits, o is for output file,
but here b is for Blackman-Harris,
which is used by default anyway)
$ mediainfo song.resampled.wav
Format settings : WaveFormatExtensible
Format : PCM
Format settings : Little / Signed
Codec ID : 00000001-0000-0010-8000-00AA00389B71
Duration : 5 min 12 s
Bit rate mode : Constant
Bit rate : 1 411.2 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 44.1 kHz
Bit depth : 16 bits
Stream size : 52.6 MiB (100%) Dear @dbry, why the output is $ hmp3 song.resampled.wav -V150 -HF2 -U2
hmp3 MPEG Layer III audio encoder 5.2.1, 2022-12-19
<press any key to stop encoder>
PCM input file: song.resampled.wav
MPEG ouput file: song.resampled.mp3
pcm file: channels = 2 bits = 16, rate = 44100 type = 1
UNSUPPORTED PCM FILE TYPE There is a dirty workaround: we can force FLAC to decompress 48 kHz 24 bit into |
- specifically if channels > 2 or non-canonical channel-mask - also fix rare case of WAV data padding zero byte required
The McGill document does say that 24-bit WAV files should be My preference has always been to write the simplest header possible (without ambiguities) to prevent the problem you're running into with Helix and lots of other software (my Cool Edit 2000 won't read or write Pushed commit fixing this and also something I just found where I wasn't padding odd-size data chunks (24-bit mono with an odd number of samples). One thing I should add is that ART is really intended as a demo / test harness for the sample-rate converter. It's not really intended to be a general purpose sample-rate converter tool, and as such there are plenty of things missing (e.g., copying other RIFF chunks or tags, handling RF64 or BW64 files, etc). That said, if you find any other bugs please let me know. Thanks! |
Windows 7 x64, ART 0.2, SoX 14.4.2
Maybe
WaveFormatExtensible
confuses ART?Maybe
float
will do?Hmmm. Float becomes 64-bit by default, let's trying lowering that to 32-bit.
At last!
Dear @dbry, why didn't ART accept the initial file? I created it using various online tutorials. And to create one that would work, I had to sweat.
The text was updated successfully, but these errors were encountered: