Basejumper.com - archive

BASE Technical

Shortcut
Overlay FlySight Data on Video
I'm working on some code to make plots out of FlySight data and overlay them on GoPro video. The results look pretty good so far:

https://www.youtube.com/watch?v=kEUxoeosss8

The resolution on YouTube isn't really good enough to see the rotating plot in the corner clearly, but it's the same as the full-screen plot. Does anyone have any suggestions for other types of data I could include in the overlay? Since I'm writing the code myself, I can do almost anything.

I wrote it in Python, which is unfortunately not very portable. It's also pretty slow. It took my computer 9 hours to make this three-minutes video. I'm going to try to speed it up and if there's interest, I might also eventually try to re-code it in something more portable and make it into an open source project that everyone can work on. Maybe set up a repository on GitHub.
Shortcut
Re: [jws3] Overlay FlySight Data on Video
All that coding and you can't make the link clicky? tsk tsk
Shortcut
Re: [skup] Overlay FlySight Data on Video
https://www.youtube.com/watch?v=kEUxoeosss8

yeah for sure open source it..

if you could plot a starting point with google maps (they have an api at your disposal) and a starting orientation you could incorporate their satellite views or wireframe topographic style maps with contour lines.

i have been thinking about something like this for a while, and think the real value would be in having it provided real time via HUD with alerts for if your glide ratio is putting you on a collision course with a ridge up ahead.

nice work, keep it up.
Shortcut
Re: [jws3] Overlay FlySight Data on Video
I have played with flysight quite a bit, but by NO MEANS can I compete with this. I'd pool some of my knowledge, and effort (in a different arena) to help your project move forward.

I think the guys at GoPro may even back it. I know a couple w/s pilots that would probably eat this shit up.

PM me and I will give you an email address of someone who knows someone. blah blah blah.

Well done with the data / speed read outs. Some day this will be your HUD.
Shortcut
Re: [jws3] Overlay FlySight Data on Video
Good job!

I went another way on https://skyderby.ru. I considered two ways:
1. Make flysight data as a subtitles
2. Display it next to video.

I choose second because of simplicity. You can check it out:
https://skyderby.ru/tracks/3364/replay

First is also simple.

I think - to make embedding text in video works well you need compute power as Vimeo has or rent super-duper Amazon/Google cloud instance.

The web-app open-source (languages: ruby and js):
https://github.com/skyderby/skyderby
But no documentation, sorry.

jws3, If I can help you with something - I'll be happy to help. Also I'll be happy if you help with developing Skyderby :)
Shortcut
Re: [ksandr] Overlay FlySight Data on Video
Thanks! I might just spend a few weeks neatening up the code, then open source the Python version. Like I said, Python isn't as portable and you need some kind of development environment installed to run it. The one I use is called Anaconda and it's really nice (and free). The components I used besides basic Python are matplotlib and ffmpeg.

This is probably my laundry list of stuff to do before the code is presentable:
-Make some kind of basic GUI
-Add more comments in the code
-Make it detect frame rate and size automatically. Right now it's hard-coded to take video with 50 fps and 1920x1440, which is what my GoPro is set for.

Also, the dynamic pressure readings right now are based on the altitude and standard atmosphere and I'd like to find a good way to base them on measurements. If you're not familiar, the dynamic pressure tells you everything you need to know about how "fast" you're going, accounting for changes in altitude, temperature, humidity, etc. For example, 80mph at 10k ft on a hot day is a lot different than 80mph at 3k ft on a cold day, but 30psf is 30psf.
Shortcut
Re: [jws3] Overlay FlySight Data on Video
I've been slowly making progress on this project and Ive' finally got it into a presentable form, so I made a GitHub repository with what I have so far:

https://github.com/johnwstanford/pyFly.git

I'm calling it pyFly and it does more now than last time I posted about it. Here are some examples of output:
https://www.youtube.com/watch?v=4GLRWChHimc
https://www.youtube.com/watch?v=rjGVGtAD_oE

