rmid3tag

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: MIT Imports: 6 Imported by: 1

README

rmid3tag

This program deletes the id3 tag contained in the mp3 file. By default the original file is left as a backup. After deletion, you can set the tag of title and artist. If the title and the artist are included in the file name, you can use -g option to set it automatically.

Usage

Usage:
  rmid3tag [OPTION] FILENAME

  when the option is not set, only delete tags.

  OPTION:
    -c or -check  ... nothing is changed. dump id3tag info.
    -s or -set    ... set tag. must be used with -t and -a.
    -t or -title  ... title.  use -t="SONG NAME"
    -a or -artist ... artist. use -a="ARTIST NAME"
    -g or -guess  ... set tag. guess title and artist from filename.
                      file must be named as "Artist - Title.mp3".

Example

This is an example of tag deletion.

$ rmid3tag.exe -check sample.mp3
[rmid3tag] V1Tag Exist       = false
[rmid3tag] V2Tag Exist       = true
[rmid3tag] File Size         = 12685181
[rmid3tag] MPEG Frame Offset = 2209
[rmid3tag] MPEG Frame Size   = 12682972

$ rmid3tag.exe sample.mp3

$ dir /b sample.mp3*
sample.mp3
sample.mp3.backup

$ rmid3tag.exe -check sample.mp3
[rmid3tag] V1Tag Exist       = false
[rmid3tag] V2Tag Exist       = false
[rmid3tag] File Size         = 12682972
[rmid3tag] MPEG Frame Offset = 0
[rmid3tag] MPEG Frame Size   = 12682972

$ 

This is an example of setting title and artist after erasing all tags.

$ rmid3tag.exe -s -t="TITLE" -a="ARTIST" sample.mp3

This is automatically guessing from the file name the same operation as above.

$ rmid3tag.exe -g "ARTIST - TITLE.mp3"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateArtistFrame

func CreateArtistFrame(text string) ([]byte, error)

func CreateID3V2Tag

func CreateID3V2Tag(frames ...[]byte) []byte

func CreateMinimumTag

func CreateMinimumTag(title, artist string) ([]byte, error)

func CreateTextFrame

func CreateTextFrame(id, text string) ([]byte, error)

func CreateTitleFrame

func CreateTitleFrame(text string) ([]byte, error)

Types

type Stat

type Stat struct {
	Size            int64
	V1TagExist      bool
	V2TagExist      bool
	OffsetMPEGFrame int64
}

func GetStat

func GetStat(filename string) (stat *Stat, err error)

GetStat() provide mp3 file imformation. Stat structure has MPEG frame offset and size. +---------------+ | ID3v2tag | | (optional) | +---------------+ <-- offset | | | | MPEG Frames | | size of mpeg frame | | | +---------------+ <-+ | ID3v1tag | | (optional) | +---------------+

func (*Stat) SizeOfMPEGFrame

func (s *Stat) SizeOfMPEGFrame() int64

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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