Skip to content

About

Stellarium plugin that captures the rendered sky and streams it as H.264 video over SRT. Supports hardware encoding (NVENC/VAAPI) and works with any SRT receiver (VLC, OBS, ffplay).

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Stellarium   SRT

Stellarium SRT Streamer Plugin

Release License Stellarium Platform Qt FFmpeg

Captures the rendered sky framebuffer and streams it as H.264 video over SRT (Secure Reliable Transport). Supports hardware encoding (NVENC, VAAPI) and works with any SRT receiver — VLC, OBS, ffplay.


Features

  • Direct framebuffer capture via OpenGL (same hook point as SpoutSender)
  • SRT streaming with caller and listener modes
  • Hardware encoding — libx264 (CPU), h264_nvenc (NVIDIA), h264_vaapi (Linux)
  • HEVC 10-bit — optional higher quality encoding via libx265, hevc_nvenc, hevc_vaapi
  • Bayer dithering — reduces color banding in encoded output (SSE2-accelerated)
  • Async encoding on a separate thread with double-buffered frame handoff
  • PBO double-buffering for async GPU-to-CPU readback
  • Non-blocking connection with timeout and cancel support
  • Toolbar integration — SRT button in Stellarium's bottom toolbar
  • Configurable — SRT URL, bitrate, resolution, and frame rate

Installation (Windows)

  1. Download all files from the latest release.
  2. Back up your C:\Program Files\Stellarium\ folder.
  3. Copy all downloaded files into C:\Program Files\Stellarium\, replacing the originals.
  4. Launch Stellarium and enable the plugin in Configuration > Plugins > SRT Video Streamer.

The release includes FFmpeg DLLs with H.264 encoding support (libx264, h264_nvenc) since the default Stellarium FFmpeg DLLs only support decoding.

Why a full executable? Stellarium does not support dynamic plugins on Windows (stellarium#385), so the plugin must be compiled into the binary as a static plugin. The release is built from unmodified Stellarium source with only the SRT Streamer plugin added. All other Stellarium features and plugins work as usual.

Installation (Linux)

  1. Download stellarium-srtstreamer-linux64.tar.gz from the latest release.
  2. Extract into your Stellarium modules directory:
    tar xzf stellarium-srtstreamer-linux64.tar.gz -C ~/.stellarium/modules/
  3. Make sure FFmpeg with H.264 encoding support is installed:
    # Ubuntu/Debian
    sudo apt install libavcodec-extra
    # Fedora
    sudo dnf install ffmpeg-libs
  4. Launch Stellarium and enable the plugin in Configuration > Plugins > SRT Video Streamer.

Usage

  1. Enable the plugin: Configuration > Plugins > SRT Video Streamer > Load at startup, then restart Stellarium.
  2. Open settings via the SRT toolbar button in the bottom bar, or press Ctrl+Shift+R.
  3. Configure:
    • SRT URL (default: srt://127.0.0.1:9000)
    • Mode: Caller (connect out) or Listener (wait for connections)
    • Encoder: libx264 / h264_nvenc / h264_vaapi
    • Bitrate (default: 6000 kbps), frame rate, resolution
  4. Start streaming by clicking the toolbar button, or press Ctrl+Shift+S.

Keyboard shortcuts

Shortcut Action
Ctrl+Shift+S Toggle streaming on/off
Ctrl+Shift+R Open SRT Streamer settings

Toolbar button

The plugin adds an SRT icon to Stellarium's bottom toolbar:

  • Left-click toggles streaming on/off
  • Right-click opens the configuration dialog

Status indicator

A status text appears in the top-left corner of the window (not visible in the stream):

  • SRT: Connecting... (orange) — waiting for SRT connection
  • SRT: Streaming (green) — actively streaming

The config dialog also shows the current status with error messages when a connection fails or times out.

Receiving the stream

Start a listener on the receiving side before clicking Start (when using the default Caller mode):

ffplay -fflags nobuffer srt://0.0.0.0:9000?mode=listener
vlc srt://0.0.0.0:9000?mode=listener
mpv srt://0.0.0.0:9000?mode=listener

OBS Studio: Add Media Source > uncheck Local File > enter srt://0.0.0.0:9000?mode=listener


Building from source

Static plugin (Windows & Linux)

Static plugins are compiled directly into stellarium.exe. This is the recommended approach and the only option on Windows.

Requirements

  • Stellarium source tree (25.x+)
  • Qt 6 (matching the Stellarium build)
  • FFmpeg development libraries (libavcodec, libavformat, libavutil, libswscale) with SRT support
  • CMake 3.16+
  • A C++ compiler matching your Stellarium build (MSVC on Windows, GCC on Linux)

Steps

1. Clone this repo into the Stellarium plugins directory:

cd stellarium/plugins
git clone https://github.com/ozgur-as/stellarium-srtstreamer-plugin.git SrtStreamer

2. Add the plugin to Stellarium's CMakeLists.txt, alongside the other ADD_PLUGIN lines:

ADD_PLUGIN(SrtStreamer 1)

3. Add Q_IMPORT_PLUGIN to Stellarium's src/core/StelApp.cpp:

#ifdef USE_STATIC_PLUGIN_SRTSTREAMER
Q_IMPORT_PLUGIN(SrtStreamerPluginInterface)
#endif

4. Configure and build:

Windows (MSVC + Ninja):

call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
cd stellarium
mkdir build && cd build
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release ^
  -DCMAKE_PREFIX_PATH=D:/Qt/6.8.3/msvc2022_64 ^
  -DFFMPEG_ROOT=C:/ffmpeg ^
  -DUSE_PLUGIN_SRTSTREAMER=1
ninja

Linux:

cd stellarium
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release \
  -DFFMPEG_ROOT=/path/to/ffmpeg \
  -DUSE_PLUGIN_SRTSTREAMER=1
make -j$(nproc)
Dynamic plugin (Linux only)
export STELROOT=/path/to/stellarium
cd stellarium-srtstreamer-plugin
mkdir build && cd build
cmake .. -DSTELROOT=$STELROOT
make -j$(nproc)
make install

Installs libSrtStreamer.so to ~/.stellarium/modules/SrtStreamer/

Version history

See ChangeLog for details.

License

GNU General Public License v2 or later.

About

Stellarium plugin that captures the rendered sky and streams it as H.264 video over SRT. Supports hardware encoding (NVENC/VAAPI) and works with any SRT receiver (VLC, OBS, ffplay).

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages