Project

General

Profile

Support #1075

FLAC stream error

Added by Joe Smith about 1 month ago. Updated about 2 hours ago.

Status:
New
Priority:
Minor
Assignee:
-
Category:
-
Start date:
February 28, 2021
Due date:
% Done:

0%

Estimated time:
Affects version:

Description

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
http://stream.radioparadise.com/mellow-flacm

Plays fine in VLC e.g. and other players.

Error is:
Error reading metadata

feature1075.diff (5.49 KB) feature1075.diff Jim Turner, April 03, 2021 15:50

History

#1 Updated by Michael Schwendt about 1 month ago

Actually, the server says it is an "application/ogg" stream, since it uses an Ogg container for FLAC data.

#2 Updated by Joe Smith about 1 month ago

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.
http://rondo.iradio.fi:8000/klasupro.flac
http://sectorradio.com/progressive-flac
http://stream.radioparadise.com/world-etc-flacm
http://icecast3.streamserver24.com:18800/motherearth

#4 Updated by Jim Turner 9 days 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.

Regards,

Jim

#5 Updated by Joe Smith 9 days ago

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.

#6 Updated by Jim Turner about 2 hours ago

@Joe - Did you get a chance to build & thoroughly test it & did it work for you?

Jim

Also available in: Atom PDF