Git Product home page Git Product logo

samples-for-svpub's Introduction

Samples for Street View Publish API

This repository contains experimental tools and samples for uploading videos to the Street View Publish API as geo-referenced "photoSequences". These tools and samples are not an official Google project and come with no guarantee of ongoing support.

These tools should work on Mac and Linux, but have not been configured to work on Windows.

Public documentation for the Street View Publish API is available here: https://developers.google.com/streetview/publish/

Note that access to the photoSequence methods in the Street View Publish API is currently (March 2018) by invitation only.

Video upload tools

There are four upload utilities, each to demonstrate a different scenario:

  • basic_uploader : Demonstrates the most basic scenario of uploading a video where all geo-metadata is embedded inside the video file.

  • standalone_uploader : Demonstrates uploading a video that does not contain embedded geo-metadata, instead using a standalone GPX file alongside the video. Timestamps must be precisely synced down to the second for this to work properly and yield good results.

  • gopro_fusion_uploader : Demonstrates how to upload a stitched video from the GoPro Fusion. This tool also requires the unstitched video file from the front-facing camera, because the geo-metadata is not passed through during stitching and so we need to extract it from the unstitched file.

  • gopro_fusion_timelapse_uploader : Demonstrates how to upload a series of stills from the Timelapse mode in the GoPro Fusion. In this case we convert the stills into a single photoSequence so that we can also enable automatic blurring of faces and license plates, and connect all frames sequentially and automatically.

Example usage

  • python basic_uploader.py --video=VIDEO_0001.mp4 --blur --key=AbcdefgHijklmnopQrstuvWxyz

  • python standalone_uploader.py --video=VIDEO_0001.mp4 --gpx=tracks.gpx --time=1521201600 --blur --key=AbcdefgHijklmnopQrstuvWxyz

  • python gopro_fusion_uploader.py --video=VIDEO_0001.mov --front=GPFR0001.MP4 --blur --key=AbcdefgHijklmnopQrstuvWxyz

  • python gopro_fusion_timelapse_uploader.py --folder=frames --blur --compress --key=AbcdefgHijklmnopQrstuvWxyz

Configuring video upload tools

  1. Enable the Street View Publish API in the Google Cloud Platform Console. (https://support.google.com/cloud/answer/6158841)

  2. Set up OAuth 2.0 (https://support.google.com/cloud/answer/6158849)

  3. Click the download button to the right of your new OAuth credentials.

  4. Place the downloaded JSON file in the same directory as the video upload samples and rename it to streetviewpublish_config.json.

  5. Get a developer key for your Cloud project by going to APIs & Services > Credentials > Create Credentials > API Key. You'll need to include this key whenever you run the upload scripts.

  6. If additional dependencies are required, it will be documented in the individual upload utilities.

Other tools

In addition to the video upload samples, this repository contains lightweight tools that may help with publishing content under certain conditions.

  • exif2gpx : This utility takes a directory of JPEGs and converts the GPS metadata inside the EXIF tags of each JPEG into a single GPX file. This GPX file can then be passed to the video upload sample in this repository, or you can just look at it on a map (you can import GPX at mymaps.google.com) to visualize and validate the GPS data for an interval photo capture.

  • gopro_gps_sync : This utility corrects for issues with the GoPro Fusion Studio stitching software, where GPS data is not currently (March 2018) passed through correctly to stitched photos. The tool will take the GPS metadata from the EXIF of the original unstitched photos and inject it into the stitched photos.

Exiftool is required for these tools, you can get it here: https://www.sno.phy.queensu.ca/~phil/exiftool/install.html

FFmpeg is also required, but it may already be installed on your machine. If you do not have it, you can get it here: https://www.ffmpeg.org/

Changing authenticated user

If you want to publish to a different account, remove the saved credentials file and authenticate again:

rm ~/.credentials/streetviewpublish_credentials.json

samples-for-svpub's People

Contributors

kanhema avatar smarquardt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.