Building OpenRV on macOS with DNxHD support

Assumptions:

Apple Silicon/arm64 Architecture – build machine has M4 CPU
macOS Sequoia 15.6.1
All builds to be done in $HOME/src. If that folder doesn’t exist:
mkdir ~/src; cd ~/src

Basics:

  1. Xcode 16.4, download from Apple App Store
    Install Xcode command line tools – xcode-select —install
  2. Qt 6.5.3 – Download the installer from https://my.qt.io/download, you’ll need an account to do this, then enable “Archive” to install this version
  3. Homebrew
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    brew update
  4. Install Homebrew dependencies
    brew install ninja readline sqlite3 xz zlib tcl-tk@8 autoconf automake libtool python@3.11 yasm clang-format black meson nasm pkg-config glew wget yaml-cpp pystring ptex freetype dcmtk qt@5 python@3.11
  5. Install an older version of cmake
    cd ~/Downloads; wget https://github.com/Kitware/CMake/releases/download/v3.31.7/cmake-3.31.7-macos-universal.dmg; open ./cmake-3.31.7-macos-universal.dmg
  6. Drag and drop the CMake icon to the Applications folder, then install cmake to /usr/local/bin
    sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install=/usr/local/bin

First library version mismatch: yaml-cpp

brew unlink yaml-cpp
mkdir -p /opt/homebrew/Cellar/yaml-cpp/0.7.0-static
cd ~/src
git clone https://github.com/jbeder/yaml-cpp.git
cd yaml-cpp
git checkout 0.7.0
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/homebrew/Cellar/yaml-cpp/0.7.0-static -DBUILD_SHARED_LIBS=OFF -DYAML_CPP_BUILD_TESTS=OFF -DYAML_CPP_BUILD_TOOLS=OFF
cmake --build build -j
sudo cmake —install build
sudo ln -sfn /opt/homebrew/Cellar/yaml-cpp/0.7.0-static /opt/homebrew/opt/yaml-cpp

Second library version mismatch: fmt

brew unlink fmt
mkdir -p /opt/homebrew/Cellar/fmt/9.1.0
cd ~/src
curl -LO https://github.com/fmtlib/fmt/archive/refs/tags/9.1.0.tar.gz
tar xzf 9.1.0.tar.gz
cd fmt-9.1.0
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/homebrew/Cellar/fmt/9.1.0 -DBUILD_SHARED_LIBS=ON -DFMT_TEST=OFF -DFMT_DOC=OFF
cmake --build build -j
sudo cmake --install build
ln -sfn /opt/homebrew/Cellar/fmt/9.1.0 /opt/homebrew/opt/fmt

Building RV:

  1. Download the source code
    git clone --recursive https://github.com/AcademySoftwareFoundation/OpenRV.git
    cd OpenRV
  2. Make sure the build knows about Qt 5
    export Qt5_ROOT="$(brew --prefix qt@5)"
  3. Make sure that we are using the right VFX platform
    export RV_VFX_PLATFORM=CY2024
  4. Initialize the RV build command aliases
    source rvcmds.sh
  5. Make and load the Python 3.11 virtual environment
    python3.11 -m venv .venv
    source .venv/bin/activate
  6. Upgrade pip to the latest version
    pip install --upgrade pip
  7. Setup RV
    rvsetup
  8. Configure RV with support for DNxHD
    rvcfg -DRV_FFMPEG_NON_FREE_DECODERS_TO_ENABLE="dnxhd" -DRV_FFMPEG_NON_FREE_ENCODERS_TO_ENABLE="dnxhd" -DCMAKE_PREFIX_PATH="/opt/homebrew/opt/yaml-cpp:$(brew --prefix pystring):/opt/homebrew/opt/fmt"
  9. Build RV
    rvbuild
  10. Install RV – just makes the RV.app package for macOS
    rvinst
  11. Test it, to make sure it works
    cd _install; open RV.app

Extras/Installer Package:

  1. Install create-dmg
    brew install create-dmg
  2. Build the installer package – sign with your Apple Developer ID certificate if you have one
    create-dmg --volname "RV Installer" --window-pos 200 120 --window-size 600 400 --icon-size 100 --icon "RV.app" 175 190 --hide-extension "RV.app" --app-drop-link 425 190 --codesign "Developer ID Application: Alan Smithee Films Inc. (1234567890A)" ~/src/OpenRV-v3.0.0-arm64-Installer.dmg RV.app

Setting up a RTMP Server on a RPi

Setting up an RTMP (Real-Time Messaging Protocol) streaming server on a Raspberry Pi can be done using a software package like NGINX with the RTMP module. Here’s a step-by-step guide to get you started:

Requirements:

  • A Raspberry Pi (preferably a 3B, 3B+, or 4 for better performance)
  • Raspbian or Raspberry Pi OS installed
  • Internet connection

Step 1: Update Your System

Open a terminal and update your system packages:

sudo apt update
sudo apt upgrade -y

Step 2: Install Dependencies

You need to install the required dependencies to build NGINX from source:

