Last active
October 4, 2020 21:00
-
-
Save tylerszabo/466ffcdf08e459c036cd883337b3b3ff to your computer and use it in GitHub Desktop.
Set MP3 Metadata with FFMPEG
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# https://id3.org/id3v2.4.0-frames | |
# https://id3.org/id3v2.4.0-structure | |
Title="The Song Title" | |
TrackArtist="The Track Artist" | |
AlbumArtist="The Album Artists" | |
AlbumTitle="The Album Title" | |
Genre="(60)Top 40" | |
TrackNum="7/12" | |
DiskNum="2/3" | |
ReleaseDate="2000-07-15" | |
Publisher="The Publisher" | |
Copyright="The Copyright Holder" | |
ffmpeg -f lavfi -i anullsrc=r=44100:cl=mono -frames 2 -q:a 9 -acodec libmp3lame \ | |
-metadata TIT2="$Title" \ | |
-metadata TPE1="$TrackArtist" \ | |
-metadata TPE2="$AlbumArtist" \ | |
-metadata TALB="$AlbumTitle" \ | |
-metadata TCON="$Genre" \ | |
-metadata TRCK="$TrackNum" \ | |
-metadata TPOS="$DiskNum" \ | |
-metadata TDRC="$ReleaseDate" \ | |
-metadata TPUB="$Publisher" \ | |
-metadata TCOP="$Copyright" \ | |
-y test_metadata.mp3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment