• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Build instructions
2
3## Prerequisites for building the encoder
4
5### All platforms
6
7-   Bazelisk: `iamf-tools` uses the Bazel build system, via bazelisk. See
8    [Bazelisk installation instructions](https://bazel.build/install/bazelisk).
9    For further information on Bazel, see
10    [Getting started](https://bazel.build/start).
11-   CMake: required to build some dependencies. See CMake's
12    [Download](https://cmake.org/download/) page to install.
13-   Clang 13+ or GCC 10+ for Linux-like systems or MSVC for Windows.
14
15### Additional Windows prerequisites
16
17Windows requires some additional prerequisites:
18
19-   MSYS32: See [msys2.org](https://www.msys2.org/) for installation
20    instructions.
21-   MSCV: Follow Bazel's
22    [Build on Windows](https://bazel.build/configure/windows) for installation
23    instructions.
24-   Address
25    [long path issues](https://bazel.build/configure/windows#long-path-issues)
26    by adding the following to `iamf-tools/.bazelrc` or another
27    [custom .bazelrc](https://bazel.build/run/bazelrc) file:
28
29    `startup --output_user_root=C:/tmp`
30
31## Building the encoder
32
33Building the encoder binary:
34
35```
36bazelisk build -c opt //iamf/cli:encoder_main
37```
38
39Running built-in tests:
40
41```
42bazelisk test -c opt //iamf/...
43```
44
45## Test suite
46
47[iamf/cli/testdata](../iamf/cli/testdata) covers a wide variety of IAMF
48features. These samples can be used as encoder input. After encoding the
49resultant `.iamf` files can be used to assist in testing or debugging an
50IAMF-compliant decoder.
51
52See the separate [README.md](../iamf/cli/testdata/README.md) for further
53documentation.
54
55## Folder structure
56
57*   `<root>` - Project-level files like the license, README (this file), and
58    BUILD files.
59*   `iamf/`
60    *   `common/` - Common utility files.
61        *   `tests/` - Unit tests for files under `common/`.
62    *   `cli/` - Files related to the command line interface (CLI) to generate
63        and write an IA Sequence.
64        *   `adm_to_user_metadata/` - Components to convert ADM files to
65            protocol buffers which can be used for input to the encoder.
66        *   `codec/` - Files that encode or decode substreams with
67            codec-specific libraries.
68            *   `tests/` - Unit tests for files under `codec/`.
69        *   `obu_to_proto/` - Components to convert classes under `iamf/obu` to
70            protocol buffers.
71        *   `proto/` - [Protocol buffers](https://protobuf.dev/) defining the
72            data scheme for the input files under `iamf/cli/testdata/` or
73            user-created ones.
74        *   `proto_to_obu/` - Components to convert protocol buffers to classes
75            under `iamf/obu`.
76        *   `testdata/` - Sample input files to the encoder. See also
77            [Test Suite](#Test-Suite).
78        *   `tests/` - Unit tests for files under `iamf/cli/`.
79        *   `user_metadata_builder/` - Files to help build a `UserMetadata`.
80    *   `obu/` - Files relating to IAMF Open Bitstream Units (OBU)s.
81        *   `decoder_config/` - Files relating codec-specific decoder configs.
82            *   `tests/` - Unit tests for files under `decoder_config/`.
83        *   `tests/` - Unit tests for files under `obu/`.
84*   `external/` - Custom `*.BUILD` files for external dependencies.
85*   `docs/` - Documentation.
86
87## Contributing
88
89If you have improvements or fixes, we would love to have your contributions. See
90[CONTRIBUTING.md](../CONTRIBUTING.md) for details.
91