• Stars
    star
    115
  • Rank 296,480 (Top 6 %)
  • Language OpenEdge ABL
  • License
    MIT License
  • Created almost 11 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Python classes for generating Slow-scan Television transmissions

SSTV generator in pure Python

Build Status

PySSTV generates SSTV modulated WAV files from any image that PIL can open (PNG, JPEG, GIF, and many others). These WAV files then can be played by any audio player connected to a shortwave radio for example.

My main motivation was to understand the internals of SSTV in practice, so performance is far from optimal. I tried keeping the code readable, and only performed such optimizations that wouldn't have complicated the codebase.

Command line usage

$ python -m pysstv -h
usage: __main__.py [-h]
              [--mode {MartinM1,MartinM2,ScottieS1,ScottieS2,Robot36,PasokonP3,PasokonP5,PasokonP7,PD90,PD120,PD160,PD180,PD240,PD290,Robot8BW,Robot24BW}]
              [--rate RATE] [--bits BITS] [--vox] [--fskid FSKID]
              [--chan CHAN]
              image.png output.wav

Converts an image to an SSTV modulated WAV file.

positional arguments:
  image.png             input image file name
  output.wav            output WAV file name

optional arguments:
  -h, --help            show this help message and exit
  --mode {MartinM1,MartinM2,ScottieS1,ScottieS2,Robot36,PasokonP3,PasokonP5,PasokonP7,PD90,PD120D160,PD180,PD240,Robot8BW,Robot24BW}
                        image mode (default: Martin M1)
  --rate RATE           sampling rate (default: 48000)
  --bits BITS           bits per sample (default: 16)
  --vox                 add VOX tones at the beginning
  --fskid FSKID         add FSKID at the end
  --chan CHAN           number of channels (default: mono)

Python interface

The SSTV class in the sstv module implements basic SSTV-related functionality, and the classes of other modules such as grayscale and color extend this. Most instances implement the following methods:

  • __init__ takes a PIL image, the samples per second, and the bits per sample as a parameter, but doesn't perform any hard calculations
  • gen_freq_bits generates tuples that describe a sine wave segment with frequency in Hz and duration in ms
  • gen_values generates samples between -1 and +1, performing sampling according to the samples per second value given during construction
  • gen_samples generates discrete samples, performing quantization according to the bits per sample value given during construction
  • write_wav writes the whole image to a Microsoft WAV file

The above methods all build upon those above them, for example write_wav calls gen_samples, while latter calls gen_values, so typically, only the first and the last, maybe the last two should be called directly, the others are just listed here for the sake of completeness and to make the flow easier to understand.

License

The whole project is available under MIT license.

Useful links

Dependencies

  • Python 3.5 or later
  • Python Imaging Library (Debian/Ubuntu package: python-imaging)

More Repositories

1

burp-oauth

OAuth plugin for Burp Suite Extender
Java
42
star
2

adsdroid

Unofficial AllDataSheet Android application
Java
29
star
3

base64-vbs.py

converts EXE (or other binary) files to VBS scripts
Python
24
star
4

pysecstr

Clears the contents of strings containing cryptographic material
C
12
star
5

usbpwn-host

USBpwn source code for Windows hosts
C
10
star
6

usbpwn-device

USBpwn source code for AVR USB device
C
10
star
7

ut2025b

FLOSS Python driver for UNI-T UT2025B scopes
Python
10
star
8

SudsSigner

SOAP signature plugin for SUDS
Python
8
star
9

flowtools

Tools for analyzing and working with Wireshark TCP flow exports
Python
8
star
10

TorLang

TOR implemented in Erlang
Erlang
7
star
11

androsphinx

SPHINX for Android
Java
7
star
12

xc3sprog

Spartan3 programming tools for GNU/Linux
C++
7
star
13

suds

lightweight SOAP python client for consuming Web Services (fork of Debian repo)
Python
6
star
14

pyxmlsec

Python bindings for XML Security Library
C
6
star
15

arduino-sqwave

Arduino PWM based manageable square wave generator up to 1 MHz
6
star
16

hacksense-rest-api

HackSense public REST API
PHP
5
star
17

thesis

My MSc Thesis Study at the Budapest University of Technology and Economics
TeX
4
star
18

dashboard

Personal dashboard
Python
4
star
19

eks

Erlang Key Server (HKP-compliant for PGP operations)
Erlang
4
star
20

fpga-md5

FPGA MD5 cracker for my Hacktivity 2008 talk
Verilog
4
star
21

mplayer-lolshield

MPlayer-LoL shield frame generator
Python
4
star
22

atomizer

Feed parser written in Erlang
Erlang
4
star
23

