screengen

package module
v0.0.0-...-079163d Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2018 License: GPL-3.0 Imports: 6 Imported by: 5

README

This repository has migrated to gitlab.com/opennota/screengen.

Documentation

Overview

Package screengen can be used for generating screenshots from video files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	Fast bool // Imprecise (but faster) seek; set by the user

	Filename string // Video file name

	Duration           int64   // Duration of the video in milliseconds
	VideoCodec         string  // Name of the video codec
	VideoCodecLongName string  // Readable/long name of the video codec
	FPS                float64 // Frames Per Second

	AudioCodec         string // Name of the audio codec
	AudioCodecLongName string // Readable/long name of the audio codec

	Bitrate int
	// contains filtered or unexported fields
}

Generator is used to generate screenshots from a video file.

func NewGenerator

func NewGenerator(fn string) (_ *Generator, err error)

NewGenerator returns new generator of screenshots for the video file fn.

func (*Generator) Close

func (g *Generator) Close() error

Close closes the internal ffmpeg context.

func (*Generator) Height

func (g *Generator) Height() int

Height returns the height of the video

func (*Generator) Image

func (g *Generator) Image(ts int64) (image.Image, error)

Image returns a screenshot at the ts milliseconds.

func (*Generator) ImageWxH

func (g *Generator) ImageWxH(ts int64, width, height int) (image.Image, error)

ImageWxH returns a screenshot at the ts milliseconds, scaled to the specified width and height.

func (*Generator) Width

func (g *Generator) Width() int

Width returns the width of the video

Directories

Path Synopsis
cmd
screengen
A tool that generates thumbnail grids from video files with the help of ImageMagick's convert.
A tool that generates thumbnail grids from video files with the help of ImageMagick's convert.

Jump to

Keyboard shortcuts

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