[python] trying to get a video recording from a prewritten pi camera webscoket stream
I have a raspberry pi camera which is currently running a program to take the camera stream and broadcast it to websocket for a live stream feed by using avconv to encode the data into mpeg1 for the livestream. So now I want to make a feature that is able to record +-10 seconds of a certain point. So let's say it's at 30 seconds and i trigger the capture. It'll record for another 10 seconds and it'll give me the previous 10 seconds so I'll get a video from point 20s to 40s. How can I go about doing this? I have thought of using a bitstring to append the new data and after 10s passed, data from the start of the string will be deleted while new data is written to it to keep it to 10s but I couldn't achieve this. Anyone has any ways to solve this?
Submitted July 11, 2017 at 04:01AM by Joelng8186
via reddit http://ift.tt/2tIPba6