Coder Social home page Coder Social logo

node-sstv's Introduction

node-sstv

(Another) SSTV image encoder for NodeJS. Inspired by echicken/node-sstv.

This library attempts to implement the encoding process of SSTV modes by following the Proposal for SSTV Mode Specifications paper by JL Barber, and echicken/node-sstv's repository as reference for the PCM generation and scanline sampling.

API

Refer to the generated documentation.

Examples

  • Creates a SSTV stream using mode Pakoson 7 into a file.
    const { SSTVStream, Mode, PCMFormat } = require('node-sstv')
    const fs = require('node:fs')
    
    new SSTVStream(Mode.PASOKON_7, 'cute_tako.png', {
        pcmFormat: PCMFormat.SIGNED_16_LE,
        sampleRate: 44100
    }).pipe(fs.createWriteStream('sstv_tako.pcm'))
  • Creates a SSTV stream and plays it out of the speakers (using ffplay)
    const { SSTVStream, Mode, PCMFormat } = require('node-sstv')
    const { spawn } = require('node:child_process')
    
    const ffplay = spawn('ffplay', [
        '-f', 's16le',
        '-ar', '44100',
        '-ac', '1',
        '-autoexit',
        '-'
    ])
    
    new SSTVStream(Mode.PASOKON_7, 'cute_tako.png', {
        pcmFormat: PCMFormat.SIGNED_16_LE,
        sampleRate: 44100
    }).pipe(ffplay.stdin)

Supported modes

Mode Alias
Scottie 1 Mode.SCOTTIE_1
Scottie 2 Mode.SCOTTIE_2
Scottie DX Mode.SCOTTIE_DX
Martin 1 Mode.MARTIN_1
Martin 2 Mode.MARTIN_2
Robot Color 36 Mode.ROBOT_36
Robot Color 72 Mode.ROBOT_72
Wrasse SC2-180 Mode.SC2_180
Pasokon 3 Mode.PASOKON_3
Pasokon 5 Mode.PASOKON_5
Pasokon 7 Mode.PASOKON_7
PD50 Mode.PD50
PD90 Mode.PD90
PD120 Mode.PD120
PD160 Mode.PD160
PD180 Mode.PD180
PD240 Mode.PD240
PD290 Mode.PD290
FAX480 Mode.FAX480

License

MIT

node-sstv's People

Contributors

vignedev avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.