Documentation ¶
Index ¶
Constants ¶
const ( FORMAT_JPEG = pictureOutputFormat(iota) FORMAT_PNG FORMAT_TIFF )
Variables ¶
var CVLCBinPath string
CVLCBinPath holds the location of the CVLC executable binary.
var DisableHardwareAudioVideoCodec = true
DisableHardwareAudioVideoCodec forces the CPU to do encoding, this may solve problems with nvidia drivers on Linux.
var TempWorkDir string
TempWorkDir is the location where VLC will temporarily save the snapshot to. Default is the process work dir (PWD).
Functions ¶
This section is empty.
Types ¶
type Video ¶
type Video struct { Source string // Path to the video file OutputFormat pictureOutputFormat // The output format of the thumbnail, default is FORMAT_JPEG Time int // Which second of the video a snapshot is to be created of // contains filtered or unexported fields }
Video structure defines which file (Source) to create a snapshot of. Valid OutputFormat arguments are FORMAT_JPEG, FORMAT_PNG, FORMAT_TIFF. The Time defines which second of the given Source a snapshot should be made.
func (Video) CommandLog ¶
CommandLog returns the stdout and stderr output of the exec.Command("cvlc", ...). This can be useful for debugging any errors not caught by this package. Will only contain logs after calling Generate() or GenerateTo().
func (*Video) Generate ¶
Generate returns a snapshot in the given OutputFormat from the Source in a byte slice or an error.
func (*Video) GenerateTo ¶
GenerateTo generates a snapshot in the given OutputFormat from the Source and saves it to the given saveLocation if the returned error is nil. No file extension (eg .jpg) will be added to the saveLocation path. It's up to the user to do this.