Timestamp relating to video, loaded from XML file

Hi there!

Could you point me in a direction, i am trying to make a simple video player that will show a string at a certain point in time.

I have the video player tutorial, and the XML extention.

I imagnine the XML file would contain a lot of rows with the following data:

– A float with the “timestamp”
– The string

All i need to do is to use the XML extention to load the right string to display based on the videos current time.

Any simple code to point me in a direction would be great, im a bit lost in for now, but it seems like a simple task…

Any help apriciated, and as this is my first post, please tell me if i need to be more specific about something, i have tried to read the rules :slight_smile:

thanks

soren

Not sure if there are existing subtitle-esque options available for you, but first thought was to load the timestamps + strings into a map (see http://forum.openframeworks.cc/t/hashtable-on-openframeworks/5751/2) which can be used as a lookup table in your update function.

You will probably have to work out the current time of the video using a combination of getSpeed / getCurrentFrame - I’d try and use seconds on both (to avoid missing messages due to rounding / float issues).