Project

General

Profile

Feature #1075

Ogg FLAC stream support

Added by Anonymous about 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Minor
Assignee:
-
Category:
plugins/flac
Target version:
Start date:
February 28, 2021
Due date:
% Done:

100%

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 3 years ago

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

#2 Updated by Anonymous about 3 years 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 about 3 years 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 Anonymous about 3 years 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 3 years ago

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

Jim

#7 Updated by John Lindgren about 3 years 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

#8 Updated by Anonymous about 3 years ago

Do you maintain the SNAP? I installed it from SNAP, but it isn't listed on snapcraft.io
And apt has version 4.0.4-1 - from June 2020 - by
Is this repo yours, @Jim ? ppa:ubuntuhandbook1/apps

#9 Updated by Jim Turner about 3 years 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!

Regards,

Jim

#10 Updated by John Lindgren about 2 years ago

  • Target version set to 4.2

Also available in: Atom PDF