{"action":"created","issue":{"url":"https://api.github.com/repos/davehope/libHikvision/issues/1","repository_url":"https://api.github.com/repos/davehope/libHikvision","labels_url":"https://api.github.com/repos/davehope/libHikvision/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/davehope/libHikvision/issues/1/comments","events_url":"https://api.github.com/repos/davehope/libHikvision/issues/1/events","html_url":"https://github.com/davehope/libHikvision/pull/1","id":131516233,"number":1,"title":"Stream video by decoding with ffmpeg","user":{"login":"bkbilly","id":518494,"avatar_url":"https://avatars.githubusercontent.com/u/518494?v=3","gravatar_id":"","url":"https://api.github.com/users/bkbilly","html_url":"https://github.com/bkbilly","followers_url":"https://api.github.com/users/bkbilly/followers","following_url":"https://api.github.com/users/bkbilly/following{/other_user}","gists_url":"https://api.github.com/users/bkbilly/gists{/gist_id}","starred_url":"https://api.github.com/users/bkbilly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkbilly/subscriptions","organizations_url":"https://api.github.com/users/bkbilly/orgs","repos_url":"https://api.github.com/users/bkbilly/repos","events_url":"https://api.github.com/users/bkbilly/events{/privacy}","received_events_url":"https://api.github.com/users/bkbilly/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-05T00:25:59Z","updated_at":"2016-02-14T11:33:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/davehope/libHikvision/pulls/1","html_url":"https://github.com/davehope/libHikvision/pull/1","diff_url":"https://github.com/davehope/libHikvision/pull/1.diff","patch_url":"https://github.com/davehope/libHikvision/pull/1.patch"},"body":"It converts the videos to a streaming format supported by the browser using ffmpeg."},"comment":{"url":"https://api.github.com/repos/davehope/libHikvision/issues/comments/183876484","html_url":"https://github.com/davehope/libHikvision/pull/1#issuecomment-183876484","issue_url":"https://api.github.com/repos/davehope/libHikvision/issues/1","id":183876484,"user":{"login":"davehope","id":5435716,"avatar_url":"https://avatars.githubusercontent.com/u/5435716?v=3","gravatar_id":"","url":"https://api.github.com/users/davehope","html_url":"https://github.com/davehope","followers_url":"https://api.github.com/users/davehope/followers","following_url":"https://api.github.com/users/davehope/following{/other_user}","gists_url":"https://api.github.com/users/davehope/gists{/gist_id}","starred_url":"https://api.github.com/users/davehope/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davehope/subscriptions","organizations_url":"https://api.github.com/users/davehope/orgs","repos_url":"https://api.github.com/users/davehope/repos","events_url":"https://api.github.com/users/davehope/events{/privacy}","received_events_url":"https://api.github.com/users/davehope/received_events","type":"User","site_admin":false},"created_at":"2016-02-14T11:33:00Z","updated_at":"2016-02-14T11:33:00Z","body":"Thanks for this.\r\n\r\nA few points:\r\n- Probably worth defining a path to $pathCropped/$pathStreamed so the user can choose somewhere that it writeable;\r\n- Perhaps $pathCropped/$pathStreamed should be based on a random value so that multiple clips can be streamed at any one time?;\r\n- How did the final fread() to stream the file work out for you? - I imagine the call to fread() will load the whole stream into memory. Perhaps this should be reduced to read the file in smaller blocks to conserve memory on the host?"}}