1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

My cycling video (c/o Python, Strava & Google)

Discussion in 'CycleChat Cafe' started by ohnovino, 18 Jul 2013.

  1. ohnovino

    ohnovino Large Member

    Location:
    Liverpool
    I'm learning Python at the moment and decided to have a go at writing a script that would take a GPX track from Strava, get matching Google StreetView images and turn them into a video. Here's some of this morning's ride:



    It's far from perfect, but I'm quite pleased with the results. Gets a bit messy at junctions but the straight bits look good.

    I had hoped to make a website that would let people make their own videos from any GPX tracks, but Google limit StreetView API calls to 25,000 per account per day which would run out in no time.

    The code is pretty ugly, but I've put it here on Pastebin if anyone wants to make their own video. Note that you'll need to get a (free) Google API key, and the script only produces the stills; you'll have to use some other software to stitch them together, or use ffmpeg if you can get the #@&% thing to work.
     
    Pat "5mph" likes this.
  2. Pat "5mph"

    Pat "5mph" A kilogrammicaly challenged woman

    Location:
    Glasgow
    If you could manage to make it a bit slower would be easier on the eyes :smile:
     
  3. vernon

    vernon Harder than Ronnie Pickering

    Location:
    Meanwood, Leeds
    It makes helmet cams redundant. :hyper:
     
    Pat "5mph" likes this.
  4. Pat "5mph"

    Pat "5mph" A kilogrammicaly challenged woman

    Location:
    Glasgow
    Depends what has more battery life, a helmet cam or your garmin with strava?
    Have neither myself, so don't know.
    I think if it was available I would pay to have footage of some of my rides recorded on strava.
    Would not wear a helmet cam though.
     
  5. twentysix by twentyfive

    twentysix by twentyfive Clinging on tightly

    Location:
    Over the Hill
    Clever chap. I understand the result but how you actually did all that is beyond me.
     
  6. Primal Scream

    Primal Scream Get your rocks off

    X 2 :huh: