[python] trying to get a video recording from a prewritten pi camera webscoket stream via /r/learnprogramming


[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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s