# save timestamp



## Gerald10 (Oct 31, 2016)

Hi,

I use OBS Studio and would like to store the timestamp (utc timestamp - in millisec) of each recorded frame (screen recording with display capture - video frame only). any idea if that is possible and how?
I would need to get a callback for each frame beeing recorded...

Do you currently store the timestamp of the first frame beeing recorded (utc timestamp - in millisec)?

Also, can OBS record multiple video sources in layers? It seems by default 2 sources will be merged into a single layer...

Thanks


----------



## Jim (Nov 4, 2016)

I don't quite understand what you mean.  Timestamp relative to system time?  Because there are already timestamps relative to the recording, and you can get the timestamps for all frames using FFmpeg tools and just add that to the time of file creation to get the system time for any specific frame if you want that, though that's of course not an automated thing.  But I mean you're asking for "each recorded frame" so that's the easiest way to do that.

I think a better question would be why would you want to do that?  It'd probably be better to explain what you're trying to do instead and try to get some discussion about how to accomplish your over-arching goal.


----------



## Gerald10 (Nov 4, 2016)

i mean a timestamp of the system time (UTC) for each frame.
from the file creation time i do not get an accurate system time for the first frame, because saving the file to the disk takes some time, which i do not know...

is there a way to implement a plugin and get a callback for each created frame? in the callback i can call time_now() and save it to a file...

const SYSTEMTIME time_now() {
SYSTEMTIME st;
GetSystemTime(&st);
return st;
}

@Jim could you please give some feedback?


----------

