av

package
v0.0.0-...-ef5f187 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Codeblock

func Codeblock(inner string) string

func GetFFmpegFrame

func GetFFmpegFrame(filename string, frameNumber int) (image.Image, error)

func GetMediaDuration

func GetMediaDuration(filename string) (time.Duration, error)

func Markdown

func Markdown(basedir, contents string) string

Calls marp with markdown to generate an image. Everything after --- will be ignored Returns the image file which is uniquely named based on the passed in contents

Types

type FFmpeg

type FFmpeg struct {
	Cmd            *exec.Cmd
	Stdin          io.WriteCloser
	Stdout, Stderr io.ReadCloser
	Buffer         []byte
}

func NewFFmpeg

func NewFFmpeg(width, height, fps int, filename string) (*FFmpeg, error)

This is for FFmpeg output

func (*FFmpeg) Close

func (f *FFmpeg) Close()

func (*FFmpeg) SendBuffer

func (f *FFmpeg) SendBuffer() error

Sends the buffer to the underlying FFMPEG process

func (*FFmpeg) Start

func (f *FFmpeg) Start() error

type FFmpegStream

type FFmpegStream struct {
	AudioEnabled bool // Used to turn on audio streaming
	// contains filtered or unexported fields
}

func NewFFmpegStream

func NewFFmpegStream(filename string, startTime time.Duration) (*FFmpegStream, error)

func (*FFmpegStream) Close

func (f *FFmpegStream) Close()

func (*FFmpegStream) Fps

func (f *FFmpegStream) Fps() int

func (*FFmpegStream) GetAudioStream

func (f *FFmpegStream) GetAudioStream() chan [2]float64

func (*FFmpegStream) GetImage

func (f *FFmpegStream) GetImage() (*image.RGBA, int, error)

func (*FFmpegStream) Seek

func (f *FFmpegStream) Seek(timestamp time.Duration) error

Jump to

Keyboard shortcuts

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