0

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?

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.

2
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.