I want to synchronize multiple RPIs to a single clock. For this I use a computer as the ntp server for all of them. All the RPIs now have the same time(server time). After synchronizing I want record videos simultaneously from all of them like a CCTv.
I am planning to use Presentation timestamps of frames of videos being simultaneously recorded. Now if I have those timestamps giving me time w.r.t RPI's clock then my problem is solved(as all RPIs have same clock). I change (following a suggestion from Camera Forum) line 573 of picamera/camera.py
cc.use_stc_timestamp = mmal.MMAL_PARAM_TIMESTAMP_MODE_RAW_STC
Now I expect to get
RAW_STCfor each timestamp. But I see that this value gets reseted every-time I switch on / off the pi? So what
RAW_STC is giving me is the time since Pi has been On. It is not using pi's clock(the one I have synced with external server) for this timestamppig. How Can I use that clock for Presentation timestamp? Once I get timestamps relative to the Pi's clock I think all the timestamps can be compared.