func (e *Encoder) SetWidth(width string) int {
	e.config.Width, _ = strconv.Atoi(width)
	e.fixValues()
	return e.config.Width
}
SetWidth sets the transcode frame width from a string.
This can also be passed into Get() as an int.
package ffmpeg
import (
	"bytes"
	"fmt"
	"io"
	"os/exec"
	"path/filepath"
	"strconv"
	"strings"
)
var (
	DefaultFrameRate   = 5
	MinimumFrameRate   = 1
	MaximumFrameRate   = 60
	DefaultFrameHeight = 720
	DefaultFrameWidth  = 1280
	MinimumFrameSize   = 100
	MaximumFrameSize   = 5000
	DefaultEncodeCRF   = 21
	MinimumEncodeCRF   = 16
	MaximumEncodeCRF   = 30
	DefaultCaptureTime = 15
	MaximumCaptureTime = 1200              
	DefaultCaptureSize = int64(2500000)    
	MaximumCaptureSize = int64(104857600)  
	DefaultFFmpegPath  = "/usr/local/bin/ffmpeg"
	DefaultProfile     = "main"
	DefaultLevel       = "3.0"
)
var (
	ErrorInvalidOutput = fmt.Errorf("output path is not valid")
	ErrorInvalidInput  = fmt.Errorf("input path is not valid")
)
type Config struct {
	Copy   bool    
	Audio  bool    
	Width  int     
	Height int     
	CRF    int     
	Time   int     
	Rate   int     
	Size   int64   
	FFMPEG string  
	Level  string  
	Prof   string  
}
type Encoder struct {
	config *Config
}
func Get(config *Config) *Encoder {
	e := &Encoder{config: config}
	if e.config.FFMPEG == "" {
		e.config.FFMPEG = DefaultFFmpegPath
	}
	e.SetLevel(e.config.Level)
	e.SetProfile(e.config.Prof)
	e.fixValues()
	return e
}
func (e *Encoder) Config() Config {
	return *e.config
}
func (e *Encoder) SetAudio(audio string) bool {
	e.config.Audio, _ = strconv.ParseBool(audio)
	return e.config.Audio
}
func (e *Encoder) SetLevel(level string) string {
	if e.config.Level = level; level != "3.0" && level != "3.1" && level != "4.0" && level != "4.1" && level != "4.2" {
		e.config.Level = DefaultLevel
	}
	return e.config.Level
}
func (e *Encoder) SetProfile(profile string) string {
	if e.config.Prof = profile; e.config.Prof != "main" && e.config.Prof != "baseline" && e.config.Prof != "high" {
		e.config.Prof = DefaultProfile
	}
	return e.config.Prof
}