oncvideo


Nameoncvideo JSON
Version 1.3.6 PyPI version JSON
download
home_pageNone
SummaryA collection of commands to help get archived videos from Oceans 3.
upload_time2024-10-19 00:18:21
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2021 Paulo Correa Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ONCvideo

A collection of commands to help get archived videos from Oceans 3.

Avaiable commands include:

* list - List video files for a specific camera between two dates
* blist - List video files based on parameters stored in a csv file
* getDives - Create a csv file listing dives from Oceans3.0
* info - Extract video information (duration, resolution, fps)
* didson - Extract information of DIDSON files
* download - Download video files
* tomp4 - Convert video to mp4 format
* extframe - Extract frames from video files
* extfov - Extract FOVs (frames or videos) from video files
* make_timelapse - Generate timelapse video from images
* downloadTS - Download time series data
* mergeTS - Merge time series data based on the closest timestamps
* downloadST - Download video from Seatube link
* linkST - Generate link video from Seatube
* renameST - Rename framegrabs from Seatube to correct timestamp

## Installation
```
pip install oncvideo
```
> Before using `ONCvideo`, FFmpeg must be installed and accessible via the `$PATH` environment variable.
Check https://ffmpeg.org/download.html on details how to install, or use your package manager of choice (e.g. `sudo apt install ffmpeg` on Debian/Ubuntu, `brew install ffmpeg` on OS X, `winget install ffmpeg` on Windows).

## Getting started
The package provides multiple commands to get a list of available videos in our archives and perform multiple operations with the videos (e.g. downloading, extracting frames, etc).

In most use cases, you will use commands `list` or `blist` to get a list of files based on your search criteria. This will generate a csv file that you can use in R, Python or Excel to check the availability of data, remove bad files (size or duration too small) or filter files based a criteria that you want. For example, you may want to filter one file every day/week/month and download these videos to check its quality throughout your time range. For example:

