Download Latest Version MINIDLNA binaries.rar (8.7 MB)
Email in envelope

Get an email when there's a new version of Minidlna-For-Windows-with-Transcoding

Home
Name Modified Size InfoDownloads / Week
minidlna subtitles converter binaries-release.rar 2022-12-10 1.7 MB
README.txt 2022-12-10 12.2 kB
minidlna GUI source code version 1.1.rar 2022-02-22 386.6 kB
Minidlna GUI v1.1.exe 2022-02-22 40.4 kB
MINIDLNA binaries.rar 2022-02-22 8.7 MB
LICENSE 2021-08-04 35.1 kB
minidlna source code.rar 2021-07-10 2.7 MB
Totals: 7 Items   13.6 MB 8
 MINIDLNA (READYMEDIA) FOR WINDOWS - CYGWIN VERSION 2020

This program is freeware, use at own risk.
Original source code and license:
https://sourceforge.net/projects/minidlna/
---------------------------------
1)INSTALL
This program is portable, first edit (with Notepad, Notepad++ or Notepad2, do not use Word) and configure  minidlna.conf, and change
(or run Minidlna GUI v1.1.exe for settings): 
media_dir=V,c:/FORCETRANSCODE   (set the path of FORCETRANSCODE directory, required to transcoding movies on the fly, V indicates
                                 video  only).
media_dir=c:/Seek  (set the path of Seek directory, with this setting Seek directory will be visible on TV).
seek_dir=c:/Seek   (set the path of Seek directory, used to simulate fast forward and rewind when transcoding, same name and
                    path of media_dir= above).Is required to activate transcoding.
media_dir=c:/Movies (other directories, not transcoding enabled). 

These directories must exist, minidlna do not create media directories.
If some directories are not visible when sharing, run minigui.exe  as admnistrator to start minidlna.  

Adjust other parameters of minidlna.conf if necessary, but default values must run ok on almost dlna devices.

Dlls missing: install Microsoft VC++ Redist Runtime (2015) https://www.microsoft.com/en-gb/download/details.aspx?id=53840   
------------------
2)RUN
IMPORTANT: when transcoding, a new command prompt (windows console) will  open by ffmpeg.exe, do not close this window,
just minimize if necessary. 
Run Minidlna GUI.exe , this GUI reads the commands in the config.ini file, default is minidlnad.exe -R -f minidlna.conf
(-R is for rebuild database, -f is for minidlna.conf configuration file).
If some directories are not visible when sharing, run minigui as admnistrator. 
To run without Minidlna GUI, open a command prompt (windows console) and execute:
minidlnad.exe -R -f minidlna.conf
(If some directories are not visible when sharing, run command prompt as admnistrator).

To check if subtitles is UTF-8 or UTF-16 and conversion (compatible with ffmpeg burned subtitles)
 run https://sourceforge.net/projects/minidlna-subtitles-converter/  (read readme.txt)

To stop  without gui, use Task Manager, or  CTRL C, or this command:
taskkill /IM minidlnad.exe /F

A more lightweight alternative to -R is -r  option to rescan without rebuilding the database.
On rescan, any directories and files which cannot be access are removed. Any files with different timestamps are removed, then reinserted.
New files and directories are added as long as they are readable.
(https://sourceforge.net/p/minidlna/patches/145/)

If empty directories are showed when browsing with dlna client (TV), just retry.

Fork errors when running minidlna: check https://cygwin.com/faq/faq.html#faq.using.bloda for incompatible software (or run mindlna inside a
 VM with a Tiny Win10 - 5GB of hard disk space). 

Msg "network error" (or other msg) at end of the movie (TV disconnect):
A)insert -af apad=whole_dur=999999 in ffmpeg line command (....-pix_fmt yuv420p  -c:a ac3 -b:a 448k -af apad=whole_dur=999999  -f mpegts pipe:1)
B)start movie from Seek folder ("play to 00H00MIN",etc). Burn subtitles.
OR:
A)add -t 86400 after DURATION:
 ....-i $SOURCE   -t $DURATION -t 86400 -c:v libx264 -preset superfast.... 
