{"action":"opened","issue":{"url":"https://api.github.com/repos/mmaelzer/mjpeg-consumer/issues/10","labels_url":"https://api.github.com/repos/mmaelzer/mjpeg-consumer/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/mmaelzer/mjpeg-consumer/issues/10/comments","events_url":"https://api.github.com/repos/mmaelzer/mjpeg-consumer/issues/10/events","html_url":"https://github.com/mmaelzer/mjpeg-consumer/issues/10","id":106676105,"number":10,"title":"File created cannot be opened","user":{"login":"eliothxchan","id":6380199,"avatar_url":"https://avatars.githubusercontent.com/u/6380199?v=3","gravatar_id":"","url":"https://api.github.com/users/eliothxchan","html_url":"https://github.com/eliothxchan","followers_url":"https://api.github.com/users/eliothxchan/followers","following_url":"https://api.github.com/users/eliothxchan/following{/other_user}","gists_url":"https://api.github.com/users/eliothxchan/gists{/gist_id}","starred_url":"https://api.github.com/users/eliothxchan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliothxchan/subscriptions","organizations_url":"https://api.github.com/users/eliothxchan/orgs","repos_url":"https://api.github.com/users/eliothxchan/repos","events_url":"https://api.github.com/users/eliothxchan/events{/privacy}","received_events_url":"https://api.github.com/users/eliothxchan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-16T00:57:30Z","updated_at":"2015-09-16T00:57:30Z","closed_at":null,"body":"Not sure if I'm filing an issue on a dead repo, but I've been trying to figure out a way to extract individual jpegs from an mjpeg stream at timed intervals, and I came across this library. Unfortunately, it doesn't work for me. Here's my code exactly; I simply replaced your IP/configuration with an open-access IP camera.\r\n\r\n    (function() {\r\n        'use strict';\r\n        var request = require(\"request\");\r\n        var MjpegConsumer = require(\"mjpeg-consumer\");\r\n        var FileOnWrite = require(\"file-on-write\");\r\n\r\n        var writer = new FileOnWrite({ \r\n            path: './video',\r\n            ext: '.jpg'\r\n        });\r\n        var consumer = new MjpegConsumer();\r\n\r\n        var options = {\r\n            url: \"http://192.168.1.1/videostream.cgi\"\r\n        };\r\n\r\n        request(options).pipe(consumer).pipe(writer);\r\n    }());\r\n\r\nThe created file is damaged and can't be opened."}}