### Set up and run icey-server with RTSP config Source: https://github.com/auscaster/icey-server/blob/main/README.md Copy the example RTSP config, edit it, then run the server with --doctor to validate before starting normally. ```bash cp config.rtsp.example.json config.local.json $EDITOR config.local.json ./build/src/server/icey-server --config config.local.json --doctor ./build/src/server/icey-server --config config.local.json ``` -------------------------------- ### GET /api/ready Source: https://github.com/auscaster/icey-server/blob/main/README.md Returns preflight readiness and reports HTTP 503 when the runtime is not ready to serve. ```APIDOC ## GET /api/ready ### Description Returns preflight readiness and reports HTTP 503 when the runtime is not ready to serve. ### Method GET ### Endpoint /api/ready ### Response #### Success Response (200) Returns readiness status. #### Error Response (503) Returned when the runtime is not ready to serve. ``` -------------------------------- ### Configure and run RTSP server Source: https://github.com/auscaster/icey-server/blob/main/SKILL.md Start from the tracked RTSP example config, edit it, then run doctor and the server. The config file is copied to config.local.json before editing. ```bash cp config.rtsp.example.json config.local.json $EDITOR config.local.json ./build-dev/src/server/icey-server --config config.local.json --doctor ./build-dev/src/server/icey-server --config config.local.json ``` -------------------------------- ### Run the full stack with make facetime-demo Source: https://github.com/auscaster/icey-server/blob/main/docs/facetime-on-macbook.md Starts the entire stack with one command. Runs scripts/facetime-demo.sh, which starts icey-server with the right flags and tears it down on Ctrl-C. Open http://localhost:4500/ and click Watch. ```bash make facetime-demo ``` -------------------------------- ### GET /api/config Source: https://github.com/auscaster/icey-server/blob/main/README.md Returns browser-facing ICE/TURN config plus runtime mode/version. ```APIDOC ## GET /api/config ### Description Returns browser-facing ICE/TURN config plus runtime mode/version. ### Method GET ### Endpoint /api/config ### Response #### Success Response (200) Returns an object containing: - ICE/TURN configuration (object) - runtime mode (string) - version (string) ``` -------------------------------- ### Configure and build with CMake presets or make wrappers Source: https://github.com/auscaster/icey-server/blob/main/README.md Use the dev CMake preset to configure and build against a sibling icey checkout, or use the thin make wrappers for common tasks. `make install` stages the distributable layout under `.stage/`, and `make package` emits versioned `.tar.gz` and `.zip` artifacts from the staged app layout. ```bash # Configure and build with the sibling icey checkout cmake --preset dev cmake --build --preset dev # Or use the thin wrappers make configure make build make web-install make web-build make install make package make package-deb make package-apt make package-managers make release-metadata-check make release-check ``` -------------------------------- ### GET /api/status Source: https://github.com/auscaster/icey-server/blob/main/README.md Returns readiness, mode, version, peer identity, session counts, uptimeSec, and intelligence state. ```APIDOC ## GET /api/status ### Description Returns readiness, mode, version, peer identity, session counts, uptimeSec, and intelligence state. ### Method GET ### Endpoint /api/status ### Response #### Success Response (200) Returns an object containing: - readiness (boolean) - mode (string) - version (string) - peer identity (string) - session counts (number) - uptimeSec (number) - intelligence state (object) ``` -------------------------------- ### Install prerequisites with Homebrew Source: https://github.com/auscaster/icey-server/blob/main/docs/facetime-on-macbook.md Installs cmake, pkg-config, openssl@3, and ffmpeg via Homebrew. Required for configuring the build, TLS/DTLS support, and linking against FFmpeg libraries. ```bash brew install cmake pkg-config openssl@3 ffmpeg ``` -------------------------------- ### icey-server CLI Source: https://github.com/auscaster/icey-server/blob/main/README.md Command-line interface for starting and configuring the icey-server binary. Supports various options for network binding, TLS, TURN, media mode, and diagnostics. ```APIDOC ## icey-server [options] ### Description Starts the icey-server with the specified configuration options. The server can operate in stream, record, or relay mode and includes an embedded TURN server. ### Usage ``` icey-server [options] ``` ### Options - `-c, --config ` - Config file (default: ./config.json) - `--host ` - Bind host (default from config) - `--port ` - HTTP/WS port (default: 4500) - `--tls-cert ` - TLS certificate for direct HTTPS/WSS serving - `--tls-key ` - TLS private key for direct HTTPS/WSS serving - `--turn-port ` - TURN port (default: 3478) - `--turn-external-ip ` - Public IP advertised by TURN - `--mode ` - stream|record|relay - `--source ` - Media source file, device, or RTSP URL - `--record-dir ` - Output directory for record mode (default: ./recordings) - `--web-root ` - Path to web UI dist/ directory (packaged installs auto-fallback to share/icey-server/web) - `--log-level ` - trace|debug|info|warn|error (default: info) - `--loop` - Enable looping in stream mode - `--no-loop` - Disable looping in stream mode - `--no-turn` - Disable embedded TURN server - `--doctor` - Print preflight diagnostics and exit - `--version` - Print version and exit - `-h, --help` - Show this help and exit ``` -------------------------------- ### Build and run icey-server natively Source: https://github.com/auscaster/icey-server/blob/main/README.md Builds the C++ server with CMake, builds the web UI with npm, then runs the server with the web root and a video source. Requires OpenSSL and FFmpeg; libdatachannel is fetched automatically. ```bash # Build the C++ server cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DICEY_SOURCE_DIR=/path/to/icey cmake --build build --target icey-server # Build the web UI cd web npm install npm run build # Run ./build/src/server/icey-server --web-root web/dist --source /path/to/video.mp4 ``` -------------------------------- ### Build and run icey-server with FaceTime camera Source: https://github.com/auscaster/icey-server/blob/main/docs/facetime-on-macbook.md Quick-start commands to install dependencies, clone icey and icey-server, build with the dev preset, build the web frontend, and run the facetime-demo target. Then open http://localhost:4500/ and click Watch. ```bash brew install cmake pkg-config openssl@3 ffmpeg git clone https://github.com/auscaster/icey git clone https://github.com/auscaster/icey-server cd icey-server cmake --preset dev && cmake --build --preset dev (cd web && npm install && npm run build) make facetime-demo # open http://localhost:4500/ and click Watch ``` -------------------------------- ### Open demo URL Source: https://github.com/auscaster/icey-server/blob/main/docker/README.md URL to open after starting the server. ```text http://localhost:4500 ``` -------------------------------- ### Build the web UI Source: https://github.com/auscaster/icey-server/blob/main/docs/facetime-on-macbook.md Installs npm dependencies and builds the web UI. Output goes to web/dist/, which icey-server picks up via --web-root web/dist. ```bash cd web npm install npm run build cd .. ``` -------------------------------- ### Install staged app layout Source: https://github.com/auscaster/icey-server/blob/main/SKILL.md Validates staged app layout changes. ```bash make install ``` -------------------------------- ### GET /api/health Source: https://github.com/auscaster/icey-server/blob/main/README.md Returns a basic liveness payload to indicate the server process is running. ```APIDOC ## GET /api/health ### Description Returns a basic liveness payload to indicate the server process is running. ### Method GET ### Endpoint /api/health ### Response #### Success Response (200) Returns a basic liveness payload. ``` -------------------------------- ### Run preflight doctor check with --doctor Source: https://github.com/auscaster/icey-server/blob/main/README.md Performs a machine-readable preflight check before starting the server. ```bash ./build/src/server/icey-server --doctor ``` -------------------------------- ### Run Vite dev server for Web UI Source: https://github.com/auscaster/icey-server/blob/main/README.md Starts the Vite development server for the web UI. The dev server runs on port 5173 and proxies `/ws` and `/api` to the C++ server on port 4500. Run both in parallel for hot-reload development. ```bash cd web npm run dev ``` -------------------------------- ### Install icey-server binary Source: https://github.com/auscaster/icey-server/blob/main/src/server/CMakeLists.txt Installs the icey-server executable to the bin directory under the apps component. ```cmake install(TARGETS icey-server RUNTIME DESTINATION bin COMPONENT apps) ``` -------------------------------- ### Dependency tree of icey modules Source: https://github.com/auscaster/icey-server/blob/main/README.md Lists the existing icey modules that icey-server depends on, including webrtc, symple, turn, av, http, stun, net, crypto, json, and base. The frontend uses `symple-client` and `symple-player` npm packages bundled with Vite. ```text icey-server ├── webrtc (libdatachannel, track, mediabridge) ├── symple (server, protocol) ├── turn (server, allocations) ├── av (MediaCapture, VideoPacketEncoder, AudioPacketEncoder) ├── http (Server, WebSocket) ├── stun (STUN message parsing) ├── net, crypto, json, base ``` -------------------------------- ### Run Chromium smoke tests Source: https://github.com/auscaster/icey-server/blob/main/SKILL.md CI-authoritative smoke path for UI changes or media-path claims. Runs npm install, build, and Chromium smoke tests. ```bash npm --prefix web ci npm --prefix web run build npm --prefix web run test:smoke:chromium ``` -------------------------------- ### CMakeLists.txt for icey-server project Source: https://github.com/auscaster/icey-server/blob/main/CMakeLists.txt Top-level CMake configuration for the icey-server project. Sets C++20, reads the version from a VERSION file, and optionally builds against an icey source checkout via ICEY_SOURCE_DIR or finds an installed icey package. Installs configuration files, documentation, and the web UI dist directory. ```cmake cmake_minimum_required(VERSION 3.21) file(READ VERSION _ver) string(STRIP "${_ver}" _ver) project(icey-server VERSION ${_ver} LANGUAGES CXX) include(GNUInstallDirs) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(ICEY_SOURCE_DIR "" CACHE PATH "Optional path to an icey source checkout for development builds") set(ICEY_WEB_DIST_DIR "${PROJECT_SOURCE_DIR}/web/dist" CACHE PATH "Optional path to a built web UI dist directory for install packaging") if(ICEY_SOURCE_DIR) if(NOT EXISTS "${ICEY_SOURCE_DIR}/CMakeLists.txt") message(FATAL_ERROR "ICEY_SOURCE_DIR does not point to an icey source tree: ${ICEY_SOURCE_DIR}") endif() set(BUILD_APPLICATIONS OFF CACHE BOOL "" FORCE) set(BUILD_TESTS OFF CACHE BOOL "" FORCE) set(BUILD_SAMPLES OFF CACHE BOOL "" FORCE) set(BUILD_BENCHMARKS OFF CACHE BOOL "" FORCE) set(BUILD_PERF OFF CACHE BOOL "" FORCE) set(WITH_OPENSSL ON CACHE BOOL "" FORCE) set(WITH_FFMPEG ON CACHE BOOL "" FORCE) set(WITH_LIBDATACHANNEL ON CACHE BOOL "" FORCE) add_subdirectory("${ICEY_SOURCE_DIR}" "${CMAKE_BINARY_DIR}/_deps/icey") else() find_package(icey REQUIRED COMPONENTS base crypto net http json symple av speech stun turn vision webrtc webrtc_support) endif() add_subdirectory(src/server) install(FILES "${PROJECT_SOURCE_DIR}/packaging/config.example.json" DESTINATION "${CMAKE_INSTALL_DATADIR}/icey-server" COMPONENT apps) install(FILES "${PROJECT_SOURCE_DIR}/packaging/config.rtsp.example.json" DESTINATION "${CMAKE_INSTALL_DATADIR}/icey-server" COMPONENT apps) install(FILES "${PROJECT_SOURCE_DIR}/README.md" "${PROJECT_SOURCE_DIR}/LICENSE.md" DESTINATION "${CMAKE_INSTALL_DATADIR}/doc/icey-server" COMPONENT apps) install(DIRECTORY "${ICEY_WEB_DIST_DIR}/" DESTINATION "${CMAKE_INSTALL_DATADIR}/icey-server/web" COMPONENT apps OPTIONAL) ``` -------------------------------- ### Run icey-server with FaceTime camera source Source: https://github.com/auscaster/icey-server/blob/main/docs/facetime-on-macbook.md Starts icey-server using AVFoundation video device 0 (FaceTime camera) with no audio. Use '0:0' to also capture the built-in mic, but video-only is recommended on a single Mac to avoid feedback from speakers. The '--no-turn' flag skips the embedded TURN server, which is not needed for same-machine browser access. ```bash ./build-dev/src/server/icey-server \ --source 'avfoundation:0:none' \ --web-root web/dist \ --no-turn ``` -------------------------------- ### Architecture data flow diagram Source: https://github.com/auscaster/icey-server/blob/main/README.md Shows the communication paths between the browser and the icey-server: WSS for signalling via Symple v4, static files from Vite build output, REST status via `/api`, WebRTC media (stream, record, relay), and TURN for NAT traversal on port 3478. ```text Browser ─── WSS /ws ──── Symple v4 (signalling, presence, rooms) ─── GET / ──── Static files (Vite build output) ─── GET /api ─── REST status ─── WebRTC ──── Media (stream: H.264 + Opus out, record: H.264 in, relay: one browser in -> many browsers out) ─── TURN ──── NAT traversal (embedded, port 3478) ``` -------------------------------- ### Expected ffmpeg device list output Source: https://github.com/auscaster/icey-server/blob/main/docs/facetime-on-macbook.md Example output from the ffmpeg device listing command, showing camera and microphone indices. The first camera is typically 'MacBook Pro Camera' or 'FaceTime HD Camera' on older Macs. ```text [0] MacBook Pro Camera # or "FaceTime HD Camera" on older Macs [1] MacBook Pro Desk View Camera [2] Capture screen 0 [0] MacBook Pro Microphone ``` -------------------------------- ### Publish AUR package with local fallback Source: https://github.com/auscaster/icey-server/blob/main/README.md Use this command when the AUR SSH edge is not reachable from GitHub Actions. It generates and validates the listed source archives, Linux binaries, Debian package, APT repo archive, and rendered manifests for Homebrew, AUR, Debian/APT, and Nix. Windows-facing manifests are only generated when a real Windows release archive exists. ```bash make publish-aur AUR_REPO_DIR=/path/to/aur-icey-server ``` -------------------------------- ### Build web UI and run server with web root Source: https://github.com/auscaster/icey-server/blob/main/SKILL.md For a browser-visible local app, build the web UI first, then run the server with the web root and a video source. ```bash make web-install make web-build ./build-dev/src/server/icey-server --web-root web/dist --source /path/to/video.mp4 ``` -------------------------------- ### Build with Makefile Source: https://github.com/auscaster/icey-server/blob/main/SKILL.md Equivalent Makefile path for building the project. ```bash make configure make build ``` -------------------------------- ### Build the server with CMake presets Source: https://github.com/auscaster/icey-server/blob/main/docs/facetime-on-macbook.md Configures and builds the server using the dev preset. The output binary lands at build-dev/src/server/icey-server. ```bash cmake --preset dev cmake --build --preset dev ``` -------------------------------- ### Build and run with Docker Compose Source: https://github.com/auscaster/icey-server/blob/main/docker/README.md Repo-backed path for local edits or artifacts. Reuses existing local build artifacts to keep rebuilds cheap. ```bash docker compose up --build ``` -------------------------------- ### Run icey-server --doctor preflight diagnostic Source: https://github.com/auscaster/icey-server/blob/main/docs/facetime-on-macbook.md Run this command when `/api/ready` returns `ready=false` to perform a preflight diagnostic. The binary path is `./build-dev/src/server/icey-server`. ```bash ./build-dev/src/server/icey-server --doctor ``` -------------------------------- ### Build and run Docker Compose Source: https://github.com/auscaster/icey-server/blob/main/SKILL.md Local source-backed Docker validation using the compose file at docker/compose.yaml. ```bash docker compose -f docker/compose.yaml up --build ``` -------------------------------- ### Point Docker at a different binary Source: https://github.com/auscaster/icey-server/blob/main/docker/README.md Override ICEY_SERVER_BINARY to use a binary from a different build tree, then build and run. ```bash ICEY_SERVER_BINARY=icey-server/build-dev/src/server/icey-server docker compose build docker compose up ``` -------------------------------- ### Expected directory layout Source: https://github.com/auscaster/icey-server/blob/main/docs/facetime-on-macbook.md Shows the expected directory structure after cloning. If placed elsewhere, override ICEY_SOURCE_DIR when configuring. ```text ~/dev/auscaster/ icey/ icey-server/ ``` -------------------------------- ### Clone icey and icey-server repositories Source: https://github.com/auscaster/icey-server/blob/main/docs/facetime-on-macbook.md Clones the icey and icey-server repositories into ~/dev/auscaster. icey-server expects a sibling icey source tree. ```bash cd ~/dev/auscaster git clone https://github.com/auscaster/icey git clone https://github.com/auscaster/icey-server ``` -------------------------------- ### Runtime overrides for published image Source: https://github.com/auscaster/icey-server/blob/main/docker/README.md Switch app mode or input source with environment variables. Record mode writes to the bind-mounted /app/recordings. ```bash docker run --rm --network host -e ICEY_MODE=record -v "$(pwd)/recordings:/app/recordings" ghcr.io/auscaster/icey-server:latest ``` ```bash docker run --rm --network host -e ICEY_MODE=relay ghcr.io/auscaster/icey-server:latest ``` ```bash docker run --rm --network host -e ICEY_SOURCE=rtsp://camera.local/stream1 -e ICEY_LOOP=0 ghcr.io/auscaster/icey-server:latest ``` -------------------------------- ### Runtime overrides for Compose Source: https://github.com/auscaster/icey-server/blob/main/docker/README.md Switch app mode or input source with environment variables. Record mode writes into icey-server/docker/recordings/. ```bash ICEY_MODE=record docker compose up --build ``` ```bash ICEY_MODE=relay docker compose up --build ``` ```bash ICEY_SOURCE=/app/media/test.mp4 docker compose up --build ``` -------------------------------- ### Verify binary architecture with file Source: https://github.com/auscaster/icey-server/blob/main/docs/facetime-on-macbook.md Checks the built binary's architecture. On macOS arm64 it should report Mach-O 64-bit executable arm64. ```bash file build-dev/src/server/icey-server ``` -------------------------------- ### Verify server health, readiness, status, and config with curl Source: https://github.com/auscaster/icey-server/blob/main/docs/facetime-on-macbook.md Use these curl commands to check the running icey-server on localhost:4500. `/api/status` reports mode, peer identity, session counts, and intelligence state; `/api/config` reports the configured source, including its kind (`device` for `avfoundation:` / `v4l2:` / `dshow:`). If `ready=false`, run `--doctor` for a preflight diagnostic. ```bash curl -s http://localhost:4500/api/health curl -s http://localhost:4500/api/ready curl -s http://localhost:4500/api/status | jq curl -s http://localhost:4500/api/config | jq '.source' ``` -------------------------------- ### Recordings directory for Compose Source: https://github.com/auscaster/icey-server/blob/main/docker/README.md Where record mode writes files for the Compose path. ```text icey-server/docker/recordings/ ``` -------------------------------- ### List available AVFoundation devices with ffmpeg Source: https://github.com/auscaster/icey-server/blob/main/docs/facetime-on-macbook.md Run this command to list camera and microphone devices on macOS. The first run triggers a macOS permission prompt for camera and microphone access; grant it to your terminal app in System Settings → Privacy & Security, otherwise device open fails with 'Operation not permitted'. ```bash ffmpeg -f avfoundation -list_devices true -i "" 2>&1 ``` -------------------------------- ### Check release metadata Source: https://github.com/auscaster/icey-server/blob/main/SKILL.md Validates release metadata only. ```bash make release-metadata-check ``` -------------------------------- ### Configure compiler warning options for MSVC and GNU/Clang Source: https://github.com/auscaster/icey-server/blob/main/src/server/CMakeLists.txt Sets warning flags: /W4 for MSVC, and -Wall -Wextra -Wno-unused-parameter for GNU/Clang. When ENABLE_WARNINGS_ARE_ERRORS is on, adds /WX (MSVC) or -Werror (GNU/Clang). ```cmake if(MSVC) target_compile_options(icey-server PRIVATE /W4) if(ENABLE_WARNINGS_ARE_ERRORS) target_compile_options(icey-server PRIVATE /WX) endif() elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") target_compile_options(icey-server PRIVATE -Wall -Wextra -Wno-unused-parameter) if(ENABLE_WARNINGS_ARE_ERRORS) target_compile_options(icey-server PRIVATE -Werror) endif() endif() ``` -------------------------------- ### Link icey-server against icey libraries Source: https://github.com/auscaster/icey-server/blob/main/src/server/CMakeLists.txt Links the icey-server target with the icey::base, icey::crypto, icey::net, icey::http, icey::json, icey::symple, icey::av, icey::speech, icey::stun, icey::turn, icey::vision, icey::webrtc, and icey::webrtc_support libraries. ```cmake target_link_libraries(icey-server PRIVATE icey::base icey::crypto icey::net icey::http icey::json icey::symple icey::av icey::speech icey::stun icey::turn icey::vision icey::webrtc icey::webrtc_support ) ``` -------------------------------- ### Run Icey Server from GHCR Source: https://github.com/auscaster/icey-server/blob/main/docker/legacy-dockerhub.md Use this command to run the latest Icey Server release from the new GHCR registry. It uses host networking and runs in the foreground. ```bash docker run --rm --network host ghcr.io/auscaster/icey-server:latest ``` -------------------------------- ### Pipeline diagram: FaceTime camera to browser Source: https://github.com/auscaster/icey-server/blob/main/docs/facetime-on-macbook.md Shows the end-to-end pipeline: the FaceTime camera feeds into icey-server via an avfoundation: URL, which streams to the browser. No relay binary or RTSP intermediary is used. ```text FaceTime camera ── icey-server (avfoundation: URL) ──► browser ``` -------------------------------- ### Copy config.json to build directory Source: https://github.com/auscaster/icey-server/blob/main/src/server/CMakeLists.txt Uses configure_file to copy the project's config.json into the current build directory, preserving the file as-is (COPYONLY). ```cmake # Copy config to build directory configure_file( ${PROJECT_SOURCE_DIR}/config.json ${CMAKE_CURRENT_BINARY_DIR}/config.json COPYONLY) ``` -------------------------------- ### Define icey-server executable target with sources Source: https://github.com/auscaster/icey-server/blob/main/src/server/CMakeLists.txt Declares the icey-server executable from internal source files and media-server.cpp. ```cmake add_executable(icey-server internal/app.cpp internal/config.cpp internal/httpfactory.cpp internal/media.cpp internal/turnserver.cpp internal/visionartifacts.cpp media-server.cpp ) ``` -------------------------------- ### Run local package-manager validation with make package-managers Source: https://github.com/auscaster/icey-server/blob/main/packaging/README.md Validates Linux release artifacts, the Debian package, APT repo archive, and rendered manifests for every package manager that has a real artifact. ```bash make package-managers ``` -------------------------------- ### Set ICEY_SERVER_VERSION compile definition Source: https://github.com/auscaster/icey-server/blob/main/src/server/CMakeLists.txt Defines the ICEY_SERVER_VERSION macro with the project version for the icey-server target. ```cmake target_compile_definitions(icey-server PRIVATE ICEY_SERVER_VERSION="${PROJECT_VERSION}" ) ``` -------------------------------- ### Add internal include directory Source: https://github.com/auscaster/icey-server/blob/main/src/server/CMakeLists.txt Adds the internal source directory to the include path for the icey-server target. ```cmake target_include_directories(icey-server PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/internal ) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.