ffmpeg

package
v0.0.0-...-4d1a098 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package ffmpeg lets you access the camera via ffmpeg to stream video and to create snapshots.

This package requires the `ffmpeg` command line tool to be installed. Install by running - use https://github.com/homebridge/ffmpeg-for-homebridge on linux - `sudo port install ffmpeg +nonfree` on macOS

HomeKit supports multiple video codecs but h264 is mandatory. So make sure that a h264 decoder for ffmpeg is installed too.

Index

Constants

This section is empty.

Variables

View Source
var Stderr = ioutil.Discard
View Source
var Stdout = ioutil.Discard

Functions

func EnableVerboseLogging

func EnableVerboseLogging()

EnableVerboseLogging enables verbose logging of ffmpeg to stdout.

func New

func New(cfg Config) *ffmpeg

New returns a new ffmpeg handle to start and stop video streams and to make snapshots.

Types

type Config

type Config struct {
	VideoDevice     string
	VideoFilename   string
	AudioDevice     string
	AudioNameInput  string
	AudioNameOutput string
	H264Decoder     string
	H264Encoder     string
	MinVideoBitrate int
}

Config contains ffmpeg parameters

type FFMPEG

type FFMPEG interface {
	PrepareNewStream(rtp.SetupEndpoints, rtp.SetupEndpointsResponse) StreamID
	Start(StreamID, rtp.VideoParameters, rtp.AudioParameters) error
	Stop(StreamID)
	Suspend(StreamID)
	Resume(StreamID)
	ActiveStreams() int
	Reconfigure(StreamID, rtp.VideoParameters, rtp.AudioParameters) error
	Snapshot(width, height uint) (*image.Image, error)
}

FFMPEG lets you interact with video stream.

type StreamID

type StreamID string

StreamID is the type of the stream identifier

type StreamNotFoundError

type StreamNotFoundError struct {
	// contains filtered or unexported fields
}

func (*StreamNotFoundError) Error

func (e *StreamNotFoundError) Error() string

Jump to

Keyboard shortcuts

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