Listening / Getting the Streamdump
Thanks to mpv, youtube-dl, and ffmpeg, listening to the /rh.x16 stream is actually possible on Linux, and I'm pretty sure on Windows, too. However, it seems the toolchain is kinda struggling as it is.
Simply playing the stream directly with mpv, is quite low on errors:
$ mpv http://stream.radioh.no:443/rh.16yields the following error right at the start:
[ffmpeg/audio] aac: channel element 2.15 is not allocatedhowever right after that, the stream starts playing quite nicely.
Error decoding audio.
With the help of youtube-dl, I managed to download a sample length of the stream.
Inspecting it with ffmpeg yields this:
[aac @ 0x59159c0] Estimating duration from bitrate, this may be inaccurateNote the "16 kb/s". The Duration is out by around 20 seconds, in that ~10min sample. The file is 1189420 (1.2M) bytes in length, and is a pure AAC dump.
Input #0, aac, from 'rh-rh.16.part':
Duration: 00:09:45.52, bitrate: 16 kb/s
Stream #0:0: Audio: aac (HE-AACv2), 32000 Hz, stereo, fltp, 16 kb/s
I can play the file back using mpv, but ffmpeg complains about "Reserved SBR extensions is not implemented", which seems to be kindof a minor thing (?), as the file plays alright.
When playing this file with "--msg-level=all=v", playing the stream directly with the switch using mpv, or inspecting the file with ffmpeg, it never mentions "xHE-AAC". Instead, the AAC stream is identified as HE-AACv2.
My youtube-dl version is: "2018.01.21" (probably not the latest one).
I tried two versions of ffmpeg, "3.3.7" and "N-45774-g223f3dff8-static https://johnvansickle.com/ffmpeg/" compiled just a couple days ago.
mpv version is: "0.27.2".
I'm using Fedora 27.
Since no log output of any of the tools I've used reports anything about "xHE-AAC" or "USAC", I'm not sure whether the USAC component is simply ignored. FFmpeg reports "HE-AACv2" with 16 kb/s, and that's pretty much it. Since all tools here use ffmpeg as back-end, I guess this isn't a surprise.
Having said that, the stream sounds "OK", given the low bitrate. However any sounds resembling noise, like someone making an 's', 'f', 'sh', or 'z' sound etc., sound all alike, and incredibly harsh. Similar to a cassette tape recorded with DC bias. Another analogy is perhaps very small speakers, like the ones you'd find on a cheap cellphone or an old 80's pocket radio. I imagine playing that stream through the speakers of a cellphone or cheap bluetooth speakers would be adequate; I wouldn't want to listen to it in my car, though. FM radio sounds much cleaner than this.
If anyone cares, I can upload a sample, together with one or two samples of one of their higher-quality streams for comparison.
Given that I don't know whether my tools are decoding the stream correctly, I'm unsure whether the (subjectively) bad sound quality is down to xHE-AAC simply being used with such a low bitrate, or if it's down to my tools not being able to decode the stream correctly.
Still haven't figured out a way, to create my own sample of xHE-AAC encoded audio. AFAIK, there are no encoders freely available, etc.