README.md 4.53 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# Documentation - AVI Reader

## Description

This _adtffileplugin_ provides the functionality to import an _avi file_ as video stream to an _adtfdat file_ using [OpenCV](https://opencv.org/).

## Restrictions

It will work for _avi files_.

## Requirements

To compile the [source code](https://git.digitalwerk.net/adtf3_open_source/adtffileplugins/readers/avi_reader) following packages are required:

Florian Roth committed
15
- [ADTF File Library (IFHD) 0.6.1](https://artifactory.digitalwerk.net/ui/repos/tree/General/dw-developer-sdk/dw/ifhd/0.6.1/stable/0/package)
Florian Roth committed
16 17 18
  - [a_util Library 5.6.0](https://artifactory.digitalwerk.net/ui/repos/tree/General/dw-developer-sdk/dw/a_util/5.6.0/stable/0/package)
  - [DDL Library 4.4.0](https://artifactory.digitalwerk.net/ui/repos/tree/General/dw-developer-sdk/dw/ddl/4.4.0/stable/0/package)
- [OpenCV 4.1.0](https://artifactory.digitalwerk.net/ui/repos/tree/General/dw-developer-sdk/dw/OpenCV/4.1.0/stable/0/package)
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33

> :bulb: It may work with other versions as well, but it has been only tested with the requirements mentioned above.

All dependencies are available in our [artifactory](https://artifactory.digitalwerk.net/).
We recommend using conan:

- [conan recipe](scripts/conan/conan-build-file.py)

## Precompiled binaries

Compiling the source code is not required, the binaries are also available in our [artifactory](https://artifactory.digitalwerk.net/).
We recommend using conan, please search for package **avi_reader/\<VERSION\>@dw/stable** in remote **dw-community-releases**.

> :bulb: You can also use the current master (*avi_reader/master@dw/nightly*) but please keep in mind that it might not be full tested so far. It is available for development, proof-of-concepts and previews but we do not recommend including it in a productive project, product or toolchain!

Florian Roth committed
34 35
For non-conan users, please download the binaries manually from [Community-Releases](https://artifactory.digitalwerk.net/ui/repos/tree/General/Community-Releases):
> :floppy_disk: [AVI-Reader](https://artifactory.digitalwerk.net/ui/repos/tree/General/Community-Releases/AVI-Reader)
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77

## Usage

This guide covers the usage with [adtf_dattool](https://support.digitalwerk.net/adtf/v3/guides/tools_3rdparty_adtf_dattool.html) from [ADTF File Library (IFHD)](https://support.digitalwerk.net/adtf_libraries/adtf-file-library/v0/html/index.html) which is delivered standalone (see [Requirements](#Requirements)) or as part of ADTF (*\<ADTF_DIR\>/pkg/adtf_file*).

> :bulb: All required OpenCV dependencies are part of the binary package. Before your first call of *adtf_dattool* in combination with the *avi reader* make sure your system will find the required OpenCV libraries. For your convenience there is a script in the binary root folder. We also recommend calling the script in the same shell as the *adtf_dattool* call to prevent setting the library path permanently on your system.

In this example we will create a new *import_video.adtfdat* and import a video stream from *some_video.avi*.

We have to extend the _--create_ call with the *avi_reader.adtffileplugin* to make the _avi_ reader available to use as _--readerid_.

This results in following call:

    adtf_dattool --plugin avi_reader.adtffileplugin --create import_video.adtfdat --input some_video.avi --readerid avi

> :bulb: Make sure to use the same build type for executable and plugin: Each will have a d-postfix (adtf_dattoold, avi_readerd.adtffileplugin) for build type Debug!

The reader provides an option to define the stream name (default is VIDEO).
To set a custom stream name you have to extend your call with *--property stream_name=\<name\>* after the *readerid*, for example

    adtf_dattool --plugin avi_reader.adtffileplugin --create import_video.adtfdat --input some_video.avi --readerid avi --property stream_name=avi_import_stream

to create a _adtfdat file_ and set *avi_import_stream*  as stream name for the imported _avi file_.

## License

This product is licensed under [Mozilla Public License Version 2.0](LICENSE.md)

## 3rd Party Licenses

- ADTF File Library:
  - [Mozilla Public License Version 2.0](doc/licenses/adtf_file_license.md)
  - [Link](https://github.com/audi/adtf_file/blob/v0.6.0/LICENSE)
- a_util Library:
  - [Mozilla Public License Version 2.0](doc/licenses/a_util_license.md)
  - [Link](https://github.com/audi/a_util/blob/v5.6.0/LICENSE)
- DDL Library:
  - [Mozilla Public License Version 2.0](doc/licenses/ddl_license.md)
  - [Link](https://github.com/audi/ddl/blob/v4.4.0/LICENSE)
- OpenCV:
  - [3-clause BSD License](doc/licenses/opencv_license.md)
  - [Link](https://github.com/opencv/opencv/blob/4.1.0/LICENSE)