|
1 | 1 | Python Client for Google Cloud Video Intelligence |
2 | 2 | ================================================= |
3 | 3 |
|
4 | | - Python idiomatic client for `Google Cloud Video Intelligence`_ |
| 4 | +|pypi| |versions| |
5 | 5 |
|
6 | | -.. _Google Cloud Video Intelligence: https://cloud.google.com/video-intelligence/ |
| 6 | +`Google Cloud Video Intelligence`_ API makes videos searchable, and |
| 7 | +discoverable, by extracting metadata with an easy to use API. |
| 8 | +You can now search every moment of every video file in your catalog |
| 9 | +and find every occurrence as well as its significance. It quickly |
| 10 | +annotates videos stored in `Google Cloud Storage`_, and helps you |
| 11 | +identify key nouns entities of your video, and when they occur |
| 12 | +within the video. Separate signal from noise, by retrieving |
| 13 | +relevant information at the video, shot or per frame. |
7 | 14 |
|
8 | | -|pypi| |versions| |
| 15 | +- `Client Library Documentation`_ |
| 16 | +- `Product Documentation`_ |
| 17 | + |
| 18 | +.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-videointelligence.svg |
| 19 | + :target: https://pypi.org/project/google-cloud-videointelligence/ |
| 20 | +.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-videointelligence.svg |
| 21 | + :target: https://pypi.org/project/google-cloud-videointelligence/ |
| 22 | +.. _Google Cloud Video Intelligence: https://cloud.google.com/video-intelligence/ |
| 23 | +.. _Google Cloud Storage: https://cloud.google.com/storage/ |
| 24 | +.. _Client Library Documentation: https://googlecloudplatform.github.io/google-cloud-python/latest/datastore/index.html |
| 25 | +.. _Product Documentation: https://cloud.google.com/video-intelligence/docs/ |
9 | 26 |
|
10 | 27 | Quick Start |
11 | 28 | ----------- |
12 | 29 |
|
13 | | -.. code-block:: console |
| 30 | +In order to use this library, you first need to go through the following steps: |
14 | 31 |
|
15 | | - $ pip install --upgrade google-cloud-videointelligence |
| 32 | +1. `Select or create a Cloud Platform project.`_ |
| 33 | +2. `Enable billing for your project.`_ |
| 34 | +3. `Enable the Google Cloud Video Intelligence API.`_ |
| 35 | +4. `Setup Authentication.`_ |
16 | 36 |
|
17 | | -For more information on setting up your Python development environment, |
18 | | -such as installing ``pip`` and ``virtualenv`` on your system, please refer |
19 | | -to `Python Development Environment Setup Guide`_ for Google Cloud Platform. |
| 37 | +.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project |
| 38 | +.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project |
| 39 | +.. _Enable the Google Cloud Video Intelligence API.: https://cloud.google.com/datastore |
| 40 | +.. _Setup Authentication.: https://googlecloudplatform.github.io/google-cloud-python/latest/core/auth.html |
20 | 41 |
|
21 | | -.. _Python Development Environment Setup Guide: https://cloud.google.com/python/setup |
| 42 | +Installation |
| 43 | +~~~~~~~~~~~~ |
22 | 44 |
|
23 | | -Authentication |
24 | | --------------- |
| 45 | +Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to |
| 46 | +create isolated Python environments. The basic problem it addresses is one of |
| 47 | +dependencies and versions, and indirectly permissions. |
25 | 48 |
|
26 | | -With ``google-cloud-python`` we try to make authentication as painless as |
27 | | -possible. Check out the `Authentication section`_ in our documentation to |
28 | | -learn more. You may also find the `authentication document`_ shared by all |
29 | | -the ``google-cloud-*`` libraries to be helpful. |
| 49 | +With `virtualenv`_, it's possible to install this library without needing system |
| 50 | +install permissions, and without clashing with the installed system |
| 51 | +dependencies. |
30 | 52 |
|
31 | | -.. _Authentication section: https://google-cloud-python.readthedocs.io/en/latest/core/auth.html |
32 | | -.. _authentication document: https://github.com/GoogleCloudPlatform/google-cloud-common/tree/master/authentication |
| 53 | +.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/ |
33 | 54 |
|
34 | | -Using the API |
35 | | -------------- |
| 55 | +Mac/Linux |
| 56 | +^^^^^^^^^ |
36 | 57 |
|
37 | | -The Google Cloud `Video Intelligence`_ (`Video Intelligence API docs`_) |
38 | | -API enables developers to |
39 | | -understand the content of a video by encapsulating powerful machine |
40 | | -learning models in an easy to use REST API. |
| 58 | +.. code-block:: console |
41 | 59 |
|
42 | | -.. _Video Intelligence: https://cloud.google.com/video-intelligence/ |
43 | | -.. _Video Intelligence API docs: https://cloud.google.com/video-intelligence/docs/reference/rest/ |
| 60 | + pip install virtualenv |
| 61 | + virtualenv <your-env> |
| 62 | + source <your-env>/bin/activate |
| 63 | + <your-env>/bin/pip install google-cloud-datastore |
44 | 64 |
|
45 | | -.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-videointelligence.svg |
46 | | - :target: https://pypi.org/project/google-cloud-videointelligence/ |
47 | | -.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-videointelligence.svg |
48 | | - :target: https://pypi.org/project/google-cloud-videointelligence/ |
| 65 | +Windows |
| 66 | +^^^^^^^ |
| 67 | + |
| 68 | +.. code-block:: console |
| 69 | +
|
| 70 | + pip install virtualenv |
| 71 | + virtualenv <your-env> |
| 72 | + <your-env>\Scripts\activate |
| 73 | + <your-env>\Scripts\pip.exe install google-cloud-datastore |
| 74 | +
|
| 75 | +Example Usage |
| 76 | +~~~~~~~~~~~~~ |
| 77 | + |
| 78 | +.. code-block:: python |
| 79 | +
|
| 80 | + from google.cloud import videointelligence |
| 81 | + |
| 82 | + client = videointelligence.VideoIntelligenceServiceClient() |
| 83 | + job = client.annotate_video( |
| 84 | + input_uri='gs://<bucket-name>/my_video.mp4', |
| 85 | + features=['LABEL_DETECTION', 'SHOT_CHANGE_DETECTION'], |
| 86 | + ) |
| 87 | + result = job.result() |
| 88 | +
|
| 89 | +Next Steps |
| 90 | +~~~~~~~~~~ |
| 91 | + |
| 92 | +- Read the `Client Library Documentation`_ for Google Cloud Video Intelligence |
| 93 | + API to see other available methods on the client. |
| 94 | +- Read the `Product documentation`_ to learn |
| 95 | + more about the product and see How-to Guides. |
0 commit comments