Bugzilla – Bug 12893
Support OggFLAC
Last modified: 2012-03-29 00:22:33 UTC
Should be fairly trivial to support OggFLAC, at least 1 radio stream uses this: http://forums.slimdevices.com/showthread.php?t=65553 Would need to add libogg and build libFLAC with Ogg support, then make a few changes to SC to detect these files/streams and use the FLAC decoder, and have the FLAC decoder call a few Ogg-specific API methods.
One other radio station is using it as well: http://www.absoluteradio.co.uk/about/technology_services/flac.html This could as well be taking off as a lossless streaming method and of course a nice feature to have in SBS! (BTW bug 12701 is a duplicate, but I did not know how to change that bug's status)
Created attachment 7595 [details] Oggflac server side decode
Above is a proposed server side decode for oggflac making use of the flac binary already shipped. Interested in views?
CC Alan for comment. Good work!
OggFLAC is FLAC in an Ogg container, correct? So this would decode the FLAC and stream it as AIFF? If you can strip the FLAC from the container, why wouldn't it be streamed as FLAC?
From my reading that means changing the flac binary - I was trying to use what it currently supports. But feel free to put me right on a set of options which doesn't do the decode...
I guess worst case you could pipe it to another flac process to re-encode.
(In reply to comment #5) > OggFLAC is FLAC in an Ogg container, correct? > > So this would decode the FLAC and stream it as AIFF? If you can strip the FLAC > from the container, why wouldn't it be streamed as FLAC? Of course you can also add the following convert rule to the patch to allow streaming of pcm if you don't like AIFF: ogf pcm * * [flac] -dcsF --ogg --force-raw-format --endian=little --sign=signed -- $FILE$
It indeed looks a bit silly: ogf flc * * [flac] -dcsF --ogg -- $FILE$ | [flac] -cs --totally-silent --compression-level-0 -
Created attachment 7596 [details] Squeezeplay support This patch supports oggflac streaming on Squeezeplay linux desktop with very minor change (needs a couple of line change in server too) I've not tried a firmware build but it will require flac to be build with ogg support which it is not at present.
Created attachment 7597 [details] Oggflac server support Updated server patch which supports the SP client playback in the other patch.
This should re-encode the Ogg FLAC input stream to plain FLAC. I placed the rule in custom-convert.conf and disabled the other two rules. I can't decipher the debugging output from player.source, so you'll have verify that it's actually doing what I believe. ogf flc * * [flac] -cs -- $FILE$
Good work. I note the following from the header of the first stream (http://radio.cesnet.cz:8000/cro-d-dur.flac), which I do not think we currently use: ice-audio-info: ice-samplerate=48000;ice-bitrate=128;ice-channels=2
Absolute streams have this as the header: "cache-control" => "no-cache", "content-type" => "application/ogg", "ice-audio-info" => "ice-samplerate=44100;ice-bitrate=128;ice-channels=2", "icy-br" => [128, 128], "icy-genre" => "Rock", "icy-name" => "Absolute Radio", "icy-private" => 0, "icy-pub" => 1, "icy-url:http" => "//www.absoluteradio.co.uk", server => "Icecast 2.3.2", So both using the same Icecast 2.3.2 server (or claiming to!) Note the bitrate is wrong for a flac stream on both. I've mailed Absolute about their bitrate setting, but not sure if it is a feature of the server. LMS is showing a bitrate of 128 for these streams.
(In reply to comment #12) > This should re-encode the Ogg FLAC input stream to plain FLAC. > > I placed the rule in custom-convert.conf and disabled the other two rules. I > can't decipher the debugging output from player.source, so you'll have verify > that it's actually doing what I believe. > > ogf flc * * > [flac] -cs -- $FILE$ Unfortunately this doesn't work for streamed files - it fails with: ERROR: FLAC input has STREAMINFO with unknown total samples which is not supported Hence the need to decode the file via flac -d.
Please add the following (or something like that) to the patch for strings.txt: OGF CS OggFLAC DA OggFLAC DE OggFLAC EN OggFLAC ES OggFLAC FI OggFLAC FR OggFLAC HE OggFLAC IT OggFLAC NL OggFLAC NO OggFLAC PL OggFLAC RU OggFLAC SV OggFLAC
I get an error with AIFF output: Slim::Player::TranscodingHelper::getConvertCommand2 (361) Rejecting [flac] -dcsF --ogg --force-aiff-format -- $FILE$ because no available stream mode supported: R AIFF output still functions, but shouldn't the convert rule be: ogf aif * * # IR [flac] -dcsF --ogg --force-aiff-format -- $FILE$
Created attachment 7598 [details] Patch to Poky build to include Ogg support in libFLAC
(In reply to comment #16) > Please add the following (or something like that) to the patch for strings.txt: > > OGF > EN OggFLAC Should be "Ogg FLAC", similar to "Ogg Vorbis".
Created attachment 7599 [details] Patch to Audio::Scan to support oggflac Proposed patch to Scan::Audio to parse streaminfo and vorbis comment blocks from oggflac files and streams.
Created attachment 7600 [details] Patch to Audio::Scan to support oggflac Proposed patch to Scan::Audio to parse streaminfo and vorbis comment blocks from oggflac files and streams.
Created attachment 7601 [details] Updated server patch Updated server patch including support for local oggflac parsing and playback using AudioScan addition. No seeking support.
Great work again. :) How hard do you think seeking would be to support? How popular do you think local OggFLAC files are? I'd guess not very popular at all...
== Auto-comment from SVN commit #9689 to the jive repo by ayoung == == http://svn.slimdevices.com/jive?view=revision&revision=9689 == bug 12893: Support OggFLAC Add OggFLAC support to Squeezeplay. Requires libogg-devel as build-time dependency.
== Auto-comment from SVN commit #9690 to the jive repo by ayoung == == http://svn.slimdevices.com/jive?view=revision&revision=9690 == bug 12893: Support OggFLAC; refer ogf over flc so that we can have a 'ogf -> flc' rule in LMS.
== Auto-comment from SVN commit #33922 to the slim repo by ayoung == == http://svn.slimdevices.com/slim?view=revision&revision=33922 == bug 12893: Support OggFLAC - server support This is intended only to support streaming, not local files. Transcoding to ordinary FLAC is included.