-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sync video speed with treadmill speed #4
Comments
Hi Andrew, maybe the easiest would be to calculate a factor from the recorded speed and the reported speed. That factor could be used to set the playbackRate. For example when running at 7 MPH on the treadmill, the factor would be 1.07, based on a recording speed of 6.5 MPH. I think there would be some prework (some controls for selecting a video, setting the base speed ...) to do but maybe I'll give it a try if there is some time. Is your video public available? |
Thank you for the reply, Jan! No, my video is not publicly available (it is not high-enough quality to share with the world!). I'm sure you could use any video for testing purposes. There are many running videos on YouTube, for example. |
I’ve uploaded a simple demo script to https://ichbinlaufen.de/running-video/video-player.html. It demonstrates how to use TreadmillCommands.js and TreadmillControl.js in combination with an HTML video player and WebVTT to create a synchronized video player. The video may lag slightly when slowing down, likely because it was recorded at 30 fps. Using a higher frame rate could potentially improve the output. The video-player.html file references https://ichbinlaufen.de/running-video/js/VideoPlayer.js, which serves as a good starting point for understanding how the synchronization works. Here are some key points:
To test it, simply open the link above and click the "Connect" button. Once the device is connected, press "Load Demo Data" and start the video. When you begin using the treadmill, the playbackRate and inclination adjustments should activate automatically. |
Hello! Thank you for creating this project.
I have create a video of my normal running route, which I edited to a consistent speed of 6.5 MPH. I have played the video at while running on my treadmill. I am about to buy a new treadmill with FTMS 4.0. and would like to be able to adjust the speed of the video to match the speed of my treadmill.
The browser provides an API for adjusting playback speed (HTML5 video
playbackRate
).Would you be able to add a feature to your project to play a video and, given its recorded speed, adjust the playback speed to match the treadmill speed? If not, could you provide advice on how I might do it?
The text was updated successfully, but these errors were encountered: