Unable to parse stream from Foscam IP-camera
bikegriffith opened this issue · 1 comments
bikegriffith commented
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:
- The source references the ASF spec on MSDN, which is no longer available. However, you can find it in the wayback machine: https://web.archive.org/web/20140419205228/http://msdn.microsoft.com/en-us/library/bb643323.aspx
jquense commented
sorry I don't know. I've only ever used this for audio file metadata parsing :P glad to take PR's tho