Skip to content

A demuxer for this container was not found. #14

@unixunion

Description

@unixunion

I am trying to use alac to play files from URL. And the demuxer cannot be found for ALAC. How do I get ALAC files to play from URL?

var AV = require('av');
require('alac');

var player = function(url) {
  console.log("play " + url)
  var p = AV.Player.fromURL(url);
  p.on('ready', function() {
    console.log('ready to play');
  });
  p.on('buffer', function(percent) {
    console.log('buffering ' + percent);
  });
  p.on('error', function(err) {
    console.log('error ' + err);
  })
  p.on('format', function(value) {
    console.log('format ' + value);
  });
  p.volume = 100;
  p.play();
}

player('/api/getfile/01%20The%20Eater%20Of%20Dreams.m4a');

in the console, I have added some debug statements to track program flow.


registering demuxer function M4ADemuxer() {
      return M4ADemuxer.__super__.constructor.apply(this, arguments);
    }
demuxer.js?fc11:104 registering demuxer function CAFDemuxer() {
      return CAFDemuxer.__super__.constructor.apply(this, arguments);
    }
demuxer.js?fc11:104 registering demuxer function AIFFDemuxer() {
      return AIFFDemuxer.__super__.constructor.apply(this, arguments);
    }
demuxer.js?fc11:104 registering demuxer function WAVEDemuxer() {
      return WAVEDemuxer.__super__.constructor.apply(this, arguments);
    }
demuxer.js?fc11:104 registering demuxer function AUDemuxer() {
      return AUDemuxer.__super__.constructor.apply(this, arguments);
    }
decoder.js?6368:105registering id:lpcm decoder: function LPCMDecoder() {
      this.readChunk = __bind(this.readChunk, this);
      return LPCMDecoder.__super__.constructor.apply(this, arguments);
    }
decoder.js?6368:105registering id:ulaw decoder: function XLAWDecoder() {
      this.readChunk = __bind(this.readChunk, this);
      return XLAWDecoder.__super__.constructor.apply(this, arguments);
    }
decoder.js?6368:105registering id:alaw decoder: function XLAWDecoder() {
      this.readChunk = __bind(this.readChunk, this);
      return XLAWDecoder.__super__.constructor.apply(this, arguments);
    }
decoder.js?049e:3decoder
ag_dec.js?50da:3ag_dec
decoder.js?049e:25Registering ALACDecoder
decoder.js?6368:105registering id:alac decoder: function ALACDecoder() {
      return ALACDecoder.__super__.constructor.apply(this, arguments);
    }
File.js?1ab7:76 play /api/getfile/01%20The%20Eater%20Of%20Dreams.m4a
buffering 0.7638004667497408
demuxer.js?fc11:113test format: function M4ADemuxer() {
      return M4ADemuxer.__super__.constructor.apply(this, arguments);
    }
m4a.js?210c:27m4a seeking
m4a.js?210c:28Stream {list: BufferList, localOffset: 0, offset: 0}
demuxer.js?fc11:122UnderflowError {name: "UnderflowError", stack: "Error↵    at new UnderflowError (eval at <anonymou…st:8000/assets/app.js:9205:2), <anonymous>:56:12)"}
demuxer.js?fc11:113test format: function CAFDemuxer() {
      return CAFDemuxer.__super__.constructor.apply(this, arguments);
    }
demuxer.js?fc11:122UnderflowError {name: "UnderflowError", stack: "Error↵    at new UnderflowError (eval at <anonymou…st:8000/assets/app.js:9205:2), <anonymous>:56:12)"}
demuxer.js?fc11:113test format: function AIFFDemuxer() {
      return AIFFDemuxer.__super__.constructor.apply(this, arguments);
    }
demuxer.js?fc11:122UnderflowError {name: "UnderflowError", stack: "Error↵    at new UnderflowError (eval at <anonymou…st:8000/assets/app.js:9205:2), <anonymous>:56:12)"}
demuxer.js?fc11:113test format: function WAVEDemuxer() {
      return WAVEDemuxer.__super__.constructor.apply(this, arguments);
    }
demuxer.js?fc11:122UnderflowError {name: "UnderflowError", stack: "Error↵    at new UnderflowError (eval at <anonymou…st:8000/assets/app.js:9205:2), <anonymous>:56:12)"}
demuxer.js?fc11:113test format: function AUDemuxer() {
      return AUDemuxer.__super__.constructor.apply(this, arguments);
    }
demuxer.js?fc11:122UnderflowError {name: "UnderflowError", stack: "Error↵    at new UnderflowError (eval at <anonymou…st:8000/assets/app.js:9205:2), <anonymous>:56:12)"}
File.js?1ab7:92error A demuxer for this container was not found.
File.js?1ab7:89buffering 24.084558295221953
File.js?1ab7:89buffering 85.09596537673015
File.js? 1ab7:89buffering 92.61631746226932
File.js?1ab7:89buffering 96.44101535345938

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions