{"action":"created","issue":{"url":"https://api.github.com/repos/thaytan/gst-rpicamsrc/issues/30","labels_url":"https://api.github.com/repos/thaytan/gst-rpicamsrc/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/thaytan/gst-rpicamsrc/issues/30/comments","events_url":"https://api.github.com/repos/thaytan/gst-rpicamsrc/issues/30/events","html_url":"https://github.com/thaytan/gst-rpicamsrc/issues/30","id":75386205,"number":30,"title":"Question about feasibility of an idea, re: motion detection","user":{"login":"towolf","id":345210,"avatar_url":"https://avatars.githubusercontent.com/u/345210?v=3","gravatar_id":"","url":"https://api.github.com/users/towolf","html_url":"https://github.com/towolf","followers_url":"https://api.github.com/users/towolf/followers","following_url":"https://api.github.com/users/towolf/following{/other_user}","gists_url":"https://api.github.com/users/towolf/gists{/gist_id}","starred_url":"https://api.github.com/users/towolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/towolf/subscriptions","organizations_url":"https://api.github.com/users/towolf/orgs","repos_url":"https://api.github.com/users/towolf/repos","events_url":"https://api.github.com/users/towolf/events{/privacy}","received_events_url":"https://api.github.com/users/towolf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-05-11T22:53:31Z","updated_at":"2015-05-18T10:28:40Z","closed_at":null,"body":"One other project I’m following on Github is https://github.com/dickontoo/omxmotion.\r\n\r\nWhat it is doing is to re-implement camera interface with OMX, not mmal. The clou is that it accesses the motion vectors exported by the hardware H264 encoder to detect motion. If enough vectors sum up to a threshold then file writing starts. In parallel a continuous multicast network stream is sent out.\r\n\r\nNow this works as a proof-of-concept, but I was wondering if it weren’t easier to write a GStreamer module that acts as a \"frame valve\". It would receive video frames and motion vector data from\r\nrpicamsrc and analyze ths data and decide to pass on video into its sink like this:\r\n\r\n    [rpicamsrc]  → [stuff] → [network streaming]\r\n                 ↓\r\n                 [omxmotion as frame \"valve\"] → [movmux] →[multifilesink]\r\n\r\n`omxmotion` is using ffmpeg to implement all the other boxes and it is quite hard as it seems.\r\n\r\nSo my idea is a plug-in motion detection module. Would that be feasible in the GStreamer architecture?"},"comment":{"url":"https://api.github.com/repos/thaytan/gst-rpicamsrc/issues/comments/103010941","html_url":"https://github.com/thaytan/gst-rpicamsrc/issues/30#issuecomment-103010941","issue_url":"https://api.github.com/repos/thaytan/gst-rpicamsrc/issues/30","id":103010941,"user":{"login":"thaytan","id":74973,"avatar_url":"https://avatars.githubusercontent.com/u/74973?v=3","gravatar_id":"","url":"https://api.github.com/users/thaytan","html_url":"https://github.com/thaytan","followers_url":"https://api.github.com/users/thaytan/followers","following_url":"https://api.github.com/users/thaytan/following{/other_user}","gists_url":"https://api.github.com/users/thaytan/gists{/gist_id}","starred_url":"https://api.github.com/users/thaytan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaytan/subscriptions","organizations_url":"https://api.github.com/users/thaytan/orgs","repos_url":"https://api.github.com/users/thaytan/repos","events_url":"https://api.github.com/users/thaytan/events{/privacy}","received_events_url":"https://api.github.com/users/thaytan/received_events","type":"User","site_admin":false},"created_at":"2015-05-18T10:28:40Z","updated_at":"2015-05-18T10:28:40Z","body":"Ah, then I guess that doesn't work because multifilesink doesn't know how to put a valid matroska header on any files when it switches to a new one.\r\n\r\nIf you're using GStreamer from git, you can use the 'splitmuxsink' element I added earlier in the year instead, but it's not been in any release yet. "}}