filter

package
v0.0.0-...-b5bc081 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2015 License: MIT Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidDuration = errors.New("invalid duration")
	ErrClipOutside     = errors.New("clip zone is outside video")
	ErrTruncatedChunk  = errors.New("chunk was truncated")
)

Functions

func EncodeFiltered

func EncodeFiltered(w io.Writer, m *mp4.MP4, f Filter) error

EncodeFiltered encodes a media to a writer, filtering the media using the specified filter

Types

type Filter

type Filter interface {
	// Updates the moov box
	FilterMoov(m *mp4.MoovBox) error
	// Filters the Mdat data and writes it to w
	FilterMdat(w io.Writer, m *mp4.MdatBox) error
}

func Clip

func Clip(begin, duration time.Duration) Filter

Clip returns a filter that extracts a clip between begin and begin + duration (in seconds, starting at 0) Il will try to include a key frame at the beginning, and keeps the same chunks as the origin media

func Noop

func Noop() Filter

Noop returns a filter that does nothing

Jump to

Keyboard shortcuts

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