View Full Version : display heart rate data in video


Mike Prendergast
May 11th, 2010, 01:20 PM
I'm trying to figure out how to display heart rate data from a cyclist in a video of the ride. I have heart rate data along with time and can choose the correct data for a given section of video. I'm trying to figure out how to read that text data and display it as a value in the video and have it updated. The data set has heart rate every 5, 10, or 15 seconds depending on the setting of recording unit. has someone done this? Or have some ideas about how to read this information and then display it. My goal is have a small number (font = around 12) along with a red pulsing heart icon to indicate it is heart rate data. I have Sony Vegas Pro editing software. The heart rate and time data are in a space delimited text file but could be in a spreadsheet.

Mike Prendergast

Sam Houchins II
May 11th, 2010, 08:22 PM
I'm often obtuse and miss the point, so let me ask...
Are you seeking to display the heart rate information in some way other than manually entering/overlaying the data as text onto the screen?
or
Are you simply seeking how to add text overlaid onto video?
sorry if i'm off base...

Mike Prendergast
May 12th, 2010, 08:45 AM
Hi Sam, Thanks for asking. I'm sure it is confusing. Your first question is what i need to do. I do know how to display text as an overlay and how to move it around on the display. What i'm struggling with is how to display data that changes with time. I need the heart rate data to update (change) every 5 seconds for several minutes. I don't want to input a value with a duration of 5 seconds and then repeat this process hundreds of times manually. So i need a way to have a list of values update (in the same location on the screen). Once in place the result would be a blinking heart icon with data displayed above it. Every 5 seconds the value would change. Does that help?

Sam Houchins II
May 12th, 2010, 10:10 AM
Not knowing anything more sophisticated, i would merely manually enter the text (#) overlay on its own timeline (track), and manually change its value every 5 seconds...
..by dropping a text media onto its own time line, with screen placement, font, size, etc. to my liking.
Sizing it to 5 seconds
copying it
pasting it sequentially right after each other ad infinitum (cntrl,v?)
go back and change the texts (#'s) to their appropriate values.
On another time line. I'd have the blinking heart and position/size it relative to the heart rate value.
I'm sure i'm stating the obvious, so sorry.
I'm clueless on creating scripts if that's what you're looking for, and will be really surprised when someone produces the answer how that script would refer to a data base for it's values.
Even reading scripts people have provided in other threads was Greek to me.
I can imagine your goal is pretty cool, and hope it works out for you.

Garrett Low
May 12th, 2010, 02:00 PM
What format do you have the heart rate data in now? Is it a text file with a line for each reading?

Maybe try to use a credit role where the credits is the heart rate and have it flash for the interval of your data.

I'll have to play a bit to see how this could work.

Garrett

Roger Wilson
May 12th, 2010, 07:19 PM
Mike,

I'm not sure how to do this using Vegas. In After Effects you can use the effect Text -> Numbers.

Here's how I would do it:

Create a new layer by choosing Layer New Solid from the menu
Make the layer the same size as your composition
Select the layer in the composition window by clicking on it
Add the Numbers effect by choosing Effect Text Numbers from the menu
In the effect control window - click the stop watch on the Value/Offset/Random field
Move the timeline to 2 seconds
Update the Value/Offset/Random field
You should now have 2 key frames on the time line
Start Microsoft Excel, then switch back to After Effects
Select all the keyframes and copy to clipboard
Switch to Excel, and paste from the clipboard
Use your existing data, enter the frame and new heartbeat rate in the spreadsheet replacing the existing values and then insert new rows as necessary.
Select all of the text in Excel and copy to clipboard
Switch to After Effects, make sure the Numbers effect is active on the timeline and paste in the values


If you've only got a couple of clips you need this done on, you could send me the data and I could create an overlay you could import into Vegas. If its more than a few, we could work something out.

Roger Wilson
(303) 434-9151

Mike Prendergast
May 13th, 2010, 02:01 PM
What format do you have the heart rate data in now? Is it a text file with a line for each reading?

Maybe try to use a credit role where the credits is the heart rate and have it flash for the interval of your data.

I'll have to play a bit to see how this could work.

Garrett

The data is on one line each so that might work. I will have to figure out how to time the data rate change. Maybe it will be as simple as: 100 heart rate values at 2 second update would be a total time of 200 seconds. Make the credit event that long and then paste in the values. I will give it a try.

Mike Prendergast
May 13th, 2010, 02:05 PM
Mike,

I'm not sure how to do this using Vegas. In After Effects you can use the effect Text -> Numbers.

Here's how I would do it:

Create a new layer by choosing Layer New Solid from the menu
Make the layer the same size as your composition
Select the layer in the composition window by clicking on it
Add the Numbers effect by choosing Effect Text Numbers from the menu
In the effect control window - click the stop watch on the Value/Offset/Random field
Move the timeline to 2 seconds
Update the Value/Offset/Random field
You should now have 2 key frames on the time line
Start Microsoft Excel, then switch back to After Effects
Select all the keyframes and copy to clipboard
Switch to Excel, and paste from the clipboard
Use your existing data, enter the frame and new heartbeat rate in the spreadsheet replacing the existing values and then insert new rows as necessary.
Select all of the text in Excel and copy to clipboard
Switch to After Effects, make sure the Numbers effect is active on the timeline and paste in the values


If you've only got a couple of clips you need this done on, you could send me the data and I could create an overlay you could import into Vegas. If its more than a few, we could work something out.

Roger Wilson
(303) 434-9151

thanks for the detailed reply. I do need\want to learn how to do this as i make bicycle ride videos and want to use this technique to help viewers understand how much effort is being put out by riders on climbs and during fast paced riding. thanks for the offer. i don't have after effects so i'll work some more on a vegas solution.

mike prendergast
ChainRing Films's videos on Vimeo (http://vimeo.com/chainringfilms/videos)

Cedric Cornell
May 14th, 2010, 01:21 AM
This is interesting.
I want to overlay a speed reading from a downhill skateboard run.
I can extract the speed from a garmin gps to excell. 1 reading per second.

Just have to find a good way to do it. Copy/Paste seem tedious!

A script would be nice.

Jonathan Palfrey
May 17th, 2010, 12:32 PM
Interesting post, would be nice to know if there was a quick way of doing this sort of stuff. Could be handy for creating on screen clocks for sports scoreboards as well. Like Cedric said copy and pasting or entering them manually seems tedious.