<p>You would never include the actual mp3/mp4 in your smart contract. That's a lot of space (probably more than could ever fit on the chain) and unnecessary.</p>
<p>Instead, you could create a hash of the clip and attach that hash as metadata of an NFT--thus showing unique ownership. That's how NFTs for images/pictures work typically.</p>
<p>How you store the mp3/mp4 is up to you. You could host it on a website, or consider IPFS (InterPlanetary File System) for a bit more safety.</p>

CC BY-SA 4.0
2021-11-19T21:36:07.023Z
Thank you. I have been using pinata.cloud for an IPFS but it has trouble rendering even a small file. Do you have any IPFS's you'd recommend?
marcus gray
CC BY-SA 4.0
2021-12-03T03:33:28.910Z
https://ipfs.io/ or you can use the Blockfrost API: https://docs.blockfrost.io/#tag/IPFS-Add
georgeos
CC BY-SA 4.0
2021-11-15T23:51:28.307Z
2021-11-15T23:51:28.307Z
Mitchell Turner
<p>So generally the media is stored somewhere else and you just link the NFT to it with a URL. If you didn't do this, the blockchain would grow astronomically.</p>

CC BY-SA 4.0
2021-11-15T23:49:24.767Z
2021-11-15T23:49:24.767Z
Jacob - SNOWY Pool
<p>How Do I include MP3/Mp4 capabilities in my smart contract?
Im interested in minting songs and short videos as CNFTs but I do not see any information online what so ever about how this can be done.  There are CNFT projects such as music box who seem to have accomplished this in a short format. Can anyone give me some guidance?</p>

<smart-contract><nft><metadata>
How Do I include MP3/Mp4s into my smart contract?
# How Do I include MP3/Mp4s into my smart contract?

(Asked by: username_0 on 2021-11-15)

How Do I include MP3/Mp4 capabilities in my smart contract?
Im interested in minting songs and short videos as CNFTs but I do not see any information online what so ever about how this can be done. There are CNFT projects such as music box who seem to have accomplished this in a short format. Can anyone give me some guidance?

**Tags:** smart-contract, nft, metadata

---

## 2 answers

### Answer by username_1 on 2021-11-15. Score: 1

You would never include the actual mp3/mp4 in your smart contract. That's a lot of space (probably more than could ever fit on the chain) and unnecessary.

Instead, you could create a hash of the clip and attach that hash as metadata of an NFT--thus showing unique ownership. That's how NFTs for images/pictures work typically.

How you store the mp3/mp4 is up to you. You could host it on a website, or consider IPFS (InterPlanetary File System) for a bit more safety.

> **Comments:**
> **username_0**: Thank you. I have been using pinata.cloud for an IPFS but it has trouble rendering even a small file. Do you have any IPFS's you'd recommend?  
> **username_2**: https://ipfs.io/ or you can use the Blockfrost API: https://docs.blockfrost.io/#tag/IPFS-Add  

---

### Answer by username_3 on 2021-11-15. Score: 0

So generally the media is stored somewhere else and you just link the NFT to it with a URL. If you didn't do this, the blockchain would grow astronomically.


---

