sstv

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

README

go-sstv

Encoding of images into audio using the SSTV standard (and its most popular encoding modes such as Martin, Robot and Scottie).

Usage

As a module

To get the module, use go get git.brokenmouse.studio/ever/go-sstv

tv := sstv.NewMartin(sstv.Martin1, &audio.Format{
  SampleRate: 41000,
  NumChannels: 1,
})

// Or for the other modes:
//   sstv.NewPasokon(sstv.Pasokon3, format)
//   sstv.NewRobot(sstv.Robot36, format)
//   sstv.NewScottie(sstv.Scottie1, format)
//   sstv.NewWrasse(sstv.WrasseSC2180, format)
// For a full list of mode constants, refer to the package documentation
As a CLI

To install the CLI, run go install git.brokenmouse.studio/ever/go-sstv/sstv-cli

# Encode as Robot36
sstv-cli -r36 -sample-rate=41000 input.png output.wav

# Encode as Scottie1
sstv-cli -s1 -sample-rate=41000 input.png output.wav

# Display all available modes
sstv-cli -help

License

This repository was forked from https://github.com/victoraldir/go-sstv and https://github.com/dotStart/go-sstv

Copyright 2018 Johannes Donath <[email protected]>
and other copyright owners as documented in the project's IP log.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Documentation

Overview

* Copyright 2018 Johannes Donath <[email protected]> * and other copyright owners as documented in the project's IP log. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

* Copyright 2018 Johannes Donath <[email protected]> * and other copyright owners as documented in the project's IP log. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

* Copyright 2018 Johannes Donath <[email protected]> * and other copyright owners as documented in the project's IP log. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

* Copyright 2018 Johannes Donath <[email protected]> * and other copyright owners as documented in the project's IP log. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

* Copyright 2018 Johannes Donath <[email protected]> * and other copyright owners as documented in the project's IP log. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

* Copyright 2018 Johannes Donath <[email protected]> * and other copyright owners as documented in the project's IP log. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

* Copyright 2018 Johannes Donath <[email protected]> * and other copyright owners as documented in the project's IP log. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

* Copyright 2018 Johannes Donath <[email protected]> * and other copyright owners as documented in the project's IP log. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

* Copyright 2018 Johannes Donath <[email protected]> * and other copyright owners as documented in the project's IP log. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

Index

Constants

View Source
const BitDepth = 16

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder

type Encoder interface {
	// retrieves the vis which is to be encoded within the handshake
	Vis() uint8
	// retrieves the standard resolution for this transmission format
	// while this width and height is typically not required for successful encoding, it is
	// recommended to stick to them as most decoders will expect the standard sizes
	Resolution() image.Rectangle
	// encodes a given image into an SSTV audio signal represented by an array of raw PCM samples
	Encode(image image.Image) *audio.FloatBuffer
}

represents an arbitray SSTV encoder

func NewMartin

func NewMartin(mode MartinMode, format *audio.Format) Encoder

creates a new Martin compatible image encoder

func NewPasokon

func NewPasokon(mode PasokonMode, format *audio.Format) Encoder

creates a new Pasokon compatible image encoder

func NewRobot

func NewRobot(mode RobotMode, format *audio.Format) Encoder

creates a new Martin compatible image encoder

func NewScottie

func NewScottie(mode ScottieMode, format *audio.Format) Encoder

creates a new Scottie compatible image encoder

func NewWrasse

func NewWrasse(mode WrasseMode, format *audio.Format) Encoder

creates a new Wrasse compatible image encoder

type MartinMode

type MartinMode uint8
const (
	Martin1 MartinMode = 44
	Martin2 MartinMode = 40
)

type PasokonMode

type PasokonMode uint8
const (
	Pasokon3 PasokonMode = 113
	Pasokon5 PasokonMode = 114
	Pasokon7 PasokonMode = 115
)

type RobotMode

type RobotMode uint8
const (
	Robot36 RobotMode = 8
	Robot72 RobotMode = 12
)

type ScottieMode

type ScottieMode uint8
const (
	Scottie1  ScottieMode = 60
	Scottie2  ScottieMode = 56
	ScottieDx ScottieMode = 76
)

type WrasseMode

type WrasseMode uint8
const (
	WrasseSC2180 WrasseMode = 55
)

Directories

Path Synopsis
* Copyright 2018 Johannes Donath <[email protected]> * and other copyright owners as documented in the project's IP log.
* Copyright 2018 Johannes Donath <[email protected]> * and other copyright owners as documented in the project's IP log.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL