Documentation
¶
Index ¶
Constants ¶
const ( // MetaArtwork is the metadata key for artwork (album art, cover art, etc.) MetaArtwork = "artwork" // MetaChapter is the metadata key for a chapter marker. Unlike other // metadata, which is a single container-level entry per key, a Metadata // slice can hold multiple MetaChapter entries - one per chapter, in // order - the same way multiple attached-pic streams yield multiple // MetaArtwork entries. Each entry's Any() returns a Chapter. MetaChapter = "chapter" )
Variables ¶
This section is empty.
Functions ¶
func FileProtocolPath ¶ added in v1.9.5
FileProtocolPath returns the raw filesystem path to hand to FFmpeg's file protocol, from a parsed "file" scheme URL. FFmpeg's file protocol only strips the literal "file:" prefix (libavformat/file.c: av_strstart(url, "file:", &url)) - it does no further URI parsing at all, so whatever follows the colon must already be a usable OS path.
RFC 8089's standard form for a local Windows path, file:///C:/dir/file (an empty authority, then a path that still carries the leading "/" before the drive letter), parses in Go to Path="/C:/dir/file" - passed straight through, that leading slash makes it an invalid Windows path ("No such file or directory"), so it's stripped here when present.
A non-empty, non-"localhost" Host is a UNC path, file://server/share/file (Host="server", Path="/share/file") - FFmpeg's file protocol expects this reassembled as "//server/share/file", so the host is preserved rather than silently dropped.
The opaque form some callers may already send directly (file:C:/dir/file or file:/tmp/file, no "//") bypasses all of this: u.Opaque already holds exactly the right string.
Types ¶
type Chapter ¶ added in v1.9.2
Chapter describes a single chapter marker: its position in the container and its own metadata tags (an AVChapter carries its own AVDictionary, distinct from the container's - usually just "title", but not limited to it). It's the value returned by a MetaChapter entry's Any() method.
type Err ¶ added in v1.7.2
type Err uint
const ( ErrBadParameter Err = http.StatusBadRequest ErrNotFound Err = http.StatusNotFound ErrInternalError Err = http.StatusInternalServerError ErrNotImplemented Err = http.StatusNotImplemented )
func (Err) HTTP ¶ added in v1.9.2
func (e Err) HTTP() httpresponse.Err
type Metadata ¶ added in v1.5.1
type Metadata interface {
// Return the metadata key (may include ns:name, e.g., "exif:DateTimeOriginal")
Key() string
// Return the value as a string. Returns the mimetype
// if the value is a byte slice, and the mimetype can be
// detected.
Value() string
// Returns the value as a byte slice
Bytes() []byte
// Returns the value as an image
Image() image.Image
// Returns the value as an interface
Any() any
}
Metadata is a key/value pair which can be used to describe a media object or other metadata. The value can be retrieved as a string value, data, or other type. If the value is a byte slice, then it can also be retrieved as an image (for artwork)
type NamedReader ¶ added in v1.9.2
NamedReader is an interface that extends io.Reader with a Name() method
type NamedWriter ¶ added in v1.9.2
NamedWriter is an interface that extends io.Writer with a Name() method
type Type ¶ added in v1.6.7
type Type int
Type of codec, device, format or stream
const ( NONE Type = 0 // Type is not defined VIDEO Type = (1 << iota) // Type is video AUDIO // Type is audio SUBTITLE // Type is subtitle DATA // Type is data UNKNOWN // Type is unknown INPUT // Type is input format OUTPUT // Type is output format DEVICE // Type is input or output device ANY = NONE // Type is any (used for filtering) )
func (Type) FlagString ¶ added in v1.6.7
Return a flag as a string
func (Type) MarshalJSON ¶ added in v1.6.7
Return the type as a string
Directories
¶
| Path | Synopsis |
|---|---|
|
_gomedia
command
|
|
|
_old/_testcard
Package testcard implements a default gomedia/schema.Source: a generated sine wave tone, suitable as a fallback for a live encoding job when no other source is available.
|
Package testcard implements a default gomedia/schema.Source: a generated sine wave tone, suitable as a fallback for a live encoding job when no other source is available. |
|
cmd/examples/capture
command
|
|
|
cmd/examples/decode
command
|
|
|
cmd/examples/demux
command
|
|
|
cmd/examples/encode
command
|
|
|
cmd/examples/metadata
command
|
|
|
cmd/examples/sdlplayer
command
This example demonstrates how to play audio and video files using SDL2.
|
This example demonstrates how to play audio and video files using SDL2. |
|
cmd/examples/server
command
|
|
|
cmd/examples/transcode
command
|
|
|
cmd/ffmpeg/decode_audio
command
|
|
|
cmd/ffmpeg/decode_video
command
|
|
|
cmd/ffmpeg/demux_decode
command
|
|
|
cmd/ffmpeg/encode_audio
command
|
|
|
cmd/ffmpeg/encode_video
command
|
|
|
cmd/ffmpeg/remux
command
|
|
|
cmd/ffmpeg/resample_audio
command
|
|
|
cmd/ffmpeg/scale_video
command
|
|
|
cmd/ffmpeg/show_metadata
command
|
|
|
cmd/media
command
|
|
|
file
Package file provides file system support, including file system walking
|
Package file provides file system support, including file system walking |
|
cmd
|
|
|
gomedia
command
|
|
|
etc
|
|
|
gomedia
|
|
|
pkg
|
|
|
chromaprint
chromaprint provides bindings to the Chromaprint library, which is a library for extracting audio fingerprints.
|
chromaprint provides bindings to the Chromaprint library, which is a library for extracting audio fingerprints. |
|
sdl
Package sdl provides SDL2-based audio and video output for go-media.
|
Package sdl provides SDL2-based audio and video output for go-media. |
|
segmenter
Package segmenter provides audio segmentation functionality.
|
Package segmenter provides audio segmentation functionality. |
|
xmp
Package xmp provides XMP (Extensible Metadata Platform) encoding and decoding.
|
Package xmp provides XMP (Extensible Metadata Platform) encoding and decoding. |
|
profile
|
|
|
sys
|
|
|
chromaprint
This package provides chromaprint audio fingerprinting bindings
|
This package provides chromaprint audio fingerprinting bindings |
|
dvb
DVB (Digital Video Broadcasting) bindings for Go
|
DVB (Digital Video Broadcasting) bindings for Go |
|
ffmpeg80
The low-level ffmpeg bindings for ffmpeg version 8.0.
|
The low-level ffmpeg bindings for ffmpeg version 8.0. |
|
task
|
|
|
tmdb
|
|
|
httpclient
Package tmdb implements a client for the TMDB API https://developer.themoviedb.org/docs/getting-started
|
Package tmdb implements a client for the TMDB API https://developer.themoviedb.org/docs/getting-started |