Skip to content

SSTV Decoder

Kevin edited this page Oct 23, 2026 · 2 revisions

SSTV Decoder

Related pages:

The optional SSTV module decodes live images from a copy of native IC-9700 SUB/RX audio and can decode an uploaded MP3 or WAV recording. It supports Robot24, Robot36, Robot72, Martin M1/M2, and PD120/PD180 through SSTVFlow 0.2.0.

The module is available in the native IC-9700 experience. In Home, connect the radio from the top toolbar, open Modules, and select SSTV Decoder. The Modules menu is hidden in the Legacy radio experience.

The decoder never opens a radio socket, starts a second Icom session, or sends a CI-V command. It consumes a dedicated copy of the existing native audio stream. MAIN is normally the left channel and SUB/RX is the right channel. The decoder extracts SUB/RX and passes mono input through unchanged.

Live receive

  1. Connect the IC-9700 in Home.
  2. Tune SUB/RX to the transmission.
  3. Leave External DATA Decode disabled so normal AF receive audio is available.
  4. Open Modules > SSTV Decoder and select Enable.
  5. Leave the page open if you want to watch progressive output, or leave the backend enabled and return later to the saved gallery.

The decoder starts disabled after each Pi-Sat service restart. Disable stops new reception, drains accepted audio, and allows the worker to return its end-of-input result. A queued image can take time to finish during that drain.

SSTVFlow can acquire a supported image from a VIS header or, in suitable conditions, from the repeated line structure after reception has started. Header-free acquisition produces a partial image whose original vertical position may be unknown. An interrupted image that began with a known header can also be partial while retaining a known origin.

The live view shows the current mode, row, progress, image quality, local audio losses, queued audio, decoder level, clipped-sample count, and capture error. Progressive rows can be revised as more color data arrives. A revision repaints the image without counting the row twice.

Audio level and capture

The Decoder input slider trims this module's copy of audio between -30 and +12 dB and persists the value as [sstv] rx_gain_db. It does not change the radio, browser playback, APRS, or the source recording.

The status panel reports:

  • Audio losses: forward sequence gaps observed in the local audio path.
  • Queued audio: backlog in seconds. Sustained growth means the decoder is falling behind its input.
  • Decoder level: peak level after the trim.
  • Clipped samples: samples saturated by the trim during the current session.
  • Audio capture: the current input-recording error, if any.

Pi-Sat does not replace missing sequence spans with invented samples. A reported gap finishes the current image segment and the decoder reacquires from newer audio. Packet counters describe the path after Pi-Sat receives it; they cannot prove that UDP loss did not occur earlier in the network path.

A missing signal does not immediately finish an acquired image. The decoder holds its line timing for a mode-specific receive window and flags positions that were never received. A new transmission, radio discontinuity, explicit disable, or end of input can finish a recoverable partial image sooner.

Browser PCM/WebRTC selection, volume, and mute affect browser playback only. They do not select or change the built-in decoder input.

Decode a recording

The Decode a recording form accepts one MP3 or WAV file at a time. Pi-Sat uses ffmpeg to normalize the upload to 16 kHz signed 16-bit mono PCM and sends it to a separate SSTVFlow worker. The temporary upload is removed after processing. A saved upload appears in the gallery with source uploaded.

Upload decoding does not replace or reset a live-radio decode. A recording without a VIS header can still produce a partial image when enough supported line structure is present.

Saved images

The gallery keeps the newest 25 images under <INSTALL_DIR>/data/sstv/. Each image has a JSON metadata sidecar with available UTC time, mode, status, quality, interference, acquisition, reception, frequency, and satellite data. Older image/metadata pairs are removed in pairs after a new save.

The final PNG includes row revisions. Pi-Sat also records diagnostic differences between the progressive canvas and final image, including changed pixels, missing progressive rows, and changed right-edge pixels. A stream marked complete can still contain low-quality signal regions. Complete and degraded labels describe reception status rather than a visual-quality score.

Select an image to enlarge it or use its Download action.

Diagnostic recordings

The Monitor page provides three SSTV downloads:

  • SSTV SUB audio exports mono PCM after SUB extraction and before decoder gain.
  • SSTV decoder audio exports the post-gain PCM supplied to SSTVFlow.
  • SSTV audio diagnostics exports JSONL capture metadata for packets, gain, and discontinuities.

The recordings cover the current session since Enable. They remain available after Disable until the next Enable or service restart. Download after the decoder has drained when the complete session is needed. Review recordings before sharing them because they can contain any audio received during that period.

The SSTV logs switch on Monitor controls live module and worker diagnostics. Service-wide messages remain available with:

journalctl -u pi-sat -n 100 --no-pager

Runtime and updates

Pi-Sat installs SSTVFlow from the bundled pure-Python wheel with the other requirements in the service's isolated .venv. Python 3.11 or newer is required. No Rust or Cargo build is needed.

The installer and updater verify the service interpreter and its package set. The bundled SSTVFlow license and required notice are retained at <INSTALL_DIR>/vendor/sstvflow/LICENSE.

If a manual package refresh is necessary, use the service environment:

cd <INSTALL_DIR>
.venv/bin/python -m pip install -r requirements.txt
.venv/bin/python -m pip check
sudo systemctl restart pi-sat

Do not install these dependencies into system Python.

Troubleshooting

  • Waiting for radio audio: connect the native radio session and verify that the selected SUB/RX side is producing audio.
  • Listening with no image: confirm the frequency, receive level, and decoder input trim. A high audio level or noise can produce packets without a valid SSTV image.
  • Partial or degraded image: inspect audio losses, queued audio, capture errors, and the Monitor diagnostic downloads.
  • No rows yet: header acquisition or synchronization may still be in progress. A falling audio level does not by itself end an acquired reception.
  • External DATA Decode active: disable it and restore normal AF reception before using the built-in SSTV decoder.
  • Recording decode fails: confirm ffmpeg is installed and the upload is an MP3 or WAV file.

Licensing

SSTVFlow is distributed under the PolyForm Noncommercial License 1.0.0. Required Notice: Copyright W9KSB. The complete license and notice are included with the bundled package. Project source: https://github.com/W9KSB/SSTVFlow.

Clone this wiki locally