----------------------------
3)TRANSCODING ON THE FLY
To enable transcoding:
A)a directory named FORCETRANSCODE must exist. All movies in this directory will be transcoded.
Subtitles will be burned in the image, if configured in minidlna.conf. 
B)a Seek directory (any name) must exist and configured with seek_dir= parameter above.
To seek directory visible on TV, a media_dir= must be configurable with the same name and path of seek_dir=
C)a ffmpeg.exe in the same directory of minidlnad.exe (download the last version from https://www.gyan.dev/ffmpeg/builds/ or https://github.com/BtbN/FFmpeg-Builds/releases), full build.
To stream windows desktop, download ffmpeg version 4.4, not version 5.
To encoding with hardware acceleration (GPU encoding) a 64 bit ffmpeg is required for 64 bit Windows.  
More details about transcoding and seek at end of this file.    
D)To disable seek files generation but enabling transcoding, configure enable_seek=0
---------------------------------------  

4)SUBTITLES:
To check if subtitles is UTF-8 or UTF-16 and conversion (compatible with ffmpeg burned subtitles)
 run https://sourceforge.net/projects/minidlna-subtitles-converter/ (read readme.txt)

Subtitles with same name of the video/movie. 
To convert subtitles ANSI/UNICODE/UTF-8: open with Notepad, option "Save as" or edit with Subtitle Edit.
To convert .srt, .smi, .ass and others formats: Subtitle Edit.  

A)Subtitles in the FORCETRANSCODE directory:
Subtitles with same name of the video/movie.
Subtitles name without special characters (no [], (), etc).
Subtitles are always send to TV as non-burned subtitles, BUT TRANSCODE WITH  SEEK DIRECTORY NEEDS BURNED (FFMPEG) SUBTITLES. 
Subtitles are burned with ffmpeg when enable_subtitle=1, .srt only, UTF-8 or UNICODE (ANSI may result in some errors).
If subtitles are burned with wrong characters, change the -sub_charenc parameter in the ffmpeg command line.
-sub_charenc is the codepage of the language, default is CP1252, for others codepage check:
https://trac.ffmpeg.org/attachment/ticket/2431/sub_charenc_parameters.txt 

B)Subtitles in other directories: .srt .smi .ass .ssa subtitles supported, UTF-8, UNICODE or ANSI.

Double subtitles when transcoding: disable subtitles on TV.

-----------------------------------------------------------
5)COMPATIBILITIES:
Tested with Windows 8.1 and Windows10 (64bits).

DLNA CLIENTS TESTED OK:
1)Android: UPNPplay, ArkMc, Mezzmo, VLC, Kodi, BubbleUPNP, AnDLNA, SmartDlna.
Restrictions: Most android clients runs a third party player (MX Player, Video Player, mpv and others) 
and some of this players not support ac-3 transcoded audio. Change ffmpeg line commando to aac audio, if necessary.
    
2)Windows PC: VLC and Kodi ok, PowerDVD19 only not transcoded movies.

3)TV:Samsung F8000 ok.
-------------------------------------------------

FILES AND DIRECTORIES OF MINIDLNA:
files.db is the database of shared files, default location is /Temp  folder, configurable in minidlna.conf
art_cache: if mta files generation enabled, default location is /Temp  folder.
minidlna.log: is the log (not debug), default location is /Temp  folder.   
minidlna.pid default location is /usr/(username)/appdata/local/minidlna  folder
----------------------------------------------

TRANSCODING AND SEEK - INFORMATION AND ERRORS
Transcoding uses ffmpeg.exe with a command line in the minidlna.conf file, lines starting with transcode_video_options=  
For fast forward and rewind when transcoding a seek_dir contains files to simulate ff/rw, 
normal ff/rw controls on TV will not work.
Default video codec is x264 (libx264) and audio codec is ac3 - ffmpeg included version do not transcode 
E-AC-3 JOC (Dolby Digital Plus with Dolby Atmos, many recent movies have this audio codec) to aac, only ac3, maybe in future versions 
conversion to aac will be supported.

To set an audio bitrate, set -b:a 192k (192kbps audio or other value, must be compatible with codec) as -c:a aac -b:a 192k

To not transcode audio:-c:a copy    

If image is displayed but no audio: change audio  codec to aac in the command line (-c:a aac).

