audiocogs / flac.js

FLAC decoder in JavaScript

Home Page:http://audiocogs.org/codecs/flac/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ogg FLAC Demuxer

bradisbell opened this issue · comments

This is a feature request for an Ogg demuxer that works with FLAC.

I imagine this would be useful in general, but my use case is for internet radio. All of the FLAC streams over HTTP that I have seen use Ogg FLAC. I thought about making a native FLAC stream over HTTP, but it isn't possible to calculate native FLAC frame offsets without decoding it making it difficult to write a server component that aligns the stream for clients when they connect.

I'm not familiar with the internals of flac.js and Aurora. If I were to take a stab at this myself, where would it be preferable to implement the demuxer, knowing that it could be used with other codecs as well (such as Vorbis)?

Check out ogg.js. It uses an Emscripten compile of libogg to JS, and while that repo also includes vorbis and opus support, the file in build/ogg.js should support FLAC out of the box.

Thank you, I will give it a try.