What is DLNA?
Digital Living Network Alliance (DLNA) is a standard to share videos, pictures and music on supported devices, like TV, smartphones, Network Attached Servers (NAS) and PCs.
What is Kodi?
Kodi is a free open source software that can work as media player, it can work as DLNA server to stream media content on your local network.
From this link scroll down and download MacOS or what you prefer, in this example we are going to install kodi-18.2-Leia-x86_64.dmg MacOS version.
Install the file you downloaded and follow the instructions, you may need to enable Kodi from accessibility in security and privacy of your mac setting to control your computer.
Because you start Kodi for first time on MacOS you might need to run Kodi from application folder while pressing ctrl on keyboard and then select open from menu to override MacOS security.
After that select setting on Kodi
then select Services
then enable UPnP/DLNA
Then from the main menu you can select Movies, TV shows, etc.
and then add the folder where your videos, pictures or music located.
then on your TV or any DLNA supported devices you can find the files on this server and you can enjoy.