Documentation ¶
Overview ¶
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 Abiira Nathan <nabiira2by2@gmail.com>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Index ¶
- Constants
- func AddSubtitles(inputFilename, outputFilename, subtitlesFilename string) error
- func ApplyImageWatermark(inputFilename, outputFilename, watermarkImage string, position string, ...) error
- func ApplyTextWatermark(inputFilename, outputFilename, text, position, bgColor, fgColor string, ...) error
- func ApplyVideoFilter(inputFilename, outputFilename, filterExpression string) error
- func ChangeAudioVolume(inputFilename, outputFilename string, volumeFactor float32) error
- func ConcatenateVideos(inputFilenames []string, outputFilename string, destWidth, destHeight int) error
- func ConvertToGif(inputFilename, outputFilename string, width, height, fps int, from, to string) error
- func ConvertVideos(globPattern, outputFormat, outputDir string, quality int) error
- func ExecShell(command string) error
- func Execute()
- func ExtractAudioChannel(inputFilename, outputFilename string, channelIndex int) error
- func ExtractAudioChannels(inputFilename, outputFilename string, channelIndices []int) error
- func ExtractAudioFrequencies(inputFilename, outputFilename string, startFrequency, endFrequency int) error
- func ExtractAudioFromVideoWithTimestamps(videoFilename, outputFilename string, codec string, ...) error
- func ExtractFrame(inputFilename, outputFilename string, timestamp string) error
- func ExtractFrameAtTimestamps(inputFilename, outputDirectory string, timestamps []string) error
- func ExtractFrames(inputFilename, outputPattern string, frameRate int) error
- func ExtractStereoChannels(inputFilename, outputLeftFilename, outputRightFilename string) error
- func ExtractVideoSegment(inputFilename, outputFilename, startTime, duration string) error
- func ImagesToVideo(inputFormat, outputFilename string, framerate, width, height int) error
- func MergeAudioWithVideo(audioFilename, videoFilename, outputFilename string) error
- func PrintMediaMetadata(filename string) error
- func ResizeVideo(input, output string, width, height int) error
- func RotateVideo(inputFilename, outputFilename string, angle int) error
- func ScaleImage(inputFilename, outputFilename string, width, height int) error
- func ScaleImageToAspectRation(inputFilename, outputFilename string, aspectRation float32) error
- func TrimSilence(inputFilename, outputFilename string, silenceThreshold float64) error
- func VideoToImages(inputFilename, outputDirectory, imageFormat string, width, height int, ...) error
Constants ¶
const ( OVERLAY_CENTER = "(main_w-overlay_w)/2:(main_h-overlay_h)/2" OVERLAY_TOP_LEFT = "10:10" OVERLAY_TOP_RIGHT = "(main_w-overlay_w)-10:10" OVERLAY_TOP_CENTER = "(main_w-overlay_w)/2:10" OVERLAY_BOTTOM_LEFT = "10:(main_h-overlay_h)-10" OVERLAY_BOTTOM_RIGHT = "(main_w-overlay_w)-10:(main_h-overlay_h)-10" OVERLAY_BOTTOM_CENTER = "(main_w-overlay_w)/2:(main_h-overlay_h)-10" )
Variables ¶
This section is empty.
Functions ¶
func AddSubtitles ¶
Function to add subtitles to a video
func ApplyImageWatermark ¶
func ApplyImageWatermark(inputFilename, outputFilename, watermarkImage string, position string, width, height int) error
Function to apply a watermark image on a video with a specific size
func ApplyTextWatermark ¶
func ApplyTextWatermark(inputFilename, outputFilename, text, position, bgColor, fgColor string, fontSize float32, fontPath string) error
Function to apply a text watermark on a video with a specific size
func ApplyVideoFilter ¶
Function to apply a video filter to a video file
func ChangeAudioVolume ¶
Function to change the volume of an audio file
func ConcatenateVideos ¶
func ConvertToGif ¶
func ConvertToGif(inputFilename, outputFilename string, width, height, fps int, from, to string) error
Function to convert a video file to a GIF
func ConvertVideos ¶
Convert videos matching a glob pattern to output format with specified quality Codec is guessed from output format: e.g mp4, mkv, etc quality value should be between 1 and 31, where 1 represents the highest quality
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func ExtractAudioChannel ¶
Function to extract a specific audio channel from a multi-channel audio file
func ExtractAudioChannels ¶
Function to extract specific audio channels from a multi-channel audio file
func ExtractAudioFrequencies ¶
func ExtractAudioFrequencies(inputFilename, outputFilename string, startFrequency, endFrequency int) error
Generate a new audio file containing only the frequencies within the specified range.
func ExtractAudioFromVideoWithTimestamps ¶
func ExtractAudioFromVideoWithTimestamps(videoFilename, outputFilename string, codec string, startTimestamp, endTimestamp string) error
Extract audio from a video with specified audio codec. default is to copy source codec startTimestamp and/or endTimestamp are optional. If codec is empty string will use source codec.
func ExtractFrame ¶
Extract frame at given video timestamp. To use this function, you need to pass the input video file, output image filename, and the desired timestamp in the format "hh:mm:ss" (e.g., "00:01:23" to extract the frame at 1 minute and 23 seconds)
func ExtractFrameAtTimestamps ¶
Extract a video frame/image to jpg per timestamp.
func ExtractFrames ¶
Function to extract frames from a video
func ExtractStereoChannels ¶
* ExtractStereoChannels function takes the input audio file path and the output file paths for the left and right channels. It uses the pan audio filter with the 1c option to extract each channel separately. The c0=c0 parameter specifies that the left channel should be taken from the original audio's first channel (c0), and c0=c1 specifies that the right channel should be taken from the original audio's second channel (c1). The resulting audio files will contain the left and right channels of the stereo audio, respectively
func ExtractVideoSegment ¶
Function to extract a specific video segment based on duration
func ImagesToVideo ¶
Function to convert a series of images to a video file e.g ImagesToVideo("input_images/*.png", "output.mp4", 30, 640, 480, "slow")
func MergeAudioWithVideo ¶
Function to merge an audio file with a video file
func PrintMediaMetadata ¶
Prints the metadata for a media file.
func ResizeVideo ¶
func RotateVideo ¶
func ScaleImage ¶
Scale image to given width and height.
func ScaleImageToAspectRation ¶
Scale image to a given aspect ratio.
func TrimSilence ¶
Remove silent parts from a video or audio.
Types ¶
This section is empty.
Source Files ¶
- addAudio.go
- addSubtitles.go
- applyFilter.go
- changeVolume.go
- concatVideos.go
- convertVideo.go
- createGif.go
- cutVideo.go
- extractAudio.go
- extractFrame.go
- extractFreq.go
- extractStereo.go
- ffmpeg.go
- genImages.go
- imageWatermark.go
- img2Video.go
- metadata.go
- resize.go
- root.go
- rotateVideo.go
- scaleImage.go
- textWatermark.go
- trimSilence.go