Help save net neutrality! Learn more.

port minidlna on Windows

  • hiero

    hiero - 2011-03-05

    I ported minidlna on Windows using cygwin, it works.
    Is there anyone who is interested in it?

  • Kayl

    Kayl - 2011-03-15


    I'm really interested. I try to port minidlna on Windows by myself. But I don't find the solution.
    Is it possible for you to detail how you have done?

    Thank you by advance.

  • hiero

    hiero - 2011-03-17


    I uploaded.
    3219737  minidlna port on Windows w/Cygwin

    I hope it will be useful.


  • Justin Maggard

    Justin Maggard - 2011-03-18

    Very cool!  Nice work hieroun.  I need to start pulling in some of these patches soon.

  • hiero

    hiero - 2011-03-19

    Thanks jmaggard to pull in patches. I added patch against 1.0.19.

  • Florian Kusche

    Florian Kusche - 2011-06-02

    Thanks hieroun!
    I compiled minidlna successfully on cygwin.
    However, I hat some trouble setting the db_dir. It turned out, that make_dir() was not working correctly.
    I supplied patch 3310785

    Justin, it would be really cool, if you would incorporate hieroun's patch!

  • hiero

    hiero - 2011-06-05

    Thanks fku for the information and the patch.

    It seems EACCES is returned in case system directory is included in the db_dir path.

    I will upload the new patch after 1.0.20 is released.


  • Florian Kusche

    Florian Kusche - 2011-06-05

    Great. I know of one more thing which is still to fix: system( "rm -rf files.db….." ) is called in at least 2 locations. This should be changed to unlink() an rmdir() calls. I will look into it as soon as I can (might take some days)

  • hiero

    hiero - 2011-06-06

    It is easier to use win32 API for recursive delete.
    Following works.

    #include <sys/cygwin.h>
    #include <windows.h>
    void delete_db(char *db_path)
        char real_path[PATH_MAX*2+1], path_tmp[PATH_MAX];
        int ret, len1, len2;
        SHFILEOPSTRUCT file_op = {
        snprintf(path_tmp, sizeof(path_tmp), "%s/files.db", db_path);
        len1 = cygwin_conv_path (CCP_POSIX_TO_WIN_A | CCP_ABSOLUTE, path_tmp, real_path, 0);
        cygwin_conv_path(CCP_POSIX_TO_WIN_A | CCP_ABSOLUTE, path_tmp, real_path, PATH_MAX);
        snprintf(path_tmp, sizeof(path_tmp), "%s/art_cache", db_path);
        len2 = cygwin_conv_path (CCP_POSIX_TO_WIN_A | CCP_ABSOLUTE, path_tmp, real_path+len1, 0);
        cygwin_conv_path(CCP_POSIX_TO_WIN_A | CCP_ABSOLUTE, path_tmp, real_path+len1, PATH_MAX);
        real_path[len1+len2] = '\0';
        ret = SHFileOperationA(&file_op);
        if (ret != 0)
            fprintf(stderr, "cannot delete files.db, art_cache\n");
  • Anonymous - 2012-04-06

    Can anyone upload and paste here link to download compilable windows source?

    Happy Easter!

  • Genmei Mori

    Genmei Mori - 2012-06-25

    Great work! Running very fine here. Thank you so much.
    This is my installation memo.

    Based on:
      Files: MiniDLNA-memo-1.0.22.txt, Note-for-MiniDLNA-cygwin-1.0.22.txt
      In: minidlna_cygwin_port_1.0.22.tar.gz

      cygwin 1.7.11
      Windows7 Home Premium 64bit/SP1

    Install ffmpeg's static libraries:
      Install cyg-pkgs: gcc4-core, make, pkg-config
      Download src:
      Note: I recommend ver.0.10.x. Because ver.0.11.x no longer supports an api 'av_open_input_file'.
            This causes an incompatibility issue in minidlna's configuration check.

        $ ./configure -disable-shared -enable-static -enable-pthreads -disable-yasm -enable-gpl -enable-version3
        $ make
        $ make install

      CHECK: 'libavutil.a' and others appeared in /usr/local/lib folder.

    Install minidlna:
      Install cyg-pkgs:
        patchutil, autoconf, automake, libiconv, gettext-devel, libsqlite3-devel
        libjpeg-devel, libexif-devel, libid3tag-devel, libogg-devel, libvorbis-devel, flac-devel
      Note: I recommend libsqlite3-devel ver.3.7.3-1. Because ver. seems defected (Does not contain a static library).

      Checkout src (rev. 2011-11-10):
        $ cvs login
        $ cvs -z3 co -D 2011-11-11 -P minidlna

      Download and apply patch:
        File: minidlna_CVS_20111110-454_cygwin.patch
        In: minidlna_CVS_20111110-454_cygwin_patch.tar.gz

        $ ./
        $ ./configure
        $ make
        $ make install

    Configure and start:
      $ cp /tmp/minidlna/minidlna.conf /etc/minidlna.conf
      $ vi /etc/minidlna.conf (modify 'media_dir')
      $ minidlna -f /etc/minidlna.conf

    Please try! > marverix

  • Antoine Turmel

    Antoine Turmel - 2013-01-03

    Can anyone distribute a working binary for Windows ?
    Does it work the same as linux ?

  • Craig Chambers

    Craig Chambers - 2013-01-08

    minidlna is not designed to run on Windows.
    Instructions for running under cygwin (a Unix-like environment and command-line interface for Microsoft Windows) are included in the post above yours.

    If you are running Windows, there are other DLNA servers available, so I'm curious as to why you want a Windows version of minidlna.


  • bagu

    bagu - 2013-06-07

    Maybe because other dlna server sucks...

    The only dlna serve wich can serve HD files on eee-pc without lags is windows media player (yerk).
    So a windows port of minidlna will be a good news.

  • Craig Chambers

    Craig Chambers - 2013-06-12

    This is Sourceforge... welcome. There are very good reasons why there is no Windows port. Windows is significantly different to Unix like environments, hence why no-one has successfully ported minidlna to Windows natively.

    Install the Cygwin version as described above, or undertake the task of porting to Windows yourself. Good luck.

  • Bob Dellaca

    Bob Dellaca - 2015-02-19

    A standalone Windows version I made with Cygwin seems to work well. The necessary files for a binary installation are:

    58 Cygwin DLLs

    Three source edits were required: (a) to getifaddr.c, to use Linux-type sockets; (b) to minidlna.c, to use remove(...) statements instead of a system(...) statement; (c) to utils.c, so that make_dir(...) works with Cygwin-style filenames.

    Cygwin "mounts" Windows drives as /cygwin/drive_letter e.g. /cygwin/c for C:. A standalone minidlnad made with Cygwin understands file and directory names that begin with /cygwin/[a-z]/ as referring to the appropriate Windows drive; it knows nothing of the default file and directory names in minidlnad (e.g. /var/run), so that it is neccesary to override the defaults with a config file.

    The command line (or shortcut) to start minidlnad, with command-line parameters in Cygwin-style, and with the .exe, .dll and .conf (and pid, database and log) files in path1 on the C drive, is then something like:

    c:\[path1]\minidlnad.exe -P /cygdrive/c/[path1]/pid -f /cygdrive/c/[path1]/minidlna.conf -R

    The config file, with a media_dir on path2 on the C drive, is then something like:


    Cygwin implements fork(), so that a standalone minidlnad started under Windows [7] forks to leave a detached minidlnad process, with no window and no tray icon; it is not a service, but the end effect is the same as though it were. If it is necessary to kill the process, a control program such as the Task Manager has to be used.


Log in to post a comment.