minisatip

repository·master·Indexed 18 days ago

https://github.com/catalinii/minisatip

A lightweight, multi-threaded SAT>IP server (version 1.2) for Linux and resource-constrained embedded systems. It enables simultaneous streaming of DVB data (S, T, C, ATSC, ISDB-T) to multiple clients via RTSP, HTTP, and SSDP. Features include support for dvbapi and dvbca decryption, Diseqc 1.0/1.1 control, Unicable/JESS adapters, and compatibility with clients like Tvheadend, DVBViewer, vdr, and VideoLAN.

Tokens
2.8K
Snippets
14
Records
18
Agent score
13%

What's inside minisatip

  1. Overview of Minisatip

    master

    Minisatip is a lightweight, multi-threaded SAT>IP server (version 1.2) designed for Linux systems, particularly embedded systems with memory and processing constraints. It allows multiple clients to stream data simultaneously from a single DVB card by opening different PIDs.

    Key features include:

    • Broad Hardware Support: Tested with DVB-S, DVB-S2, DVB-T, DVB-T2, DVB-C, DVB-C2, ATSC, and ISDB-T cards.
    • Client Compatibility: Works with existing SAT>IP clients such as Tvheadend, DVBViewer, vdr, VideoLAN, and Android/iOS applications.
    • Protocol Support: Implements RTSP (TCP and UDP), HTTP (default port 8080), and SSDP.
    • Dual Role: Can act as a SAT>IP server or a SAT>IP client to connect to servers across different networks.
    • Decryption Support: Supports dvbapi (via oscam and dvbcsa) and dvbca (via libssl-dev) for channel decryption.
  2. Compile Minisatip from source

    master

    To build Minisatip on a standard Linux system, use CMake to generate build files and then use make to compile. It is recommended to use a build directory to keep the source tree clean.

    mkdir build
    cd build
    cmake ..
    make -j4
  3. Cross-compile Minisatip for other platforms

    master

    You can cross-compile Minisatip (e.g., for static compilation on ARM) by specifying the CMAKE_CXX_COMPILER and disabling the NETCVCLIENT via CMake flags. Replace arm-linux-gnueabihf-g++ with your specific target toolchain executable.

    cmake -B build . -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ -DNETCVCLIENT=0
    cd build
  4. Cross-compile Minisatip

    master

    To cross-compile for a different platform (e.g., ARM), specify the CMAKE_CXX_COMPILER and disable the NetCV client using -DNETCVCLIENT=0. Note that the specific compiler name (like arm-linux-gnueabihf-g++) will depend on your toolchain.

    cmake -B build . -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ -DNETCVCLIENT=0
    cd build
  5. Access radio and TV streams via HTTP/RTSP

    master

    Once Minisatip is running, you can stream radio or television content by opening specific URLs in a media player. Replace MINISATIP_HOST with the IP address or hostname of the machine running Minisatip.

    Radio Stream Examples

    • Hotbird 13E: http://MINISATIP_HOST:8080/?msys=dvbs&freq=11623&pol=v&sr=27500&pids=0,10750,254
    • Astra 19.2E: http://MINISATIP_HOST:8080/?msys=dvbs&freq=12266&pol=h&sr=27500&pids=0,851

    Television Stream Examples

    • Astra 19.2E (Kika HD): http://MINISATIP_HOST:554/?src=1&freq=11347&pol=v&ro=0.35&msys=dvbs2&mtype=8psk&plts=on&sr=22000&fec=23&pids=0,17,18,6600,6610,6620,6630
  6. Reference the `msys` parameter values

    master

    When constructing stream URLs, the msys query parameter defines the modulation system. Supported values include:

    • dvbs
    • dvbs2
    • dvbt
    • dvbt2
    • dvbc
    • dvbc2
    • atsc
    • isdbt
    • dvbcb (DVBC_ANNEX_B)
    msys can be one of: dvbs, dvbs2, dvbt, dvbt2, dvbc, dvbc2, atsc, isdbt, dvbcb
  7. Access radio and TV streams via HTTP

    master

    Once Minisatip is running, you can stream content by opening specific URLs in a media player. The URL structure typically includes parameters for the satellite system (msys), frequency (freq), polarity (pol), symbol rate (sr), and PIDs (pids).

    Radio Examples:

    • Hotbird 13E: http://MINISATIP_HOST:8080/?msys=dvbs&freq=11623&pol=v&sr=27500&pids=0,10750,254
    • Astra 19.2E: http://MINISATIP_HOST:8080/?msys=dvbs&freq=12266&pol=h&sr=27500&pids=0,851

    Television FTA Example:

    • Astra 19.2E (Kika HD): http://MINISATIP_HOST:554/?src=1&freq=11347&pol=v&ro=0.35&msys=dvbs2&mtype=8psk&plts=on&sr=22000&fec=23&pids=0,17,18,6600,6610,6620,6630
  8. Configure Diseqc Switches

    master

    Minisatip allows fine-grained control over Diseqc 1.0 and 1.1 switches via the -d and -q flags.

    • -d --diseqc ADAPTER:COMMITTED-UNCOMMITTED: Sets the number of committed (Diseqc 1.0) and uncommitted (Diseqc 1.1) packets to send. The higher number is sent first.
      • Use * as the adapter to apply to all adapters.
      • Use * before the committed number to enable fast-switch (voltage/tone only).
      • Use @ before the committed number to set 'Any Device' address (0x00).
      • Use . before the committed number to set 'LNB' address (0x11).
    • -q --diseqc-timing ADAPTER:BEFORE_CMD-AFTER_CMD-AFTER_REPEATED_CMD-AFTER_SWITCH-AFTER_BURST-AFTER_TONE: Sets timing values in milliseconds. Default is 15-54-15-15-15-0.
    • -0 --diseqc-multi ADAPTER:POSITION: Sends Diseqc to a selected position before other positions are set.
    # Default Diseqc settings for adapter 0
    ./minisatip -d 0:1-0
    
    # Apply fast-switch to all adapters
    ./minisatip -d *: *1-0
    
    # Custom timing for adapter 0
    ./minisatip -q 0:10-20-10-10-10-0
  9. Adjust Logging and Verbosity

    master

    Minisatip provides several ways to control log output for debugging:

    • -f: Run in foreground (default is background/daemon mode).
    • -g --syslog: Use syslog instead of stdout. Use multiple -g to also print to stderr.
    • -F --logfile FILE: Output debug/log info to a specific file when running in background.
    • -l --module1,module2: Increase verbosity for specific modules (e.g., http, pmt, stream).
    • -v --module1,module2: Increase debug level (more verbose than -l).

    Available Modules: general, http, socketworks, stream, adapter, satipc, pmt, tables, dvbapi, lock, netceiver, ca, socket, utils, dmx, ssdp, dvb, ddci.

    # Run in foreground with high verbosity for http and pmt modules
    ./minisatip -f -v http,pmt
  10. Configure SAT>IP Server Adapters

    master

    You can simulate or specify the types of DVB adapters available on the system using the -a or -Y flags. This is useful for testing or overriding automatic detection.

    • -a --adapters x:y:z: Simulates x DVB-S2, y DVB-T2, and z DVB-C adapters. Use 0 for auto-detect.
    • -Y --delsys ADAPTER1:DELIVERY_SYSTEM1,...: Overrides the detected delivery system for specific adapters (e.g., dvbs, dvbs2, dvbt, dvbt2, dvbc, dvbc2, isdbt, atsc, dvbcb).
    # Simulate 1 DVB-S2, 2 DVB-T2, and 3 DVB-C devices
    ./minisatip -a 1:2:3
    
    # Force adapter 0 to be DVBT and adapter 1 to be DVBS
    ./minisatip --delsys 0:dvbt,1:dvbs