mp4meta

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 14 Imported by: 1

README

MP4META

Coverage Status

MP4Meta is a high level implementation of abema's go-mp4, licensed under the MIT license, link in Acknowledgements. This library is both an adapter and facade implementation for abema's low level I/O interfaces. By utilizing this library, we are able to interact with almost all relevent m4a /m4b metadata tags. At the same time, we are able to keep mdat in sync when editing the metadata.

Features

  • Read and write MP4 atoms (m4a, m4b): "artist", "albumArtist", "album", "coverArt", "comments", "composer", "copyright", "genre", "title", "year", "encoder"
  • Reads and writes "trackNumber", "trackTotal", "discNumber", "discTotal" and "tempo (bpm)" tags with ease
  • Everything's built in, plug and play, with a simple interface, compatible with AudioMeta v3, for more audio formats.

Acknowledgements

  • go-mp4: Abema's go-mp4 makes this library possible. They provided the low level and I made it high level, for m4a, and m4b. With this combination, we can write meta tags with ease.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Parts of this project include third-party libraries under the MIT license. See the LICENSE file for details.

AudioMeta v3

MP3Meta

OGGMeta

FLACMeta

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveMP4

func SaveMP4(r io.ReadSeeker, wo io.Writer, _tags *MP4Tag) error

Types

type MP4Tag

type MP4Tag struct {
	Album       string
	AlbumArtist string
	Artist      string
	BPM         int
	Comments    string
	Composer    string
	Copyright   string
	CoverArt    *image.Image
	Encoder     string
	Genre       string
	Title       string
	TrackNumber int
	TrackTotal  int
	DiscNumber  int
	DiscTotal   int
	Year        string
	// contains filtered or unexported fields
}

func ReadMP4

func ReadMP4(reader io.ReadSeeker) (*MP4Tag, error)

func (*MP4Tag) ClearAllTags

func (m *MP4Tag) ClearAllTags()

func (*MP4Tag) GetAlbum

func (m *MP4Tag) GetAlbum() string

func (*MP4Tag) GetAlbumArtist

func (m *MP4Tag) GetAlbumArtist() string

func (*MP4Tag) GetArtist

func (m *MP4Tag) GetArtist() string

func (*MP4Tag) GetBPM

func (m *MP4Tag) GetBPM() int

func (*MP4Tag) GetComments

func (m *MP4Tag) GetComments() string

func (*MP4Tag) GetComposer

func (m *MP4Tag) GetComposer() string

func (*MP4Tag) GetCopyright

func (m *MP4Tag) GetCopyright() string

func (*MP4Tag) GetCoverArt

func (m *MP4Tag) GetCoverArt() *image.Image

func (*MP4Tag) GetDiscNumber

func (m *MP4Tag) GetDiscNumber() int

func (*MP4Tag) GetDiscTotal

func (m *MP4Tag) GetDiscTotal() int

func (*MP4Tag) GetEncoder

func (m *MP4Tag) GetEncoder() string

func (*MP4Tag) GetGenre

func (m *MP4Tag) GetGenre() string

func (*MP4Tag) GetTitle

func (m *MP4Tag) GetTitle() string

func (*MP4Tag) GetTrackNumber

func (m *MP4Tag) GetTrackNumber() int

func (*MP4Tag) GetTrackTotal

func (m *MP4Tag) GetTrackTotal() int

func (*MP4Tag) GetYear

func (m *MP4Tag) GetYear() int

func (*MP4Tag) Save

func (m *MP4Tag) Save(w io.Writer) error

func (*MP4Tag) SetAlbum

func (m *MP4Tag) SetAlbum(album string)

func (*MP4Tag) SetAlbumArtist

func (m *MP4Tag) SetAlbumArtist(albumArtist string)

func (*MP4Tag) SetArtist

func (m *MP4Tag) SetArtist(artist string)

func (*MP4Tag) SetBPM

func (m *MP4Tag) SetBPM(bpm int)

func (*MP4Tag) SetComments

func (m *MP4Tag) SetComments(comments string)

func (*MP4Tag) SetComposer

func (m *MP4Tag) SetComposer(composer string)

func (*MP4Tag) SetCopyright

func (m *MP4Tag) SetCopyright(copyright string)

func (*MP4Tag) SetCoverArt

func (m *MP4Tag) SetCoverArt(coverArt *image.Image)

func (*MP4Tag) SetDiscNumber

func (m *MP4Tag) SetDiscNumber(discNumber int)

func (*MP4Tag) SetDiscTotal

func (m *MP4Tag) SetDiscTotal(discTotal int)

func (*MP4Tag) SetEncoder

func (m *MP4Tag) SetEncoder(encoder string)

func (*MP4Tag) SetGenre

func (m *MP4Tag) SetGenre(genre string)

func (*MP4Tag) SetTitle

func (m *MP4Tag) SetTitle(title string)

func (*MP4Tag) SetTrackNumber

func (m *MP4Tag) SetTrackNumber(trackNumber int)

func (*MP4Tag) SetTrackTotal

func (m *MP4Tag) SetTrackTotal(trackTotal int)

func (*MP4Tag) SetYear

func (m *MP4Tag) SetYear(year int)

Jump to

Keyboard shortcuts

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