Documentation
¶
Index ¶
- Variables
- type FFmpeg
- func (f FFmpeg) ConcatVideos(inputPaths []string, OutPutFormatExtension string) (string, error)
- func (f FFmpeg) ExtractAudio(inputPath, OutPutFormatExtension string, copyAudioCodec bool) (string, error)
- func (f FFmpeg) ExtractAudioClip(inputPath, OutPutFormatExtension string, startSec, endSec float64, ...) (string, error)
- func (f FFmpeg) ExtractVideo(inputPath, OutPutFormatExtension string, copyVideoCodec bool) (string, error)
- func (f FFmpeg) ExtractVideoClip(inputPath, OutPutFormatExtension string, startSec, endSec float64, ...) (string, error)
- func (f FFmpeg) Run(args []string) error
- func (f FFmpeg) TranscodeVideo(inputPath, OutPutFormatExtension string) (string, error)
Constants ¶
This section is empty.
Variables ¶
var (
FFMPEG_TempDir string
)
Functions ¶
This section is empty.
Types ¶
type FFmpeg ¶
type FFmpeg struct {
// contains filtered or unexported fields
}
FFmpeg represents the FFmpeg wrapper.
func (FFmpeg) ConcatVideos ¶
ConcatVideos concatenates multiple video files into a single video. []string videos should have same resolution. Example: ConcatVideos(
[]string{ "/home/linuxsploit/demo1.mp4", "/home/linuxsploit/demo2.mp4", "/home/linuxsploit/demo3.mp4", }, ".mkv", )
func (FFmpeg) ExtractAudio ¶
func (f FFmpeg) ExtractAudio(inputPath, OutPutFormatExtension string, copyAudioCodec bool) (string, error)
ExtractAudio extracts audio stream from a video file with the specified output format extension and audio codec options. It takes the input video file path, output file path with the desired extension (e.g., ".mp3", ".ogg"), and a boolean flag to control audio codec copying. It returns the path to the extracted audio file and any encountered errors. example: outputVideoPath,err := ExtractAudio("/home/linuxsploit/demo.mp4",".mp3",false)
func (FFmpeg) ExtractAudioClip ¶
func (f FFmpeg) ExtractAudioClip(inputPath, OutPutFormatExtension string, startSec, endSec float64, copyAudioCodec bool) (string, error)
ExtractAudioClip extracts an audio clip from a specified time range in a video file. It takes the input video file path, start time in seconds, end time in seconds, and boolean flags to control video and audio options. It returns the path to the extracted audio clip file and any encountered errors. example: ExtractAudioClip("/home/linuxsploit/demo.mp4", ".mp3", 25, 50, false)
func (FFmpeg) ExtractVideo ¶
func (f FFmpeg) ExtractVideo(inputPath, OutPutFormatExtension string, copyVideoCodec bool) (string, error)
ExtractVideo extracts video stream from a video file with the specified output format extension and video codec options. It takes the input video file path, output file path with the desired extension (e.g., ".mp4", ".avi"), and a boolean flag to control video codec copying. It returns the path to the extracted video file and any encountered errors. Example: outputVideoPath, err := ExtractVideo("/home/linuxsploit/demo.mp4", ".mp4", false)
func (FFmpeg) ExtractVideoClip ¶
func (f FFmpeg) ExtractVideoClip(inputPath, OutPutFormatExtension string, startSec, endSec float64, copyVideoCodec, disableAudio bool) (string, error)
ExtractVideoClip extracts a video clip from a specified time range in a video file. It takes the input video file path, start time in seconds, end time in seconds, and boolean flags to control video and audio options. It returns the path to the extracted video clip file and any encountered errors. example: ExtractVideoClip("/home/linuxsploit/demo.mp4", ".mp4", 25, 50, false, false)