```
oncvideo list -t API_TOKEN -lc BACAX -from 2018-01-01 -to “2024-05-01 04:00:00”
```
- API_TOKEN: this is your API_TOKEN. You can obtain one logging in https://data.oceannetworks.ca > Profile > Web Service API
- BACAX: that is the location code for Barkley Axis. An easy way to find the location code is to select the site you want in the Data Search (https://data.oceannetworks.ca/DataSearch) and check in the URL the value after *locationCode=*
- 2018 and “2024-05-01 04:00:00” is the time range that you can specify the search. Note the quotes when you have space.

You can also use -h to see a list of possible arguments for each subcommand:
```
oncvideo list -h
```

`list` can also get videos based on deviceID or deviceCode, or based on dives number (for ROVs only). Check `blist` in case you need to perform multiple searchs for a giver project (e.g. multiple surveys of ROV dives, a given month at different sites).

After filtering the csv file, you can use other commands. E.g. to extract frames:
```
oncvideo extfov FILTERED.csv -s 00:30,01:45,02:30
```
- FILTERED.csv is the name of your csv file
- 00:30,01:45,02:30 are the timestamps to extract frames (you can separate multiple with comma). **Alternatively**, you can create a column named `fovs` and put timestamps in that column. The advantage is that you can use different timestamps for different times/periods, as different deployments may have different schedules for the cameras.

If you are interested, you can create a video time-lapse based on the frames that your extracted using the subcommand `timelapse`.


## Docs

Documentation for functions in the package is avaiable at https://correapvf.github.io/oncvideo.
After installation, use `oncvideo -h` to get help and a list of available commands avaiable as well.

See also [tests](tests) folder for exemples of *.csv* files that can be used with the *blist*/*list_file_batch* command/function.


## Setting API key

If you use the commands often, it may get boring to type the API key every time. You can create an enviroment variable in your OS named `ONC_API_TOKEN` and store your API key there. The package will automatically get the API key and you don't need to provide as an argument.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "oncvideo",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Paulo Correa <pcorrea@oceannetworks.ca>",
    "download_url": "https://files.pythonhosted.org/packages/3f/f1/fdad566f79af3286a61d245dc8210ba1b9fd0965afa5b9b43bb016dacd3c/oncvideo-1.3.6.tar.gz",
    "platform": null,
    "description": "# ONCvideo\r\n\r\nA collection of commands to help get archived videos from Oceans 3.\r\n\r\nAvaiable commands include:\r\n\r\n* list - List video files for a specific camera between two dates\r\n* blist - List video files based on parameters stored in a csv file\r\n* getDives - Create a csv file listing dives from Oceans3.0\r\n* info - Extract video information (duration, resolution, fps)\r\n* didson - Extract information of DIDSON files\r\n* download - Download video files\r\n* tomp4 - Convert video to mp4 format\r\n* extframe - Extract frames from video files\r\n* extfov - Extract FOVs (frames or videos) from video files\r\n* make_timelapse - Generate timelapse video from images\r\n* downloadTS - Download time series data\r\n* mergeTS - Merge time series data based on the closest timestamps\r\n* downloadST - Download video from Seatube link\r\n* linkST - Generate link video from Seatube\r\n* renameST - Rename framegrabs from Seatube to correct timestamp\r\n\r\n## Installation\r\n```\r\npip install oncvideo\r\n```\r\n> Before using `ONCvideo`, FFmpeg must be installed and accessible via the `$PATH` environment variable.\r\nCheck https://ffmpeg.org/download.html on details how to install, or use your package manager of choice (e.g. `sudo apt install ffmpeg` on Debian/Ubuntu, `brew install ffmpeg` on OS X, `winget install ffmpeg` on Windows).\r\n\r\n## Getting started\r\nThe package provides multiple commands to get a list of available videos in our archives and perform multiple operations with the videos (e.g. downloading, extracting frames, etc).\r\n\r\nIn most use cases, you will use commands `list` or `blist` to get a list of files based on your search criteria. This will generate a csv file that you can use in R, Python or Excel to check the availability of data, remove bad files (size or duration too small) or filter files based a criteria that you want. For example, you may want to filter one file every day/week/month and download these videos to check its quality throughout your time range. For example:\r\n\r\n```\r\noncvideo list -t API_TOKEN -lc BACAX -from 2018-01-01 -to \u201c2024-05-01 04:00:00\u201d\r\n```\r\n- API_TOKEN: this is your API_TOKEN. You can obtain one logging in https://data.oceannetworks.ca > Profile > Web Service API\r\n- BACAX: that is the location code for Barkley Axis. An easy way to find the location code is to select the site you want in the Data Search (https://data.oceannetworks.ca/DataSearch) and check in the URL the value after *locationCode=*\r\n- 2018 and \u201c2024-05-01 04:00:00\u201d is the time range that you can specify the search. Note the quotes when you have space.\r\n\r\nYou can also use -h to see a list of possible arguments for each subcommand:\r\n```\r\noncvideo list -h\r\n```\r\n\r\n`list` can also get videos based on deviceID or deviceCode, or based on dives number (for ROVs only). Check `blist` in case you need to perform multiple searchs for a giver project (e.g. multiple surveys of ROV dives, a given month at different sites).\r\n\r\nAfter filtering the csv file, you can use other commands. E.g. to extract frames:\r\n```\r\noncvideo extfov FILTERED.csv -s 00:30,01:45,02:30\r\n```\r\n- FILTERED.csv is the name of your csv file\r\n- 00:30,01:45,02:30 are the timestamps to extract frames (you can separate multiple with comma). **Alternatively**, you can create a column named `fovs` and put timestamps in that column. The advantage is that you can use different timestamps for different times/periods, as different deployments may have different schedules for the cameras.\r\n\r\nIf you are interested, you can create a video time-lapse based on the frames that your extracted using the subcommand `timelapse`.\r\n\r\n\r\n## Docs\r\n\r\nDocumentation for functions in the package is avaiable at https://correapvf.github.io/oncvideo.\r\nAfter installation, use `oncvideo -h` to get help and a list of available commands avaiable as well.\r\n\r\nSee also [tests](tests) folder for exemples of *.csv* files that can be used with the *blist*/*list_file_batch* command/function.\r\n\r\n\r\n## Setting API key\r\n\r\nIf you use the commands often, it may get boring to type the API key every time. You can create an enviroment variable in your OS named `ONC_API_TOKEN` and store your API key there. The package will automatically get the API key and you don't need to provide as an argument.\r\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2021 Paulo Correa  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "A collection of commands to help get archived videos from Oceans 3.",
    "version": "1.3.6",
    "project_urls": {
        "Repository": "https://github.com/correapvf/oncvideo"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "047f930e1047ffc13a5da9d55c03a622d6812320a331df22a00c720d83e6ffd0",
                "md5": "1a78be2c0a1ca84b33e06074f6ee8472",
                "sha256": "1451f0e384cbc6b91bcbb26ac152a9a4e32a6a068a1553e16de50b1e5a23fd7f"
            },
            "downloads": -1,
            "filename": "oncvideo-1.3.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1a78be2c0a1ca84b33e06074f6ee8472",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 44142,
            "upload_time": "2024-10-19T00:18:19",
            "upload_time_iso_8601": "2024-10-19T00:18:19.241064Z",
            "url": "https://files.pythonhosted.org/packages/04/7f/930e1047ffc13a5da9d55c03a622d6812320a331df22a00c720d83e6ffd0/oncvideo-1.3.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3ff1fdad566f79af3286a61d245dc8210ba1b9fd0965afa5b9b43bb016dacd3c",
                "md5": "4ab3a736ef5dcf40ace5d112be98fd50",
                "sha256": "d0b499cdd58ea50379092401dba0e62cf361b4e2f67b7659d0f8247e8fb43ef5"
            },
            "downloads": -1,
            "filename": "oncvideo-1.3.6.tar.gz",
            "has_sig": false,
            "md5_digest": "4ab3a736ef5dcf40ace5d112be98fd50",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 42537,
            "upload_time": "2024-10-19T00:18:21",
            "upload_time_iso_8601": "2024-10-19T00:18:21.177871Z",
            "url": "https://files.pythonhosted.org/packages/3f/f1/fdad566f79af3286a61d245dc8210ba1b9fd0965afa5b9b43bb016dacd3c/oncvideo-1.3.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-19 00:18:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "correapvf",
    "github_project": "oncvideo",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "oncvideo"
}
        
Elapsed time: 0.76164s