Posted: Wed Jan 12, 2011 5:19 Post subject: Easy MiniDLNA for WZR-HP-G300NH
Here is a somewhat easy way to get MiniDLNA up and running.
UPDATE:
I have changed this to use ipkg to install.
You can install to /mnt /opt or where ever you would like.
ipkg will update the correct paths in the start script and minidlna.conf for you.
UPDATE: 1/30/11
The install no longer rescans on reboot.
To force a rescan, assuming you installed to /mnt,
just put /mnt/minidlna/rescan into the dd-wrt command shell.
I set this up on my WZR-HP-G300NH, DD-WRT build 15962, Kernel 2.6.
inotify works with this version. It may or may not work with older versions, I have not tested them.
It will not run on the older 2.4 Kernel.
Format your hard drive. I suggest using ext3, ntfs works but is very slow compared to ext3.
Copy easyminidlna_0.1_mips.ipk (attached below as easydlna.zip) to your hard drive (Or wait until you have enabled samba).
Plug it into your router.
Log in to the DD-WRT admin webpage.
Enable Samba under Services->NAS->File Sharing.
Server String = Whatever you want
Workgroup = WORKGROUP
Path to Files = /mnt
Public Share = Enable
Readonly = Disable
Apply Settings
Enable Core USB Support under Services->USB->USB Support.
USB 2.0 Support = Enable
USB Storage Support = Enable
Automatic Drive Mount = Enable
Run-on-mount Script Name = /mnt/minidlna/start
Disk Mount Point = /mnt
Apply Settings
Go to Administration->Management scroll down to the bottom and click Reboot Router.
If you haven't already done so, use samba or SCP to copy easyminidlna_0.1_mips.ipk to the hard drive.
Use Telnet or SSH to login to DD-WRT and type or paste in the commands below.
ipkg will throw out a few errors.. They are harmless.
ipkg will create a "usr" and "tmp" file on your drive. You can delete them.
After typing in /mnt/minidlna/start there will be a 20 second delay before minidlna starts.
You will have a Music, Videos and Pictures directory created on the drive.
These will be monitored for changes by MiniDLNA.
If you want, you can delete easydlna.tar.gz.
I also have hd-idle installed with this. It is set to spindown the hard drive after 20 min. If you don't want it just remove the entry from the start script.
Thats it!
Last edited by boke on Mon Jan 31, 2011 5:58; edited 7 times in total
nevermind that. just added a new line to startup script through adminstration>commands in the ddwrt webui
videos work perfectly except for mp4 formats. mp3 audio works great. so do pictures.
thanks so much!
p.s:
could you build an ipk file for this so that people can remove these files if it doesnt work?
extracting files from the tar file might have worked on your router but it made /opt/usr/ folder unaccessible until i installed and removed a different package.
The Music , videos and pictures folders were also not accessible and undeletable.
I couldnt modify the conf file because I couldnt open /usr folder. I finally formatted hard disk and installed minidlna by opkg. I then extracted the files from the tar package on my computer and uploaded those via ftp to their respective folders.
Maybe it was just my router (wrt160nl) but it seems unpacking tar files causes some permission issues, so an ipk file would be a lot better. Else people could just install minidlna with opkg then upload the library files via ftp like I did.
edit
its working fine now!! only problem is that any file with a hyphen '-' in its name will cause the media scanning to break
Thanks for getting this working, I am able to see it on my laptop now. However I really want to get this working on my xbox 360, and it doesn't show up. Where can I find the minidlna.conf so I can edit it?
I've checked in /opt/usr/bin and there is nothing there. Is there another location that I'm missing here?
# port for HTTP (descriptions, SOAP, media transfer) traffic
port=8200
# network interface to bind to (this is the only interface that will serve files)
network_interface=br0
# set this to the directory you want scanned.
# * if have multiple directories, you can have multiple media_dir= lines
# * if you want to restrict a media_dir to a specific content type, you
# can prepend the type, followed by a comma, to the directory:
# + "A" for audio (eg. media_dir=A,/home/jmaggard/Music)
# + "V" for video (eg. media_dir=V,/home/jmaggard/Videos)
# + "P" for images (eg. media_dir=P,/home/jmaggard/Pictures)
media_dir=A,/mnt/share/Music
media_dir=V,/mnt/share/Videos
media_dir=P,/mnt/share/Pictures
# set this if you want to customize the name that shows up on your clients
friendly_name=Media Server
# set this if you would like to specify the directory where you want MiniDLNA to store its database and album art cache
#db_dir=/mnt/tmp/minidlna
db_dir=/mnt/tmp/minidlna
# this should be a list of file names to check for when searching for album art
# note: names should be delimited with a forward slash ("/")
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg/Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg
# set this to no to disable inotify monitoring to automatically discover new files
# note: the default is yes
inotify=no
# set this to yes to enable support for streaming .jpg and .mp3 files to a TiVo supporting HMO
enable_tivo=no
# set this to strictly adhere to DLNA standards.
# * This will allow server-side downscaling of very large JPEG images,
# which may hurt JPEG serving performance on (at least) Sony DLNA products.
strict_dlna=no
# default presentation url is http address on port 80
presentation_url=http://192.168.1.1:8200/
# notify interval in seconds. default is 895 seconds.
notify_interval=900
# serial and model number the daemon will report to clients
# in its XML description
serial=12345678
model_number=1
Thanks, I'll try that out. For some reason I am not able to create a file in /mnt. It wont allow me to change permissions either...kind of strange. I'll screw around with it for a bit and see what I come up with.
I just tried some ogg files, they work fine for me.
this is the end bit of my log
Code:
[2011/01/17 18:15:40] metadata.c:1059: warn: /mnt/share/Videos/TV/Friends/Season 8/S08E20 The One With The Baby Shower.avi: Unhandled format: ogg
[2011/01/17 18:15:40] metadata.c:1059: warn: /mnt/share/Videos/TV/Friends/Season 8/S08E21 The One With The Cooking Class.avi: Unhandled format: ogg
[2011/01/17 18:15:40] metadata.c:1059: warn: /mnt/share/Videos/TV/Friends/Season 8/S08E22 The One Where Rachel Is Late.avi: Unhandled format: ogg
[2011/01/17 18:15:41] metadata.c:1059: warn: /mnt/share/Videos/TV/Friends/Season 8/S08E23 The One Where Rachel Has A Baby (1).avi: Unhandled format: ogg
[2011/01/17 18:15:41] metadata.c:1059: warn: /mnt/share/Videos/TV/Friends/Season 8/S08E24 The One Where Rachel Has A Baby (2).avi: Unhandled format: ogg
[2011/01/17 18:16:08] scanner.c:789: warn: Scanning /mnt/share/Videos finished (211 files)!
[2011/01/17 18:16:08] scanner.c:721: warn: Scanning /mnt/share/Pictures
[2011/01/17 18:16:08] scanner.c:789: warn: Scanning /mnt/share/Pictures finished (211 files)!