jquense / asf-info-parser

MIT License
2 stars 1 forks source link

Unable to parse stream from Foscam IP-camera #1

Open bikegriffith opened 8 years ago

bikegriffith commented 8 years ago

Neither the data nor end events are fired when trying to stream data from a Foscam IP cam (uses ASF container for MJPEG + AAC(?))

var AsfParser = require('asf-parser'), http = require('http');
// Sample open IP cam on internet
http.get('http://181.168.108.83/videostream.asf?user=admin&pwd=', function(response) {
  console.log('Got initial http response...');
  var parser = response.pipe(new AsfParser());
  parser.on('data', function(data) {
    console.log('on data', data);
  });
  response.on('end', function() {
    console.log('fin');
  });
});

Side Note:

jquense commented 8 years ago

sorry I don't know. I've only ever used this for audio file metadata parsing :P glad to take PR's tho