NFCat

Mifare Classic CUI for NFC-enabled Android devices
Java
4
star
24

ssh-smtp

proxy SMTP connections to multiple servers over SSH
C++
4
star
25

sidbox-ctrl

SIDbox controller
Python
4
star
26

photochecklist

Photo Checklist application based on Flask
JavaScript
4
star
27

soldering-is-easy.hu

Soldering is easy Hungarian translation
4
star
28

arduino-c64-keyboard

C64 keyboard interface for Arduino with decoder
3
star
29

corba-chat-java

Simple chat using CORBA in Java
Java
3
star
30

SimpleDSO

Non-official mirror of the SimpleDSO project
Python
3
star
31

coolspace

How cool is your hackerspace? (based on spaceAPI data)
Erlang
3
star
32

anonshort

Privacy-enhanced resolver for shortened URLs
Python
3
star
33

swram-opengl

OpenGL visualization for swarm simulations
Python
3
star
34

mptr.py

Unofficial Magyar Posta Tracker API with Requests
Python
3
star
35

burp-gwt-wrapper

Burp Suite GWT wrapper
Python
3
star
36

hacksense-comm

HackSense embedded component
C
3
star
37

sympa-python-api

Python API for accessing Sympa mailing lists
Python
3
star
38

series-tools

Handy tools for managing local collections of television series
Python
2
star
39

ppcg

Python PHP code generator
Python
2
star
40

outbox-sync

uploads mbox files into IMAP folders sorted by sender
Python
2
star
41

posta-irszam

Parser for Hungarian Post ZIP code listings
Python
2
star
42

hspbp-topicgen

#hspbp topic generation related Erlang modules
Erlang
2
star
43

senspiral

HackSense visualization in a spiral form using HTML5 canvas
JavaScript
2
star
44

unixsstv

UNIX-style SSTV pipeline
C
2
star
45

hapx

Hardware PulseAudio Mixer
C++
2
star
46

burp-scripts

Scripts I wrote to extend Burp Suite functionality
Python
2
star
47

tavszamla-tools

Handy tools for console access to Távszámla
Python
2
star
48

hacksense-png

HackSense PNG banner
PHP
2
star
49

aleph-python-api

Python API for accessing Aleph library systems
Python
2
star
50

snifer

SNI Forwarder in Erlang
Erlang
1
star
51

wp-megye

Parser for Hungarian county list of Wikipedia
Python
1
star
52

trac-svn2git

Trac database SVN to Git converter
Python
1
star
53

omnom

Omnom is a bookmarking/url shortening and archival service.
JavaScript
1
star
54

rgdm

Redmine-Git Database Migrator
Shell
1
star
55

stfu-fabathome

STFU Fab@Home!
C
1
star
56

giana-glite

Distributed Giana Sisters music synthesizer using gLite
C
1
star
57

libopaque-sys

Low-level FFI Rust bindings for libopa
Rust
1
star
58

wireshark-mysql-dissector

My fork of the Wireshark MySQL dissector
C
1
star
59

wsfacade

implements a web facade to access SOAP web services using Flask and SUDS
Python
1
star
60

registr

Redmine Git Issue Shifter
Python
1
star
61

wedsite

Wedding microsite with RSVP and wishlist using Flask
Python
1
star
62

mail2self

Android application for quickly sending mails to yourself
Java
1
star
63

g3mails

Get Google Groups mails via Atom feed using Erlang
Erlang
1
star
64

srelay-ctrl

Relay board controller (serial version)
C
1
star
65

filter-pvm

Distributed edge detection filter using PVM3
C
1
star
66

qtdloprez

QT DisplayLink presenter
C++
1
star
67

sec-wall

A feature packed high-performance security proxy
Python
1
star
68

c64joystick-arduino

Primitive C64 joystick to Arduino adapter
Python
1
star
69

chrl

Cheap RGB lanterns
Eagle
1
star
70

hack2o

Stepper motor powered flow controller
Processing
1
star
71

OpenDomi

Open source clone of the domain sanity checking utility by ISZT called Domi
Python
1
star
72

git-autopull

fetches and cleans git repositories recursively
Python
1
star
73

hacksense-push-api

HackSense public push API
Erlang
1
star
74

russtv

Rust proof-of-concept for generating Slow-scan Television transmissions
Rust
1
star
75

clicknfuzz

Experimental protocol fuzzer
Python
1
star
76

cmp

Colour Me Pretty! (Android application designed by dittygirl)
Java
1
star
77

corba-chat-python

Simple chat using CORBA in Python
Python
1
star
78

flake

A decentralized, k-ordered id generation service in Erlang
Erlang
1
star