Streaming audio files from SMB (or AFP, or NFS) share to DLNA receiver without resampling Is it possible to scan specific folders for music files and import them to some android media player app, which could then stream the music to a DLNA device?

Another challenge is that the music files are on a NAS device, so they would be accessed through an SMB share (or AFP, or NFS share, if that changes anything).

I found a way to mount it to android's filesystem (using command busybox mount iocharset=utf8 -t cifs -o username=guest,rw,noperm,iocharset=utf8 //192.168.0.106/xxx /data/media/0/xxx), so apps see it as a local folder (you must have root for that I think, also the kernel should support cifs filesystem, and apparently the android device should not be in battery saving state and iocharset=utf8 is important if you have file or folder names with special characters), but the problem is that many apps rely on android's media scanner service to find music, which probably has trouble scanning the whole mounted folder and the apps do not see all the music files.
If anyone else is seeking for a similar solution, I think doubleTwist player uses a combination of android's media scanner and it's own directory scanner to import music. So the method with mounting the SMB share kind of works here. But it doesn't import duplicate files (support told me they are thinking of doing something about that, also a workaround may be possible by editing any of the major metadata tags like Track Title, Artist, Album Artist, or Album Name - will have to try that, but that involves editing of the files which not everyone might like), so if you have same songs (maybe slightly different versions) on several folders, you can't import them all without altering the files, yet.

Another option is n7player with Toastercast plugin. It works kind of good, but it takes a long time to scan the music folders (about 4 hours for ~14000 songs). And I'm not sure yet if you have to rescan the whole library when you add new music, but I fear you do.. Also, for me this setup would stop playing after one song if the screen is off. I don't know if it's related to android's battery saving or the mounted folder.

And one more promising app would be Emby Server for Android, it can access the SMB share on its own, so I guess it would be a cleaner solution. It is still in beta stage, so for now it doesn't find my DLNA renderer, but I'm keeping my fingers crossed for that to be solved.

Update: I think, adding the .nomedia file to the mounted directory helps the android's media scanner not to cause random crashes. But this approach only works if you use a media app, that scans directories on its own, to add files to the library. And it would be a good idea to store the media files at least one folder level lower, than the .nomedia file, because android's media scanner will not scan the subdirectories of the folder which contains the .nomedia file, but other media apps may not scan this folder's contents, but might scan the subfolders.