I've seen support for mp4 under the animation_url
field and was wondering, is there a field for adding an audio file to an NFT using Metaplex?
1 Answer
Yes Solana/Metaplex nfts do support audio nfts. There's a few bits of tweaking to do in the metadata to make them valid.
You'll need a placeholder image as a form of jpg/png then in the animation metadata you can place the audio file. There is also a category field in the properties object of the off chain metadata that should be populated for some websites such as Magic Eden so they know what type of format the nft is in.
"properties": {
"category": "audio"
}
Here's an example of a audio file nft and all it's metadata that you can use to base yours off if you want.
Audio NFT https://solscan.io/token/4s9Us1od3F5J2FB9EqHzythaLaacUehEotygDbJKsqTL
If you wish to view some other formats then here's the rest of the available formats too with example metadata. All of them basiclly use the Animation metadata field.
Video - https://solscan.io/token/qRThywjygR7hH88pm3U5JyRUysBP4RcLw7PiAMyMsQg
HTML - https://solscan.io/token/92Mf8DEBvcvpSudK7qBQ8K3ZXgadY3a3Wd41KeuEHAob
VR/3D - https://solscan.io/token/Dq2v2uGJyEFD4PGeM2vcTnpPAFyirCgEmrTpwCNYHBE2
Image - https://solscan.io/token/ARPe757RHVjLUECx7ezXKexAexuGH4qZpxSsugDAgFi8
more information can be found here documented back in v1.0 of the token standard (although older this still has some relevent information for you regarding catergories and nft types). https://docs.metaplex.com/programs/token-metadata/changelog/v1.0
-
This is the correct answer, but it should also be noted that while there is support for mp3 files in the Metaplex standard, you'll want to be aware of the wallets/platforms that support the listening of the mp3s. Currently no wallets support them and the only place I'm aware of that does is Boombox Market.– bananaCommented Sep 21, 2023 at 16:49
-
1This is incorrect. Both Phantom and SolFlare both support audio playback in the wallet (desktop at least). Magic Eden also supports all NFT types that I have listed above. Click through to the ME links from Solscan. Commented Sep 22, 2023 at 12:21