sudo apt install -y build-essential libpcre3 libpcre3-dev libssl-dev zlib1g-dev libpcre3 libpcre3-dev openssl libssl-dev

Step 3: Download NGINX and the RTMP Module

You will need to download both NGINX and the RTMP module:

cd ~
wget http://nginx.org/download/nginx-1.25.2.tar.gz
wget https://github.com/arut/nginx-rtmp-module/archive/refs/heads/master.zip

Unpack the files:

tar -zxvf nginx-1.25.2.tar.gz
unzip master.zip

Step 4: Build and Install NGINX with RTMP Module

Navigate to the NGINX source directory and configure the build:

cd nginx-1.25.2
./configure --with-http_ssl_module --add-module=../nginx-rtmp-module-master

Compile and install:

make
sudo make install

Step 5: Configure NGINX for RTMP

Edit the NGINX configuration file located at /usr/local/nginx/conf/nginx.conf:

sudo nano /usr/local/nginx/conf/nginx.conf

Add the following RTMP configuration to the nginx.conf file:

worker_processes  1;

events {
worker_connections 1024;

}

http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;

location / {
root html;
index index.html index.htm;
}
}

}

rtmp {
server {
listen 1935;
chunk_size 4096;

application live {
live on;
record off;
}
}

}

Save the file and exit.

Step 6: Start NGINX

You can now start NGINX using the following command:

sudo /usr/local/nginx/sbin/nginx

Step 7: Test Your RTMP Server

To test your RTMP server, you can use a streaming software like OBS Studio:

  1. Open OBS Studio and go to Settings.
  2. Under Stream, select Custom.
  3. Enter the RTMP server URL: rtmp://<Your-Raspberry-Pi-IP>/live
  4. Set the stream key to whatever you like.

Step 8: Verify Your Stream

To view your stream, you can use a media player like VLC:

  1. Open VLC and go to Media > Open Network Stream.
  2. Enter: rtmp://<Your-Raspberry-Pi-IP>/live/<stream-key>.

Optional: Enable NGINX on Boot

To have NGINX start automatically on boot, add it to your rc.local:

sudo nano /etc/rc.local

Add the following line before exit 0:

/usr/local/nginx/sbin/nginx

Save and exit.

You’re Done!

Your Raspberry Pi is now set up as an RTMP streaming server. You can stream video content to it and serve it to multiple clients.

MacOS idle time daemon

I put together a pretty simple daemon which has been compiled for and tested on MacOS 10.9.1 Mavericks. It is designed to run in the background, and at pre-set intervals check the system idle time. When that idle time meets or exceeds a pre-configured value, the daemon runs an executable. When the user moves the mouse or presses any key on the keyboard, the daemon will execute another program.

This can be incredibly useful if you would like workstations to participate in a render farm if they are idle for a certain amount of time, but remove themselves from the farm when they are being used by an artist.

To use, start by downloading the installer:

idleexecd

Or, if you would like to see how I did it, build it yourself, or use the code for something else:

idleexecd.src

Configuring the daemon involves two mandatory steps, and one optional one.

First, edit the configuration file, located at /Library/Preferences/org.n3d.idleexecd.config.plist. I originally wrote this to put machines on a Deadline render farm, so it is configured to do just that. The config file looks like this:

<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”>
<plist version=”1.0″>
<array>
<dict>
<key>Process Name</key>
<string>DeadlineSlave</string>
<key>Run As</key>
<string>farm</string>
<key>Idle Time Launch Delay</key>
<integer>15</integer>
<key>Startup Command</key>
<string>/Applications/Thinkbox/Deadline6/DeadlineLauncher.app/Contents/MacOS/DeadlineLauncher -slave -nogui</string>
<key>Shutdown Command</key>
<string>/Applications/Thinkbox/Deadline6/DeadlineSlave.app/Contents/MacOS/DeadlineSlave -shutdown</string>
</dict>
</array>
</plist>

For process name, choose any value that is appropriate.  Run as is the user that the process will execute as. Pick any valid user besides root. The idle time launch delay is the idle time, in minutes, that the daemon will wait before it executes the startup command. The startup command will be executed when the machine has gone idle for the set amount of time. When the user moves the mouse or hits a key on the keyboard, the shutdown command will be executed. To add multiple commands to execute, simply copy and paste everything between <dict> and </dict> including the tags, and enter new command specifications.

If you wish to edit configuration parameters for the daemon, such as log file destination, edit /Library/LaunchDaemons/org.n3d.idleexecd.plist. The -p 1 command line argument is the polling interval, in seconds. Leaving this default will cause the daemon to check the idle time every second. This can be increased to 10 seconds, but when the user interacts with the machine, they may have to wait up to 10 seconds before the daemon responds to the input. The -v argument specifies verbose logging. The default location for logging is /var/log/idleexecd.log.

Last, reboot your machine for the changes to take effect.

TL;DR: Download and install idleexecd to have your OSX 10.9 workstation participate in a Deadline 6 render farm after it has been idle for 15 minutes.