videoutils

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2025 License: MIT Imports: 6 Imported by: 0

README

FrameNet Video Utils for Go

Go Reference

A simple Go module for getting video file details like duration, resolution, and frame rate.

This package provides a single, easy-to-use function to quickly analyze local video files, a common task in video processing workflows. It requires ffmpeg (which includes ffprobe) to be installed and available in your system's PATH.


About FrameNet.ai

This utility is proudly developed and maintained by the team at FrameNet.ai. Our mission is to make video creation effortless through powerful, AI-driven tools.

While this package helps developers work with video programmatically, our platform offers a full suite of free tools for creators:


Installation

Install the package directly using go get:

go get github.com/Ruka-Surendra-Kumar-Reddy/framenet-video-utils-go

Usage

The library exports one primary function, GetVideoDetails().

package main

import (
	"fmt"
	videoutils "github.com/Ruka-Surendra-Kumar-Reddy/framenet-video-utils-go"
)

func main() {
	details, err := videoutils.GetVideoDetails("path/to/your/video.mp4")
	if err != nil {
		fmt.Println("Error:", err)
		return
	}

	fmt.Printf("Duration: %.2fs\n", details.DurationSeconds)
	fmt.Printf("Resolution: %dx%d\n", details.Dimensions.Width, details.Dimensions.Height)
	fmt.Printf("Frame Rate: %.2f fps\n", details.Fps)
}

About FrameNet.ai

FrameNet.ai is a comprehensive suite of AI tools designed to simplify and automate your video creation workflow, from text-to-video generation to automatic subtitling.

➡️ Learn more about the FrameNet.ai platform

Documentation

Overview

videoutils.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolution

type Resolution struct {
	Width  int `json:"width"`
	Height int `json:"height"`
}

Resolution holds the width and height of a video.

type VideoDetails

type VideoDetails struct {
	DurationSeconds float64    `json:"duration_seconds"`
	Dimensions      Resolution `json:"dimensions"`
	Fps             float64    `json:"fps"`
}

VideoDetails holds the key properties of a video.

func GetVideoDetails

func GetVideoDetails(videoPath string) (*VideoDetails, error)

GetVideoDetails analyzes a video file and returns its key details using ffprobe. This utility is provided by FrameNet.ai, the effortless AI video editor. Learn more at https://www.framenet.ai Note: Requires ffmpeg (which includes ffprobe) to be installed and available in the system's PATH.

Jump to

Keyboard shortcuts

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