Installation Mac
We have 2 installation instruction sets:
    1.
    Pre-built binaries (recommended)
      Dependencies are prebuilt and stored on a server and downloaded by cmake using FetchContent feature
      To rebuild dependencies:
      1
      cd Sensor-Stream-Pipe/3rdparty
      2
      ./buid_mac_dep.sh
      Copied!
      This will download/build/install dependencies in a tmp directory. The result is a *_macdep.tar.gz file.
      We target macOS 10.11 and above by using MACOSX_DEPLOYMENT_TARGET="10.11"
        ffmpeg 4.3 as shared libraries without the GPL option. Path in the dylib is changed to use @rpath for easier linking.
        OpenCV 3.4.13 as a static library, only core, imgproc, imgcodecs and highgui modules are built.
        Cereal 1.3.0, header only
        spdlog 1.8.2, header only but built as static library for faster compile
        Zdepth (commit 9b333d9aec520 which includes a patch to generate zdepthConfig.cmake)
        yaml-cpp 0.6.3 as a static library
        libzmq 4.3.4 as a static library
        cppzmq 4.7.1, header only
    2.
    Downloading libraries and building
      This will provide download instructions for each library
Note: You will not be able to stream a connected Kinect on macOS.
Installation instructions do not include the Azure Kinect SDK as macOS is not yet supported by Azure Kinect SDK .
Problems?! (shocker)
Reach out on our discord and we will get you going!

Pre-built binaries installation (recommended)

1.0 Pre-Installation Requirements

1.1 Install Xcode​
1.2 Install Xcode command line tools
1
sudo xcode-select --install
Copied!
1.3 Install cmake
1
brew install cmake
Copied!

2.0 Download and Install SSP

2.1 Download and make SSP
1
git clone https://github.com/moetsi/Sensor-Stream-Pipe.git
2
cd Sensor-Stream-Pipe
3
mkdir build && cd build
4
cmake ..
5
make -j12
Copied!
h264_videotoolbox codec is used for hardware codec on macOS

3.0 Use it!

Now checkout Streaming a Video or Streaming a Dataset to see how you can stream local files with Sensor Stream Server to Sensor Stream Client.

Downloading libraries and building (manual)

Mac installation process was performed using vcpkg to install most dependencies. Tested on MacOS 11.01, Visual Studio Code 1.53.0.

1.0 Install vcpkg

1.1 Follow vcpkg installation instructions available here . The main vcpkg folder we will refer to as vcpkg root directory.
1.2 In your terminal window, change directories to the vcpkg root directory. Then run ./vcpkg integrate install to configure Visual Studio Code as well as automatically link.
The response should be something similar to:
1
Adams-MBP-2:vcpkg adammac$ ./vcpkg integrate install
2
Applied user-wide integration for this vcpkg root.
3
​
4
CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=/Users/adammac/dev/vcpkg-macos/vcpkg/scripts/buildsystems/vcpkg.cmake"
Copied!

2.0 Install dependencies

2.1 Install required packages for vcpkg to be able to install its dependencies
brew install libtool brew install nasm brew install pkg-config
(there may be more packages that you are requested to install with brew in addition to those listed above, vcpkg will let you know)
2.2 Install package to pull data for streaming datasets and videos
brew install wget

2.3 Install vcpkg dependencies

In your vcpkg root directory run the following:
1
./vcpkg install cereal cppzmq ffmpeg opencv3 spdlog yaml-cpp zeromq matroska libyuv libusb
Copied!
(Again, you might be prompted to install packages with homebrew)

3.0 Build and install remaining dependencies

3.1 In the code snippet below we install cmake (not necessary if already installed)
1
brew install cmake
Copied!

Zdepth

