Coder Social home page Coder Social logo

Comments (2)

bojanvidanovic avatar bojanvidanovic commented on June 26, 2024

I have updated the issue because I was not explicitly setting the mime type, instead I was relying on automatic detection which would set the OGG parser for FLAC and fail.
Now with the mime type and correct parser, the issue arises here.

from music-metadata.

Borewit avatar Borewit commented on June 26, 2024

Interesting problem @bojanvidanovic.

The MIME type is application/ogg and actually suspect that is the correct MIME type. So the stream is no audio/flac.
So you should provide the original HTTP MIME type to music-metadata.

But I won't work.

What I suspect is that the stream is not formatted like a FLAC file, but it is an Ogg stream carrying FLAC.

And the Ogg/FLAC combination is not implemented.

I created branch which will throw a more specific error:

throw new Error('Crap, we don\'t have a page consumer for Ogg/FLAC yet.');

Which can be triggered with

it('Stream Ogg/FLAC from radioparadise.com', async () => {
const url = 'http://stream.radioparadise.com/global-flac';
const response = await clients[0].client.get(url);
const fileInfo: IFileInfo = {
mimeType: response.headers['content-type']
};
const tags = await parseStream(response.stream, fileInfo);
if (response.stream.destroy) {
response.stream.destroy(); // Node >= v8 only
}
assert.strictEqual(tags.format.container, 'Ogg/FLAC');
});

Sorry, I do not have a lot time lately.

from music-metadata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.