Ogg FLAC stream support
Hi, I got version 4.0.4 on Ubuntu 20.10 installed from snap.
The player is really nice, but won't play FLAC streams, like this one
Plays fine in VLC e.g. and other players.
Error reading metadata
Thats very common when streaming FLAC
The FLAC-to-Ogg mapping page has a fairly thorough explanation of why it's desirable to use Ogg encapsulation in many cases instead of streaming native FLAC:
The original FLAC format includes a very thin transport system ... known as 'native FLAC'. ... It is very lightweight and does not support more elaborate transport mechanisms such as multiple logical streams, ...
The native FLAC transport is not a transport "layer" in the way of standard codec design because it cannot be entirely separated from the payload. ...
This presents a problem when trying to encapsulate FLAC in other true transport layers ...
The alternative is to treat native FLAC frames as Ogg packets and accept the transport redundancy. It turns out that this is not much of a penalty; ... The redundancy amounts to a fraction of a percent.
Here's some more streams, playing everywhere else, even in browsers.
#4 Updated by Jim Turner 7 months ago
I took a stab at this, since you're correct - Audacious can't play these with either the Vorbis or Flac plugins, but if you disable both of these (YUCK), the ffaudio plugin will pick 'em up & play 'em with no tag metadata. Researching showed that the flac plugin uses libflac, which claims to support this format, along as it's compiled to do so (but requires some different function names), but that this is the default and, at least on Debian it seems to be (is in Buster+, at least for me)!
Anyway, I whipped up a PATCH that seems to play all 5 of your example stations, without breaking my current .ogg files or the one .flac file I have to test with it! It is also able to extract some tag data for 3 of the 5 stations (the ones that embed ICY metadata, but somehow VLC does for all of 'em, though, which is proplexing since tags appear to only be supported as "Vorbis comments", and none were found in the streams). The patch checks whether libflac was compiled with the needed feature (as they reccomend).
If you can build Audacious with this patch, try it out on some more such streams, along with any standard FLAC and OGG/Vorbis files you have. If so, I can submit this as a pull request to Audacious.
@John, et. al: Please review and make sure everything looks correct and that I didn't leave anything out, do anything stupid, etc. I'm not sure why the song titles don't changes as the stations change songs (ICY), as I have it working in "fauxd", but it doesn't seem to get updated in tuple.cc.Tuple::fetch_stream_info(), which I did not change in the patch, but is very different in fauxd.
Great! Regarding the metadata: Some stations are sending the actual title, others only station name and genre. The title is assigned to the "Now Playing" field in VLC. The "Title" field holds the station name and doesn't change. Thats different with other stations, e.g. SOMA FM (AAC - no FLAC - https://somafm.com/secretagent130.pls) has the station name in the "Artist" field, the title in the "Title" field and the URL in the "Album" field.
#7 Updated by John Lindgren 6 months ago
- % Done changed from 0 to 100
- Status changed from New to Closed
- Category set to plugins/flac
- Subject changed from FLAC stream error to Ogg FLAC stream support
- Tracker changed from Support to Feature
Thanks Jim! I cleaned up the patch a bit and pushed it to master:
#9 Updated by Jim Turner 6 months ago
@Joe - Nope. But if you rebuilt w/my patch, I'd recommend rebuilding again w/John's as it's pbly better, but I haven't had a chance to take it out for a spin yet though! ;-)
Oh and thanks for your examples pointing me to radioparadise.com - they have some great commercial-free streaming stations. BTW - They also have non-FLAC (standard mp3 and aac) versions of all their streams - See: https://radioparadise.com/listen/stream-links!