sstv

package module
v0.0.0-...-58c82ca Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

README

参考调制:https://zh.wikipedia.org/wiki/%E6%85%A2%E6%89%AB%E6%8F%8F%E7%94%B5%E8%A7%86

以下为原 Repo 内容 go SSTV

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

Usage

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

For a full list of mode constants, refer to the package documentation

Command Line Interface

The package includes a command line interface for testing purposes:

# Generate a Martin1 encoded image:
$ sstv-cli -m1 -sample-rate=41000 input.png output.wav

# Generate a Scottie1 encoded image:
$ sstv-cli -s1 -sample-rate=41000 input.png output.wav

# Display all modes:
$ sstv-cli -help

You may install the CLI command via go get -u github.com/dotStart/go-sstv/...

License

Copyright [year] [name] <[email]>
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 <johannesd@torchmind.com> * 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 <johannesd@torchmind.com> * 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 <johannesd@torchmind.com> * 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 <johannesd@torchmind.com> * 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 <johannesd@torchmind.com> * 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 <johannesd@torchmind.com> * 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 <johannesd@torchmind.com> * 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 <johannesd@torchmind.com> * 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 <johannesd@torchmind.com> * 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

创建与Martin兼容的新图像编码器

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 <johannesd@torchmind.com> * and other copyright owners as documented in the project's IP log.
* Copyright 2018 Johannes Donath <johannesd@torchmind.com> * 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