GithubHelp home page GithubHelp logo

mediaq-clipy's Introduction

Requirements.

Python 2.7 and later.

Installation

You can install the bindings via Setuptools.

python setup.py install

Or you can install from Github via pip:

pip install git+https://github.com/ubriela/mediaq-clipy.git

Tutorial

To use the bindings, import the pacakge:

import SwaggerMediaq as sm

Create geoq client api

geoq = sm.GeoqApi(sm.ApiClient("http://mediaq.usc.edu/MediaQ_MVC_V3/api"))

Returns a set of video locations in GEOJSON format (small sample data)

print geoq.sample_videos()
# http://mediaq.usc.edu/MediaQ_MVC_V3/api/geoq/sample_videos

Returns a set of video frames (of a particular video) in GEOJSON format (small sample data)

print geoq.sample_fovs()
# http://mediaq.usc.edu/MediaQ_MVC_V3/api/geoq/sample_fovs

Create geoq client with API key, replace KEY_VALUE by actual one

geoq = sm.GeoqApi(sm.ApiClient("http://mediaq.usc.edu/MediaQ_MVC_V3/api", "X-API-KEY", "KEY_VALUE"))

Returns a set of video locations

print geoq.rectangle_query(swlat=34.019972,swlng=-118.291588,nelat=34.021111,nelng=-118.287125)
# http://mediaq.usc.edu/MediaQ_MVC_V3/api/geoq/rectangle_query?swlat=34.019972&swlng=-118.291588&nelat=34.021111&nelng=-118.287125&X-API-KEY=REAL_KEY

Returns a set of video frames

print geoq.video_metadata("sydzjysc7s36_2014_4_15_Videotake_1397518537455.mp4")
# http://mediaq.usc.edu/MediaQ_MVC_V3/api/geoq/video_metadata?videoid=sydzjysc7s36_2014_4_15_Videotake_1397518537455.mp4&X-API-KEY=REAL_KEY

Test

You can download test file here ./test/geoq_test.py

mediaq-clipy's People

Contributors

ubriela avatar

Watchers

 avatar  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.