media

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2023 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteImageToByte

func ByteImageToByte(b []byte) ([]byte, error)

func ByteImageToByteImage

func ByteImageToByteImage(b []byte, x, y int) ([]byte, error)

func ByteImageToByteWebp

func ByteImageToByteWebp(b []byte) ([]byte, error)

func ByteToImage

func ByteToImage(b []byte) (image.Image, error)

func ByteToWebp

func ByteToWebp(b []byte) (image.Image, error)

func ByteToWebpAnimationByte

func ByteToWebpAnimationByte(b []byte) ([]byte, error)

func FfProbe

func FfProbe(input_name string, combine bool, argumenst []string) (map[string]interface{}, []byte, error)

func Ffmpeg

func Ffmpeg(input_name, output_name string, combine bool, argumenst []string) ([]byte, error)

func ImageReOrient

func ImageReOrient(b []byte) (image.Image, error)

func ImageResize

func ImageResize(i image.Image, width, height int) image.Image

func ImageToByte

func ImageToByte(img image.Image, f imaging.Format) ([]byte, error)

func ImageToWebp

func ImageToWebp(img image.Image) (image.Image, error)

func WebpToByte

func WebpToByte(w image.Image) ([]byte, error)

Types

type AudioInfo

type AudioInfo struct {
	Seconds  float64
	Size     int
	Mimetype string
	Bytes    []byte

	SampleRate string
	BitRate    string
	Channels   float64
}

func ConvertToOgg

func ConvertToOgg(data []byte) (AudioInfo, []byte, error)

type MediaInfo

type MediaInfo struct {
	Size         int
	Bytes        []byte
	Seconds      int
	Mimetype     string
	JpegThumbail []byte
	Width        int
	Height       int
}

func GifToMP4

func GifToMP4(data []byte) (MediaInfo, error)

type StreamsInfo

type StreamsInfo struct {
	Streams []map[string]any `json:"streams"`
}

Jump to

Keyboard shortcuts

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