A TUI tool that sends SCTE-35 splice signals via UDP to TSDuck's tsp spliceinject plugin.
- Interactive terminal UI with split-pane layout (menu + colored JSON log)
- Ad break start/end via
splice_insert - Blackout start/end via
time_signal+splice_segmentation_descriptor(0x20/0x21 with UPID) - Event cancel and null keepalive signals
- Input validation (event_id, duration, UPID)
- Conflict detection (duplicate starts, orphan ends)
cargo runNavigate with ↑↓ or jk, press Enter to select, q to quit.
Create config.yaml in the working directory or set SCTE_CONFIG=/path/to/config.yaml:
tsp:
udp_host: "127.0.0.1"
udp_port: 9000udp_port must match the spliceinject --udp port that tsp listens on.
Run tsp and ffmpeg manually in separate terminals, then start scte-signal.
Start tsp first (it is the SRT listener), then ffmpeg, then the app.
tsp --add-input-stuffing 1/10 \
-I srt --listener 4900 \
-P pmt --service 1 --add-programinfo-id 0x43554549 --add-pid 600/0x86 \
-P spliceinject --service 1 --udp 9000 \
-P splicemonitor --all-commands \
-O drop--add-input-stuffing makes room to inject, -P pmt declares the SCTE-35 PID,
and spliceinject --udp 7777 is the socket the app sends to. Swap -O drop for
-O srt --caller <host>:<port> to forward downstream.
ffmpeg -re -f lavfi -i testsrc2=duration=600:size=1280x720:rate=30 \
-f lavfi -i sine=frequency=1000:duration=600 \
-c:v libx264 -b:v 2M -c:a aac \
-f mpegts "srt://127.0.0.1:4900"cargo runSelect a signal type, fill in parameters, and observe the decoded SCTE-35 output in Terminal 1.
src/
├── main.rs # Entry point
├── config.rs # YAML config loading
├── domain/
│ ├── error.rs # Typed validation errors
│ ├── signal.rs # SignalCommand enum + validation
│ └── event_tracker.rs # Active event conflict detection
├── xml/
│ ├── model.rs # TSDuck XML element structs
│ └── serialize.rs # Struct → XML rendering
├── transport/
│ └── udp.rs # UDP sender
└── tui/
├── mod.rs # Terminal setup + event loop
├── app.rs # App state + command execution
└── ui.rs # Split layout + colored JSON rendering
cargo test