The original firmware based on debian did come with a DLNA server, in this post, I am only dealing with openWRT (You need to change the firmware due to a serious security issue on the NAS drive as shown here)
In openWRT, i recommend you install libffmpeg-full before miniDLNA, since miniDLNA will install libffmpeg-mini which will conflict
opkg update opkg install libffmpeg-full opkg install minidlna luci-app-minidlna
Once the above are done, you can setup your DLNA server from the web interface of openWRT
I would recommend that the database and log files be on the data partition to save space, something you can manually set from within the web interface
to rebuild that database (re-index the files), you will need to stop miniDLNA, run the update and then start the server again
service minidlna stop minidlnad -R service minidlna start