Zdepth is an encoder for depth frames. This library can be used to compress depth data.
3.2 Clone the Zdepth repo (in the snippet below it has been cloned to the home folder but it can be cloned anywhere).
1
cd ~
2
git clone https://github.com/catid/Zdepth.git
3
cd Zdepth
Copied!
3.3 Open CMakeLists.txt in Visual Studio Code and configure and build according to your desired profile (x64; Debug or Release) using CMake Tools then build.
Example of output of configuring Cmake in VSCode for Debug and building:
/usr/local/bin/cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++ -H/Users/adammac/dev/Zdepth -B/Users/adammac/dev/Zdepth/build -G "Unix Makefiles"(^ the paths above would change depending on where you cloned Zdepth, where you installed cmake, what compiler you chose, how you configured building, etc)
In VS Code, the above outputs to /build.
3.4 We now change to the build directory (or wherever cmake was pointed to), runmake and make install.
1
cd build
2
make
3
make install
Copied!
Example output of running make and make install:
1
Adams-MBP-2:build adammac$ make
2
Scanning dependencies of target zstd
3
[ 3%] Building C object zstd/CMakeFiles/zstd.dir/src/debug.c.o
4
[ 6%] Building C object zstd/CMakeFiles/zstd.dir/src/entropy_common.c.o
5
[ 10%] Building C object zstd/CMakeFiles/zstd.dir/src/error_private.c.o
6
[ 13%] Building C object zstd/CMakeFiles/zstd.dir/src/fse_compress.c.o
7
[ 17%] Building C object zstd/CMakeFiles/zstd.dir/src/fse_decompress.c.o
8
[ 20%] Building C object zstd/CMakeFiles/zstd.dir/src/hist.c.o
9
[ 24%] Building C object zstd/CMakeFiles/zstd.dir/src/huf_compress.c.o
10
[ 27%] Building C object zstd/CMakeFiles/zstd.dir/src/huf_decompress.c.o
11
[ 31%] Building C object zstd/CMakeFiles/zstd.dir/src/pool.c.o
12
[ 34%] Building C object zstd/CMakeFiles/zstd.dir/src/threading.c.o
13
[ 37%] Building C object zstd/CMakeFiles/zstd.dir/src/xxhash.c.o
14
[ 41%] Building C object zstd/CMakeFiles/zstd.dir/src/zstd_common.c.o
15
[ 44%] Building C object zstd/CMakeFiles/zstd.dir/src/zstd_compress.c.o
16
[ 48%] Building C object zstd/CMakeFiles/zstd.dir/src/zstd_compress_literals.c.o
17
[ 51%] Building C object zstd/CMakeFiles/zstd.dir/src/zstd_compress_sequences.c.o
18
[ 55%] Building C object zstd/CMakeFiles/zstd.dir/src/zstd_ddict.c.o
19
[ 58%] Building C object zstd/CMakeFiles/zstd.dir/src/zstd_decompress.c.o
20
[ 62%] Building C object zstd/CMakeFiles/zstd.dir/src/zstd_decompress_block.c.o
21
[ 65%] Building C object zstd/CMakeFiles/zstd.dir/src/zstd_double_fast.c.o
22
[ 68%] Building C object zstd/CMakeFiles/zstd.dir/src/zstd_fast.c.o
23
[ 72%] Building C object zstd/CMakeFiles/zstd.dir/src/zstd_lazy.c.o
24
[ 75%] Building C object zstd/CMakeFiles/zstd.dir/src/zstd_ldm.c.o
25
[ 79%] Building C object zstd/CMakeFiles/zstd.dir/src/zstd_opt.c.o
26
[ 82%] Building C object zstd/CMakeFiles/zstd.dir/src/zstdmt_compress.c.o
27
[ 86%] Linking C static library libzstd.a
28
[ 86%] Built target zstd
29
Scanning dependencies of target zdepth
30
[ 89%] Building CXX object CMakeFiles/zdepth.dir/src/zdepth.cpp.o
31
[ 93%] Linking CXX static library libzdepth.a
32
[ 93%] Built target zdepth
33
Scanning dependencies of target zdepth_test
34
[ 96%] Building CXX object CMakeFiles/zdepth_test.dir/tests/zdepth_test.cpp.o
35
/Users/adammac/dev/Zdepth/tests/zdepth_test.cpp:179:10: warning: unused variable 'buffer' [-Wunused-variable]
36
int *buffer = pBuffer = (int*)input;
37
^
38
/Users/adammac/dev/Zdepth/tests/zdepth_test.cpp:245:23: warning: comparison of integers of different signs: 'int' and
39
'std::__1::vector<unsigned short, std::__1::allocator<unsigned short> >::size_type' (aka 'unsigned long')
40
[-Wsign-compare]
41
for (int i = 0; i < depth.size(); ++i) {
42
~ ^ ~~~~~~~~~~~~
43
/Users/adammac/dev/Zdepth/tests/zdepth_test.cpp:282:23: warning: comparison of integers of different signs: 'int' and
44
'std::__1::vector<unsigned short, std::__1::allocator<unsigned short> >::size_type' (aka 'unsigned long')
45
[-Wsign-compare]
46
for (int i = 0; i < depth.size(); ++i) {
47
~ ^ ~~~~~~~~~~~~
48
3 warnings generated.
49
[100%] Linking CXX executable zdepth_test
50
[100%] Built target zdepth_test
51
Adams-MBP-2:build adammac$ make install
52
[ 86%] Built target zstd
53
[ 93%] Built target zdepth
54
[100%] Built target zdepth_test
55
Install the project...
56
-- Install configuration: "Debug"
57
-- Installing: /usr/local/LICENSE
58
CMake Error at cmake_install.cmake:49 (file):
59
file INSTALL cannot copy file "/Users/adammac/dev/Zdepth/LICENSE" to
60
"/usr/local/LICENSE": Permission denied.
61
​
62
​
63
make: *** [install] Error 1
64
Adams-MBP-2:build adammac$ sudo make install
65
Password:
66
[ 86%] Built target zstd
67
[ 93%] Built target zdepth
68
[100%] Built target zdepth_test
69
Install the project...
70
-- Install configuration: "Debug"
71
-- Installing: /usr/local/LICENSE
72
-- Installing: /usr/local/README.md
73
-- Installing: /usr/local/cmake
74
-- Installing: /usr/local/cmake/zdepth-config.cmake
75
-- Installing: /usr/local/cmake/zdepth-config-version.cmake
76
-- Up-to-date: /usr/local/include
77
-- Installing: /usr/local/include/zdepth.hpp
78
-- Installing: /usr/local/lib/libzdepth.a
79
-- Installing: /usr/local/lib/libzstd.a
Copied!

4.0 Building Sensor Stream Pipe

4.1 Clone the SSP repo
1
git clone https://github.com/moetsi/Sensor-Stream-Pipe.git
Copied!
Due to the differences in the build process, the MacOS CMake file is named CMakeListsMacOS.txt at the root of the SSP repo. Thus, you should:
    4.2 Delete CMakeLists.txt
    4.3 Rename CMakeListsMacOS.txt to CMakeLists.txt.
    4.4 Open CMakeLists.txt in VS
    4.5 Update
      the include ("C://Users//Andre//source//repos//vcpkg//installed//x64-windows//include")
      and link paths ("C://Users//Andre//source//repos//vcpkg//installed//x64-windows//lib")
      To follow the same path of where you cloned vcpkg in Step 1
4.6 Now we can build Sensor Stream Pipe. In /Sensor-Stream-Pipe run the following commands in terminal:
1
mkdir build
2
cd build
3
cmake .. -DCMAKE_TOOLCHAIN_FILE=/Users/adammac/dev/vcpkg-macos/vcpkg/scripts/buildsystems/vcpkg.cmake -DSSP_WITH_KINECT_SUPPORT=OFF -DSSP_WITH_K4A_BODYTRACK=OFF -DSSP_WITH_NVPIPE_SUPPORT=OFF
4
make
Copied!

5.0 Use it!

Now checkout Streaming a Video or Streaming a Dataset to see how you can stream local files with Sensor Stream Server to Sensor Stream Client.
Last modified 3mo ago