Closed andimik closed 1 year ago
Seems that although it has the extension, this file is not in the s16 format (raw 16-bit signed integer PCM), instead it is a 24-bit WAV file.
$ file radiostetin.wav.s16
radiostetin.wav.s16: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 24 bit, mono 192000 Hz
Some WAV files can works as raw PCM as the 16-bit aligned RIFF headers gets interpreted as a burst of noise, and they even can be piped to redsea as such, but the 24-bit sample width becomes a problem here.
Raw PCM normally looks like this (unless by coníncidence the noise starts looking like a file header):
$ file gen-yksi-171k.s16
gen-yksi-171k.s16: data
Edit - I've been kind of wanting to remove the default functionality of decoding stdin with no arguments given and add --input raw
instead - it's sort of a surprising functionality. But alas, it could be used by many people at this point...
I have renamed it as I thought it might work then. The original extension of the file was .wav
You can convert any audio file (well, almost) into the S16LE format with sox: sox radiostetin.wav radiostetin.s16
(this format has no headers for metadata, so make sure of the correct number of channels and sample rate).
Edit: Or it can be directly piped to redsea with sox audiofile.wav -t .s16 -r 171k - | redsea
For now, I'm not planning to add WAV input via stdin, but if such a need arises this can very well be reopened.
-f
seemes to convert 24bit into 16bit as well. So it's worth mentioning it in the wiki as well.
Good idea! For the wiki change, note that it’s converted direct to float32 (this also happens to the raw 16-bit input)
Sent from mobile
https://github.com/windytan/redsea/blob/67c76f5d23454a26c1063495f123b98475305809/src/redsea.cc#L33
This hint seems not to work, I get no RDS data.
The only way is the parameter
-f [FILE]
.radiostetin.wav.zip (just a sample file, taken from a friend)