Welcome to PhantomPilots.com

Sign up for a weekly email of the latest drone news & information

Overlaying route data on video

Discussion in 'Pro/Adv Discussion' started by mmjax, Jul 7, 2016.

  1. mmjax

    Joined:
    Apr 21, 2015
    Messages:
    96
    Likes Received:
    22
    Can anyone tell me what the best way to overlay a route map on top of video would be?
    For example, let's say I wanted to fly along a racetrack - the main video would show the flight, but in the top corner, I'd like to see a map if the racetrack to see the phantoms position as it makes its way around the track.
    Anyone know the best way of doing this? It doesn't need to be complex, just looking for something similar to a car racing video game.

    Thanks,
    MJ
     
  2. Morgas Resnak

    Joined:
    Mar 25, 2016
    Messages:
    179
    Likes Received:
    31
    Location:
    Leesville, Louisiana
    Dashlane, and you can YouTube it with step-by-step instructions.
     
  3. Ed209

    Joined:
    Jul 27, 2015
    Messages:
    938
    Likes Received:
    423
    Dashware. It's part of the stock gauges to show your route.
     
  4. mmjax

    Joined:
    Apr 21, 2015
    Messages:
    96
    Likes Received:
    22
    Thank you both, I will take a look at Dashlane and Dashware.
     
  5. Mark The Droner

    Joined:
    Aug 26, 2015
    Messages:
    4,020
    Likes Received:
    1,175
    Location:
    Brookeville, MD, USA
    There's a trick to it though - at least with Dashware. While the overlayed route is easy, to put it on top of your earth map is a challenge. You have to copy paste an image of your earth map, and then overlay the route on top of that at the right size and position.
     
  6. Morgas Resnak

    Joined:
    Mar 25, 2016
    Messages:
    179
    Likes Received:
    31
    Location:
    Leesville, Louisiana
    Its Dashware, I had a brain fart. Dashlane is a password saver, sorry
     
  7. mmjax

    Joined:
    Apr 21, 2015
    Messages:
    96
    Likes Received:
    22
    Thank you for pointing me in the right direction on this. I spent many hours figuring out how to make it do exactly what I want, so I figured I would come back here and post the exact steps I had to take to achieve my desired results. Hopefully this will make things easier for the next person trying to do the same thing with their P3 or P4...

    1 - Copy flight logs from tablet to the project directory on your PC (I have Android, so it was pretty straightforward, not sure what is required for iOS)
    2 - Upload logs to healthydrones.com, convert to CSV format, save it to the project directory on your PC. Keep the page up so you can refer back to it later.
    3- Open DashWare, point it to your flight video for this project (this can be on the SD card, DashWare will copy it elsewhere for processing)
    4- Remove the default gauges that are on the screen.
    5- Go to the Project tab within DashWare and add the Data File(s) - this is the CSV file you just downloaded.
    6- Referring to the map view on healthydrones.com, open up Bing Maps (I found the colors were better than google maps) and find the same location.
    7- Using the windows "Snipping Tool", take a screenshot of the area within Bing Maps that you want as your map within DashWare. Save it to the project directory on your PC.
    8- Within DashWare, go to the Gauge Toolbox tab.
    a) Click the red plus sign to add a new gauge.
    b) Give it a name, and click Add.
    c) Within Component window, click the plus sign
    d) Select "Image" as the Component Type, and click Add.
    e) Click on "Edit Component Properties" (looks like a hammer & wrench)
    f) Under "Image Settings", click browse, and select your Bing Maps screenshot. Click OK.
    g) Click the "Auto Fit" button.
    h) Go to File, Save Gauge, then close the Gauge Designer window.
    9- You will now see the map in your Gauge toolbox with the gauge name you chose. Drag it to your video window. Place it where you want it, resize as desired.
    10 - Within the Gauge toolbox, choose your GPS map gauge. Personally I modified "Small White Map" to make the line a little thicker, and used that.
    11 - Drag the gauge to the video window, and place it over your map. Move and resize as necessary to make things line up.

    Ok, now we have the view set up right, it's time to fix the data.

    12 - Go to DJI Go and review your video. Take note of the exact times you want to start and stop your video. E.g. 1:23 and 4:20.
    13 - Grab a calculator. Start time = (((1 x 60) + 23)x 1000) = 83000, stop time = (((4 x 60) + 20)x 1000) = 280000.
    14 - Open your CSV. The start and stop times you just calculated should match up with values in the "time(millisecond)" column.
    15 - Not including the header, delete all of the rows before 83000, and after 280000. Save the CSV with a new filename.
    16 - Go back to the Project tab within DashWare. Select your Data file and click X (delete). Click the plus (+), browse to and select the CSV file you just saved.

    Synchronizing Data with Video

    17 - Go to Synchronization tab
    18 - Find some behavior in the video that you can easily see in the GPS map (e.g. abrupt left turn and forward movement)
    19 - Uncheck "Sync with Video" checkbox and try to manually sync video with data by hitting play/pause in the video or synchronization map windows.
    20 - Check the "Sync with Video" checkbox and play video looking for accuracy.
    21 - Repeat 19 and 20 until synchronized.
    22 - Go to File, and save your project!

    That should be it for DashWare. When you are done with your final adjustments, go to File and click on Create Video.

    JUST WHEN I THOUGHT I WAS DONE...

    Once I had my DashWare video, I wanted to merge several videos together, and do some color correction. I found that my video editing software could not open the MP4. It turns out that the CODEC that DashWare uses is not one that Sony Movie Studio 12 understands.
    I found some open source software called Handbrake that allowed me to re-encode the MP4. If you need to do this, make sure you understand the effect of the RF quality value. I watched a couple of YouTube video's on Handbrake, but it was pretty straightforward to use.


    There was one thing I couldn't figure out...I originally wanted to use the gauge that showed the direction of travel (little triangle/arrow), or even the compass. The arrow seems to point in random directions, I just couldn't get it to work. Viewing the same flight within DJI go shows direction perfectly. If anyone knows what causes this and how to fix it, please let me know! My suspicion is that Dashware is pulling the wrong variable from the CSV.

    THAT'S IT! I hope someone finds these instructions helpful. Send me a PM and let me know if there was something that can make the directions better.

    MJ
     
    #7 mmjax, Jul 20, 2016
    Last edited: Jul 20, 2016
  8. Mark The Droner

    Joined:
    Aug 26, 2015
    Messages:
    4,020
    Likes Received:
    1,175
    Location:
    Brookeville, MD, USA
    Yeah I had that same problem re direction of travel if I understand you. I wanted to use a little triangle to show the ac, but instead had to settle for a little circle to show the ac.
     
  9. mmjax

    Joined:
    Apr 21, 2015
    Messages:
    96
    Likes Received:
    22
    Certainly sounds like the same thing. I ended up settling on the little circle since position was much more important than direction.
     
  10. mappazzo

    Joined:
    Aug 1, 2016
    Messages:
    1
    Likes Received:
    0
    Hi guys,
    I had the exact same problem a few months back and we have developed an online viewer to address this problem.
    We found the dashware option was not quick enough due to the post-processing requirements.
    Our program is currently in beta testing and should have a system available for general use in the coming month or so.
    if your interested check out my thread on inspirepilots...
    Video map overlay solution
     
  11. JockC

    Joined:
    Feb 2, 2016
    Messages:
    35
    Likes Received:
    14
    Location:
    NSW, Australia
    I do this regularly using Litchi screen recording in conjunction with Wondershare Filmora video editing software.
    I set up waypoints on Litchi and get it to fly the mission with screen recording "on", the live video view off and the waypoint progress map maximised (the screen recording is, thus, recording the mission progress map). I then take the live video from the SD card and merge it with the recorded screen video in a picture in picture arrangement using Filmora. There is very little effort involved at all.