media

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package media provides utilities for working with audio and video files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckFFmpeg

func CheckFFmpeg() error

CheckFFmpeg verifies that ffmpeg is installed and accessible.

func CheckFFprobe

func CheckFFprobe() error

CheckFFprobe verifies that ffprobe is installed and accessible.

func GetAudioDuration

func GetAudioDuration(path string) (time.Duration, error)

GetAudioDuration returns the duration of an audio file using ffprobe. This consolidates the duplicate implementations that were in: - pkg/tts/audio.go - pkg/audio/player.go - pkg/video/image_video.go

func GetAudioDurationMs

func GetAudioDurationMs(path string) (int, error)

GetAudioDurationMs returns the audio duration in milliseconds.

func GetDuration

func GetDuration(path string) (time.Duration, error)

GetDuration returns the duration of a media file (audio or video).

func GetDurationMs

func GetDurationMs(path string) (int, error)

GetDurationMs returns the duration in milliseconds.

func GetVideoDuration

func GetVideoDuration(path string) (time.Duration, error)

GetVideoDuration returns the duration of a video file using ffprobe.

func GetVideoDurationMs

func GetVideoDurationMs(path string) (int, error)

GetVideoDurationMs returns the video duration in milliseconds.

Types

This section is empty.

Jump to

Keyboard shortcuts

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