Does anyone know if the maintainer has any plans to accept such pull request so that this becomes a feature of MiniDLNA? No idea. ReadyMedia is developed for ReadyNAS devices. There already seems to be a competing media server that supports transcoding available for ReadyNAS - Plex. Check out the sandbox: https://www.netgear.com/landing/readynas-sandbox.aspx
I speak for Shrimpkin. I wonder how would you add packet analyzer between router and client on home network? The internet is a great source of information. Mentioned solution is still better than no solution at all. My children aged 6 and 8 can definitelly hack it. My wife neither. A simple app could be created that would allow a technically inept person to bypass security.
minidlna has no way of remuxing video streams. You might look into the transcoding patch to see if it will fit your needs. https://sourceforge.net/p/minidlna/patches/32/?page=7&limit=25#e514
V2 is for git. Use the git version or use the first patch in OP for v1.2.1.
My previous patch was based on some experimental code I was working on. Importing miniupnp's code would of brought in updated code and features like ipv6. I gave up on it since it would result in more forked code than I was willing to maintain. OP issue does not affect me. My guess it doesn't affect ReadyNAS devices either. Here's some code, improving cybershadow's hack. diff --git a/minidlna.c b/minidlna.c index 5efcd27..5d5df9d 100644 --- a/minidlna.c +++ b/minidlna.c @@ -131,7 +131,21 @@ OpenAndConfHTTPSocket(unsigned...
which was enabled for no reason ProtectHome feature protects the home/user directory. According to ArchWiki, ProtectHome=on is default for *all* services. I removed "ProtectHome=on" from the default systemd configuration. This should not be on by default!!!!!! Your distro's forum is your best option to try to change the default. Edit: Arch Linux provides the systemd configuration for minidlna.service. Voice your concerns to Arch Linux package maintainer. https://www.archlinux.org/packages/commun...
Why else do you introduce a parameter for the network-interface in the config file ....? If you really want to know where the network_interface option comes from, compare minidlna and miniupnp code. the user's hints are considered more of a burden than to accept them as a positive suggestion. Most suggestions are just 'thinly veiled' demands. My suggestion, implement it yourself and apply downstream. Project owner may or may not address this issue. I am not a maintainer. I apply my patches locally....
which was enabled for no reason ProtectHome feature protects the home/user directory. According to ArchWiki, ProtectHome=on is default for *all* services. I removed "ProtectHome=on" from the default systemd configuration. This should not be on by default!!!!!! Your distro's forum is your best option to try to change the default.
I like it so far. Your problem is related to a systemd security feature. I'm on Arch Linux (new install as of last week). You should learn to use your distro's wiki. https://wiki.archlinux.org/index.php/ReadyMedia#Troubleshooting
Why not post a patch of how it *should* work?
I removed "ProtectHome=on" from the default systemd configuration. This should not be on by default!!!!!! Report systemd configuration issues with your distro. I would call this a bug. I would call systemd a bug too. Remove it and use another init system. https://suckless.org/sucks/systemd http://without-systemd.org
Use latest git version. Use nfo file with season/episode tags or use filename parsing by adding S01E01 format to filename. There is no support for embedded tags. Try this patch with latest git version to enabled embedded season/episode tags. diff --git a/metadata.c b/metadata.c index 9cd86dc..110d31b 100644 --- a/metadata.c +++ b/metadata.c @@ -1492,6 +1492,10 @@ GetVideoMetadata(const char *path, const char *name) m.artist = escape_tag(trim(tag->value), 1); else if( strcmp(tag->key, "comment") ==...
there's not much left to do other than fork There are many, many minidlna forks. Last git update was: Justin Maggard 2018-05-04. I'm not sure what your relation is with the project I'm not owner or maintainer. I just occassionally help out the fellow minidlna SF'er. I posted firewall workaround that requires zero patches. I'll probably just submit it to my distribution's bugtracker. IMO, your patch needs to support more interfaces before getting accepted by a major distro. Have fun.
Sorry, but that doesn't follow. That's not how you do security. OK, don't use a firewall. : D There's no justification for not providing it as an option. The only obligation the project owner owes you is the source code. Get it here: https://sourceforge.net/p/minidlna/git/ci/master/tree/
Which version are you using? Any patches? The minidlna.c:613 error is not maching up with v1.2.1. Post the full error messages. A couple things to consider: Double check all your permissions. Check your init or systemd settings, configs, and scripts.
Or just change log level to error in minidlna.conf.
Post debug logs. FYI, in the past I have used minidlna on an openwrt router. Some large mp4's would crash the router, while the same files would work just fine on my desktop. In my case, the ffmpeg library needed more memory than was available on the router to scan the files and caused the crash.
The only thing happened is sudo minidlnad -R The TV isn't changed, nothing changed. Using the "-R" option will change the database, id's, and saved positions on most clients.
See https://sourceforge.net/p/minidlna/bugs/320/#3be7
The mp4 file extension can be video or audio files. If minidlna finds a video stream in the mp4, it is processed as a video file. Otherwise, it is processed as audio file. Embedded coverart is viewed as a video stream, so mp4 audio file with embedded coverart is never processed as audio file. The easiest option is to change your mp4 audio files to m4a file extension.
As previously mentioned, that is how miniupnp "library" works. See http://miniupnp.free.fr Anyone who is concerned with security should be using a firewall. No patches are needed.
Use the patch command. Many tutorials are available online.
Use git (https://en.wikipedia.org/wiki/Git) or click the links: Git > Download Snapshot . If you need more help, there are tutorials online about compiling minidlna from git.
Only m3u and pls playlists. Unless you can program the feature, about the only option is to use a util that will split the flac based on the cue file. I've used them before and work fine.
Committed by: Justin Maggard Justin Maggard 2018-05-04 https://sourceforge.net/p/minidlna/git/ci/799e6cf505ec470b2bf0ae4118143380aa16b837/
Committed by: Justin Maggard Justin Maggard 2018-05-04 https://sourceforge.net/p/minidlna/git/ci/799e6cf505ec470b2bf0ae4118143380aa16b837/
65,535 is an unsigned 16 bit integer. Gonna point my finger at your client since minidlna most likely uses at least 32 bit integers. For database objects, minidlna uses 64 bit integers. Use a current or latest git version of minidlna and run in debug mode to see what your client is requesting and minidlna is responding. Use code block, see "Formatting Help".
Use a search engine. There are many tutorials already available online.
Patch #152 is updatd for v1.2.1. https://sourceforge.net/p/minidlna/patches/152/#efc7
Updated for minidlna v1.2.1.
webOS TV 3.5 flac support
You need to use a binary editor and will most likely not work. Compile source, create a deb package, and install using dpkg. Tutorials are available online. FYI, additional code is needed for inotify srt support.
Looks like a permission/sysadmin problem. When changing the user for minidlna, rebuild the database using the same username. Also, the username most likely does not have write access to the default locations in the /var directory. Correct the problem.
The source edit will work. Double check everything, recompile, rebuild db, etc. Or just use links. man ln ln -s movie.sr.srt movie.srt
If someone reads this, can you point me to another forum that is active on this subject ? Use your favorite search engine.
The file works with minidlna and my clients. The problem is with your client or the client profile. Did you read my previous post? Post debug logs.
You can try this. diff --git a/utils.c b/utils.c index 294c1cd..9e8c258 100644 --- a/utils.c +++ b/utils.c @@ -511,7 +511,7 @@ resolve_unknown_type(const char * path, media_types dir_type) else if( S_ISREG(entry.st_mode) ) { media_types mtype = get_media_type(path); - if (dir_type & mtype) + if ((dir_type & mtype) || (mtype & TYPE_CAPTION)) type = TYPE_FILE; } }
The rescan feature works much like the scanner. minidlna only checks for subs when a video is added to db. A simple workaround is to touch a video file. minidlna will then readd the video to db and check for subs.
Updated patch (v2), add support for use with inotify. Includes small fix to use patch with current git. Usage is the same as OP except inotify can be set to yes. Briefly tested. If you have issues, post debug logs and how to duplicate the issue.
Make sure you have completed the initial scan and database build. Otherwise, the database will be rebuilt. Works for me: [2018/03/27 10:20:41] minidlna.c:173: warn: received signal 12, manual rescan [2018/03/27 10:20:41] scanner.c:856: info: Starting rescan [2018/03/27 10:20:41] scanner.c:834: debug: Removing /tmp/media/DeleteMe.mkv [file] [2018/03/27 10:20:41] playlist.c:135: warn: Parsing playlists... [2018/03/27 10:20:41] playlist.c:269: warn: Finished parsing playlists. [2018/03/27 10:20:41]...
There is a status page at http://{minidlna_ip}:{minidlna_port}/status
Symlinks work for me. Double check permissions and run in debug mode. Try another client.
You only mention the amount of thumbnails in OP. Nothing about time, energy, and the need for a config option. write 100 000 thumbnails , resulting in 1.35GB thumbnail data. For db_dir, use a filesystem that supports hard links. Don't use Samba. As long as the album art is the same across all songs, on scan minidlna will create one cached thumbnail and create hard links for the others. But I would prefer to avoid creating any thumbnail file. Creating thumbnails should be a flag somewhere in the configuration...
minidlna will scan and add proper mp4's by default. Make sure your media_dir location is correct and minidlna has permissions to read the files.
That is the default art_cache location. Use of db_dir in config file will change the location.
Some situations will result in the cache thumbnails to not be removed correctly and the database is not properly sync'ed with the filesystem. Use '-R' option to rebuild the database and art_cache directory.
Embedded album art is greater than external album art. Make sure your files do not have embedded album art and minidlna will create one thumbnail per external album art found. Another option is to change your db_dir to a location with more space.
/etc/config/minidlna is a LuCI config file which generates /tmp/minidlna.conf on init. /etc/minidlna.conf might be a link to /tmp/minidlna.conf? /tmp is most likely a temporary filesystem and everything in /tmp will be lost on poweroff/reboot. You will need to set log_level, ex: log_level=debug. Log file is most likely linked into /tmp and will be lost on poweroff/reboot. Seek additional help from your distro's support forum.
Forgot to check git history logs. Shows the flag as being part of the forked code. Initially, I thought the flag might of been part of the library but didn't have time to look into it more. FYI, the fix for OP has been available upstream since 2011.
My interpretation of the UPnP standard is if a resource has captions it should send the URL using protocolInfo. minidlna only sends captions by protocolInfo based on flags from the user-agent. How far along is your app? Append BubbleUPnP to your user-agent for testing since they use same library. minidlna needs a unique user-agent to handle certain things otherwise you will be dropped into the generic upnp profile. At any rate, I doubt your OP would be addressed. Might check if Cling has a "non-strict"...
Need debug logs. Run in debug mode with -d or set log_level=debug in minidlna.conf.
Looks like there is a problem with the xml parsing library and white space. It has been fixed upstream at http://miniupnp.free.fr. Try this patch: diff --git a/minixml.c b/minixml.c index 2fed4a1..bf3fc0f 100644 --- a/minixml.c +++ b/minixml.c @@ -143,7 +143,7 @@ void parseelt(struct xmlparser * p) return; while( IS_WHITE_SPACE(*p->xml) ) { - p->xml++; + i++; p->xml++; if (p->xml >= p->xmlend) return; } Dev note: minixml.[c,h] could be updated to upstream miniupnp by handling XML_STORE_EMPTY_FL flag...
Post your client info, profile, user-agent, and debugging logs for the failed search query.
1) Workaround, use one interface per line. Ex: network_interface=lo network_interface=foo1 network_interface=foo2 network_interface=foo3 network_interface=foo4 Or patch for debug log issue: diff --git a/minidlna.c b/minidlna.c index f82cd89..c1afcc5 100644 --- a/minidlna.c +++ b/minidlna.c @@ -557,14 +557,14 @@ init(int argc, char **argv) case UPNPIFNAME: for (string = ary_options[i].value; (word = strtok(string, ",")); string = NULL) { + while (isspace(*word)) + word++; if (ifaces >= MAX_LAN_ADDR)...
Normally, you use the same source version as the patch was made for. Somtimes you can use other versions, if the source has not changed much. Here is user nymous@sf.net patch updated for v1.2.1. I have not tested it. In the future, ask the original patch author for an updated patch.
Inotify has been implemented but not the upload functionality. In general, bugs are fixed but feature requests are ignored. Use the fork if you need transcoding. Although, the fork was last updated in 2015.
This has been requested before. For patch ideas, see: https://sourceforge.net/p/minidlna/feature-requests/116/
Any of the patches should work. After downloading and unpacking minidlna, use the patch command to patch the files. Ex: patch -p1 < filename.patch Search online for tutorials on how to use the patch command.
What is the client's profile and user-agent? cling@github says BubbleUPnP uses the cling library and it works without the sec namespace. Are you writing a client? I would avoid using the sec namespace and use the upnp namespace. upnp:lastPlaybackPosition for bookmarking and res protocolInfo for captions.
You don't... use v1.2 or later. If you want to use earlier version: 1) download patch. 2) download and extract source. 3) use patch command. 4) compile and install. Search online for patch and compiling tutorials.
Most problems are related to file permissions and/or system init problems. Run in debug mode. Use minidlna without any startup/init scripts. Perform the poweroff file copy, verify usb device is online and file permissions are correct, and then run in debug mode with -d -r options.
The user-agent does not include the TV app name which makes it difficult to distinguish between other apps using the same upnp library. Just add the caption flag to the existing client profile. Looks like it should be EStandardDLNA150. clients.c:286: FLAG_DLNA | FLAG_MIME_AVI_AVI, to FLAG_DLNA | FLAG_MIME_AVI_AVI | FLAG_CAPTION_RES,
The SearchCriteria bool should be "false" but is "fals". The problem is most likely with the client. You can apply this patch and post the results to verify that minidlna is not at fault. diff --git a/upnpsoap.c b/upnpsoap.c index 441da98..fe23b24 100644 --- a/upnpsoap.c +++ b/upnpsoap.c @@ -1306,6 +1306,7 @@ BrowseContentDirectory(struct upnphttp * h, const char * action) args.client = h->req_client ? h->req_client->type->type : 0; args.flags = h->req_client ? h->req_client->type->flags : 0; args.str...
The easiest would be to add some scripting or modify the init scripts to remove/comment out the root_container line. The user-agent does not include the app name which makes it difficult to distinguish between other apps using the same upnp library.
Both (-r, -R) work on startup and cannot be used while minidlna is running. This patch might be what you are looking for? https://sourceforge.net/p/minidlna/patches/172/ .
Try the latest version 1.2.1 and post the results and client profile that is being used. Also, post your config file.
The error is shown in the log file. VLC is requesting more than the max response size. You can increase this but you will have to edit and compile from source. Max response size is in upnpsoap.h:25. Change to a higher value. #define MAX_RESPONSE_SIZE 2097152
Seek support from a systemd forum. systemd is complicating something that should be simple. Let them support it.
Running in debug mode will show any errors with media files. Also, it's possible your desktop program supports more media formats than minidlna does. You can use a script like this to figure out what is missing and go from there. Change DBFILE and MEDIAPATH. Make sure you have sqlite3. DBFILE=/path/to/files.db MEDIAPATH=/path/to/media find $MEDIAPATH -type f -print0 | while read -d $'\0' FN do R=$(sqlite3 $DBFILE "SELECT COUNT() FROM details WHERE path = \"$FN\"") if [ $R -eq 0 ] then echo $FN fi...
jmaggard is the project owner and can decide to merge or not. IMO, the feature is not needed as there is already an option to disable inotify.
Have you tried running in debug mode?
I try to limit code changes to make patches easier to apply downstream.
This first issue is related to the scanner cache. A few of workarounds: 1) Tag unique album names. Ex: Greatest Hits (Guns N Roses). 2) If using inotify, simply remove and readd affected albums one by one. 3) Apply this patch. Cache will not work for Various Artists albums. diff --git a/scanner.c b/scanner.c index a730567..414b219 100644 --- a/scanner.c +++ b/scanner.c @@ -248,7 +248,7 @@ insert_containers(const char *name, const char *path, const char *refID, const c if( album ) { - if( valid_cache...
Attach debug log file, showing the requested method by your client.
Patch available for testing here.
why aren't you developers so intelligent and let minidlna work like vsftpd? Because of UPnP-AV/DLNA specifications requires more data than the filesystem alone can provide. Take a look at the specifications available online (easily found using a search engine) to become "intelligent" too!
Manual non-destructive rescan
First off, I don't use containers much. If you are not using root to run minidlna, would this work? -P /dev/null IMO, the -d option should only control daemon mode (using it would disable daemon). The -v option would enable full debug logging. If -d is used without -v, then the log level from the config file would be used. A patch like this: diff --git a/minidlna.c b/minidlna.c index 48e56ff..aa85a92 100644 --- a/minidlna.c +++ b/minidlna.c @@ -820,6 +820,7 @@ init(int argc, char **argv) break; case...
I am not the project owner and cannot say if it is necessary or not. Having different user/group names can be helpful with more complex file sharing needs. Especially since minidlna is only able to limit which files are served by their permissions.
The disc tag is currently supported. Your client is responsible for requesting the sort order. Requesting order by upnp:originalTrackNumber will return ordering by disc/track. You can override the requested sort order by using force_sort_order in minidlna.conf. Be aware that many clients will apply additional sorting which will render the force_sort_order useless. If that is the case, see your client's developer for support.
Many have preferences and the metadata based containers are cpu intensive to create due to sqlite. Adding everyone's preferences would increase scan time and database size. You can hack the source, more info here: https://sourceforge.net/p/minidlna/discussion/879957/thread/27081f30/ Ordering is dependent on your client to request and honor the sort order.
Yes, users can decide if they would like to apply your patch downstream.
Sorry, I'm not familiar with Solaris. I don't think minidlna is 100% POSIX compatible. According to https://linux.die.net/man/3/readdir: The only fields in the dirent structure that are mandated by POSIX.1 are: d_name[], of unspecified size, with at most NAME_MAX characters preceding the terminating null byte; and (as an XSI extension) d_ino. The other fields are unstandardized, and not present on all systems; FYI, the version you are trying to build is newer than the version used (1.1.4) at sysdef.xyz....
No, not without hacking the source. The code related to the metadata based containers is located in scanner.c:insert_containers().
I tested sqlite (3.20.1) and minidlna (git) on my system (not redhat based) and could not reproduce your issue. Are you using 'cp -r' to copy the directory? It is possible there is a problem with your distro's sqlite package, try building sqlite and minidlna from source.
Many problems with Samsung tv's. Check out: https://sourceforge.net/p/minidlna/bugs/311/ You might post your TV model/firmware/user agent.
Looks like your client is sending a search soapmethod, requesting 25 videos with an offset index of 5. According to the log file, you only have 5 video matches, which returns 0 results. Looks like minidlna is working properly. You might try rebuilding the database with (-R), do a factory reset on your client/tv and re-add the server. If you are still having problems, post the new log file of the rebuild and client access after reset.
Due to the shout/icecast protocol, many clients will need transcoding to properly play. Transcoding is not supported by minidlna. There is a patch attempt with shoutcast support in an earlier version: https://sourceforge.net/p/minidlna/patches/32/?limit=25&page=6#eb4c Some controllers have an option of playing a URL. You might try that as a workaround.
Return TV to POS or OEM. Or post debug logs, showing access by both devices. Do not copy and paste but attach log file. Something like this: minidlna -d -f /path/to/conf > maxdebug.log
For users with low memory, there is an option to disable inotify. Since v1.2, you can use the rescan feature (-r) on startup to update the database without the need to rebuild the database.
Usually means the ffmpeg development libraries are not installed. Check your ffmpeg development libraries.
Working example. I used this free download with tagged mp3's. Unzip file to a directory. mkdir ~/TheGreatDivide_Demo_2011 && unzip -d ~/TheGreatDivide_Demo_2011 ~/The\ Great\ Divide\ -\ Demo\ 2011.zip Remove 'rm' results. cp -rvp ~/TheGreatDivide_Demo_2011 /media rm -r /media/TheGreatDivide_Demo_2011 sqlite3 ~/minidlna/files.db "SELECT * FROM objects" > ~/rm.txt Move 'mv' results. cp -rvp ~/TheGreatDivide_Demo_2011 /media mv /media/TheGreatDivide_Demo_2011 /tmp sqlite3 ~/minidlna/files.db "SELECT...
Additional info: The two commands below will produce different database results due to inotify sending file events for rm and a directory event for mv. media_dir=/media. rm -r /media/$DIR mv /media/$DIR /tmp/$DIR
There is an updateID fix in current version/git and the above patch is no longer needed. Also, there are some additional fixes to the inotify code which the rescan feature depends on. So use current version or git.
What is the reason behind this patch? Are you that short of memory?
What's your patch look like? FYI, there is a minidlna fork with transcoding support.
Probably because it's not standard and insecure. Any network packet analyzer will capture the passcode. Also, the patch fails to address access via http. Ex: for N in $(seq 20 100) ; do wget http://${SERVER}:${PORT}/MediaItems/${N} ; done The above one liner will download all media items up to id 100. Add in ffprobe, you can restore file extensions and rename files if they are tagged.
Current git/version now has nfo support using inotify. You no longer need to use the "toggle" method. Note: There is no support for nfo's using the new rescan feature. Make any nfo changes while minidlna is running or rebuild database.
This issue still exists after commit [50b1a2]. It is preventing inotify and rescan features from removing all related metadata containers. To reproduce, remove a directory containing tagged music files with the only artist/album in the database. The (now renamed) function monitor_remove_directory() will fail to remove the empty metadata based containers.
grep -in samsung *.[c,h] | awk -F ':' {'print $1'} | uniq | sort Show a list of files using samsung. clients.* is of interest. Looks like the profile you are using has changed. Don't know if it will help, but you can try testing with similar flags as v1_1_4. diff --git a/clients.c b/clients.c index b920258..5ccbd69 100644 --- a/clients.c +++ b/clients.c @@ -84,7 +84,7 @@ struct client_type_s client_types[] = /* User-Agent: DLNADOC/1.50 SEC_HHP_ Family TV/1.0 */ /* USER-AGENT: DLNADOC/1.50 SEC_HHP_[TV]...