olivierfriard / BORIS

Behavioral Observation Research Interactive Software
http://www.boris.unito.it
GNU General Public License v3.0
177 stars 35 forks source link

Access current video path in "Converters" function #658

Open horsto opened 1 year ago

horsto commented 1 year ago

When setting up a new project and adding "Converters", I would like to add an external timestamp file (.csv, timestamps recorded as "day:month:year_hour:minute:second:nanoseconds"), such that when saving the annotations, the actual frame times are saved, not the time in seconds since start of the video. This is important also because the video playback rate differs ever so slightly from real time.

Is it possible to access the file path of the current video file that is being worked on in the Converters function? If so, that would allow me to easily identity which timestamp .csv file to load concurrently and to extract timestamps from.

Is this idea plausible?

olivierfriard commented 1 year ago

Hi, as you can see in the user guide (https://boris.readthedocs.io/en/latest/#converters-tab-1) the Converters are used for plotting external data when the timestamp values are not expressed in seconds. Does your CSV file contain a conversion between the erroneous video time and the correct one?

horsto commented 1 year ago

Thanks, @olivierfriard! The external file contains two columns: frame number (index) and the real time as "day:month:year_hour:minute:second:nanoseconds". I was thinking that when exporting data across observations it would be nice to have the "real" (correct) time in the output instead of (arbitrary) video timestamps because those are ever so slightly wrong (the .mp4 is recorded at around 1.2x real time). If this is easy to set up then I would do it, but otherwise I will use the frame index saved in the .csv output from Boris and use that down the line to find the correct times.