if no image is displayed (TV with msg "invalid file" or other) or image is distorted:
a)change the stream format to avi or mpeg (-f avi).
b)if still no image displayed, change the video codec to mpeg2video (-c:v mpeg2video), is a more universal codec supported por almost devices,
 and change audio codec to mpeg audio (-c:a mp2), stream format mpegts or mpeg (-f mpegts).
c)include -pix_fmt yuv420p parameter in ffmpeg command line.

To detect errors when transcoding:
Open a command prompt (windows  console), go to minidlnad.exe directory and run minidlna in debug mode, enter:
minidlnad.exe -R -d -f minidlna.conf > log.txt

ffmpeg encoding errors are displayed on the screen in real time, minidlna errors and warnings are written to log.txt.
Open log.txt with Notepad++ or Notepad2 (log.txt is Unix format).

To detect transcoding errors:
copy the video file (if necessary rename to a short name like 1.mp4) to the same directory of ffmpeg.exe, open a command prompt and run:
ffmpeg -i 1.mp4 -c:v libx264 -preset superfast -crf 26 -c:a ac3 -f mpegts out.ts

This command is the basic encoding line of minidlna, and a out.ts file will be written. Play the file with VLC to check, if ok the
error is related  to video/audio codecs (or stream format) not supported by TV.

TV with msg "loading...": bitrate is too high, increase the -crf value to 27 or 28 or higher to lower the bitrate.

CPU usage: if CPU usage is too high (> 90%) change -preset value to ultrafast or use other video codec as mpeg2video.
           if CPU  usage is low, change -preset to medium or fast or faster for better quality. 
---------------------------------------
SEEK:
Seek is simulated by generation of short video files (8kb) at pre-defined intervals in minutes (seek_interval=2), when one of this
files is selected on TV, the name of the file report the time in seconds to ffmpeg offset (STARTPOSITION).
The movie is started from this position.
Some devices accept a .jpg extension, others only accept the same extension of the movie, this is the default (enable_seek=2).
The included file th1.jpg is the short movie used by seek files generation. 
If the Dlna device (TV or other) do not display or display an error associated with this short movie, a real .jpg file
is included (th1.jpg.kbp, 4kb), just rename th1.jpg to th1.jpg.old and rename th1.jpg.bkp to th1.jpg, stop  and restart minidlna. 

If no seek files generated:
Seek files generation is time consuming operation, wait some time for completing.
Maybe wrong or no permissions to create seek files, to fix:
a)Run minidlnad.exe in the same disk of Seek directory. 
b)Open a command prompt (windows console) as admnistrator and execute:
minidlnad.exe -R -d -f minidlna.conf > log.txt, and check log.txt for error messages (open log.txt with Notepad++ or Notepad2).

-------------------------------------
HARDWARE (GPU) ENCODING:

Only AMD VCE was tested.
If image is distorted, change stream format to avi, include -pix_fmt yuv420p in ffmpeg command line.
If audio is distorted or no audio, disable audio enhancements in Windows Control Panel (hardware and sounds), restart Windows.
------------------------------------------------------------------- 
FFMPEG CODECS DOCUMENTATION:
https://ffmpeg.org/ffmpeg-codecs.html

FFMEPG GENERAL DOCUMENTATION:
https://ffmpeg.org/ffmpeg.html
==================================================================
minidlna's options are normally set from the minidlna.conf file.

But there may be times when you need to temporarily alter some of these options,
you can do this by running minidlna with the following command line switches.

-R Rescan
    This forces minidlna to rescan all of the media_dir directories.

-r rescan without rebuilding the database.

-f config_file
    Run minidlna with a different configuration file than the global default.

-p port
    Allows to run minidlna on a different port.

-w presentation_url
    Change the default presentation url address.

-d debug
    minidlna will run in the foreground with debug output.

-P pid_filename
    Specify a location for the PID file.

-m model
    Force minidlna to report a specific model number.

-s serial
    Force minidlna to report a specific serial number.

-t notify_interval
    Change the notify interval, in seconds. Defaults to 895 seconds.

-h help
    Show basic switch options for running minidlna.

-V Version
    Shows the program version number and exits.

============================================================


Source: README.txt, updated 2022-12-10