If you want to try compiling and using it, it's written in Python and I use a development environment called Anaconda, which is awesome and free. I'm also working on a C++ version that's a lot faster and I'm calling that one cFly. I've got a minimally working version of cFly right now, but it's not really in presentable form yet.

If you're interested, try to clone the GitHub repository and use the code. I'm going to keep making incremental improvements to the code and filling out the documentation, so check back every once in a while. If you have ideas about how to improve it and/or want to contribute to the repository, hit me up. Every once in a while if I add some kind of sweet new feature, I might post about it if there's enough interest. Even if nobody else is interested, I'm going to keep developing it for my own purposes.
Shortcut
Re: [jws3] Overlay FlySight Data on Video
sweeeet.

nice progress.. cloned repo and watching this project.
Shortcut
Re: [jws3] Overlay FlySight Data on Video
That's really cool, but have you tried using just drawtext to include the telemetry data without any fancy graphics? That'd make it pretty easy to throw up on a KVM or EC2 box and let people upload their files straight to it and either handle all the ffmpeg encoding for them (for a couple bucks a month) or convert their Flysight data into a drawtext file and full command that they just need to paste into their CLI or into a ffmpeg GUI.

That'd be way easier to maintain than a full crossplatform GUI in C++ IMO.
Shortcut
Re: [gharrop] Overlay FlySight Data on Video
I didn't really know anything about EC2 until you mentioned it, but I googled it and it looks like a pretty cool possibility. So it looks like people just SSH into a virtual computer and Amazon runs your code for them?

Is the drawtext you're talking about part of PIL? I'm using draw_text, which is part of CImg, in the cFly code I'm working on and it's way faster. I'm also using gnuplot instead of matplotlib in cFly. I assume an EC2 box can run any type of code? So maybe I could develop the cFly version, then just make it available to people using EC2?

For anyone who's interested and patient enough, here's the link to the cFly repo, but like I said, it's in a very minimally-working state at the moment. I'm still hard-coding the filenames of my input files and haven't tested it on any computer other than my MacBook Air.

https://github.com/johnwstanford/cFly.git
Shortcut
Re: [jws3] Overlay FlySight Data on Video
Yeah, EC2 instances allow you to deploy code and then dynamically scale up the server based on demand, instead of splashing out for a $300/month dedicated server from the beginning.

I meant the drawtext in ffmpeg: https://ffmpeg.org/...ters.html#drawtext-1

Along with the reload parameter it looks like you can feed it all the data you want and specify the X/Y, font size, background gradient, etc.
Shortcut
Re: [jws3] Overlay FlySight Data on Video
Here's a quick demo (1080 30P) with some randomized data: https://www.youtube.com/watch?v=jDWO6UMCnzs

On my MBP Retina 15'' it encoded in almost realtime (28-30fps). I wasn't able to get it to allow multiple drawtext instances being updated dynamically in different parts of the screen so I cheated and added a bunch of newlines to each text update. You could either patch ffmpeg or pipe the output back into ffmpeg for a second round of drawtext if you need more control over the text positioning.
Shortcut
Re: [jws3] Overlay FlySight Data on Video
I looked through your code, I can see why it's taking so long. Drawing out every 1920x1440 frame is a huge waste of CPU. I would use ffmpeg for the text overlay and then in the same command have it concatenate the source video with a 400x400 video made from the gnuplot frames. I don't know how long gnuplot takes but this shouldn't take more than 10 minutes to process everything for a 3 minute video.
Shortcut
Re: [jws3] Overlay FlySight Data on Video
What about Dashware? It's Freeware now and pretty simple to use
http://www.dashware.net/
Shortcut
Re: [gharrop] Overlay FlySight Data on Video
Did you use the 'reload' option in draw_text to update the text between frames? Also, where's the concatenate function you're talking about using for the plots?

I was hoping someone would have ideas on how to speed it up :)
Shortcut
Re: [jws3] Overlay FlySight Data on Video
Reload would have required monitoring the ffmpeg process and updating the text file in realtime so I used sendcmd to keep it simple. I put the full command in the Youtube description.

Here's how you'd merge it with the plot video: http://thewowza.guru/how-to-do-picture-in-picture-with-ffmpeg/