miniDLNA installation problems on wheezy


11 posts
by 600stu » Thu Jun 28, 2012 9:22 pm
Hi,

I'm looking for some assistance with trying to install miniDLNA on my pi.

I'm following these instructions on:

http://www.senab.co.uk/2012/06/09/raspb ... rver-pt-1/

After a few hiccups related to me being a relative noob i have now got all of the dependancies listed in the instructions installed, but when i try to install miniDLNA i get:

Code: Select all
pi@raspberrypi ~ $ sudo dpkg -i minidlna-1.0.24-1-arm.deb
(Reading database ... 58198 files and directories currently installed.)
Preparing to replace minidlna 1.0.24-1 (using minidlna-1.0.24-1-arm.deb) ...
Unpacking replacement minidlna ...
dpkg: dependency problems prevent configuration of minidlna:
 minidlna depends on libjpeg62; however:
  Package libjpeg62 is not installed.
 minidlna depends on sqlite3; however:
  Package sqlite3 is not installed.
 minidlna depends on libavformat52; however:
  Package libavformat52 is not installed.
dpkg: error processing minidlna (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 minidlna


I'm confused - the code above says that sqlite3 isn't installed but it was one of the dependancies i installed previously...
If i try and install the dependancies which the code above says are missing, i get the following:

Code: Select all
pi@raspberrypi ~ $ sudo apt-get install sqlite3 libavformat52
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libavformat52 : Depends: libavcodec52 (>= 5:0.7.13) but it is not going to be installed
                 Depends: libavutil50 (>= 5:0.7.13) but it is not going to be installed
                 Depends: libjack-jackd2-0 (>= 1.9.5~dfsg-14) but it is not going to be installed or
                          libjack-0.116
                 Depends: libx264-118 (>= 3:0.118.2085+git8a62835) but it is not going to be installed
 minidlna : Depends: libjpeg62 but it is not going to be installed
 sqlite3 : Depends: libsqlite3-0 (= 3.7.13-1) but 3.7.12.1-1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


Are these problems related to me trying to install miniDLNA on wheezy - could some of the libraries not be compatible with wheezy?
Posts: 9
Joined: Wed Jun 13, 2012 9:36 pm
by pieter » Fri Jun 29, 2012 10:09 am
Accoording to this : http://packages.debian.org/wheezy/minidlna
minidlna is part of wheezy.

If you're running wheezy a simple apt-get install minidlna should have been enough.

In your situation I would (try to) do the following:
Code: Select all
apt-get remove minidlna
(that should remove the apt-get problem)
or if that doesn't work:
Code: Select all
dpkg -P minidlna

Then restore your /etc/apt/sources.list files (I don't have a default file available to show you one :-( )
Then:
Code: Select all
apt-get update && apt-get install minidlna


I don't have my raspberry-pi with me so I can't test the code above but I hope it will atleast point you in the right direction.
Posts: 34
Joined: Mon Aug 22, 2011 7:12 am
by 600stu » Mon Jul 02, 2012 8:41 pm
Thanks pieter!

followed your instructions and its installed.
Posts: 9
Joined: Wed Jun 13, 2012 9:36 pm
by 600stu » Mon Jul 02, 2012 9:14 pm
I think i have permission based problems now!



Could these instructions have introduced a problem related to running the service as root?

Code: Select all
# Change db_dir so that the database is saved across reboots
db_dir=/home/pi/.minidlna
 
# Uncomment log_dir for now in case we hit problems
log_dir=/var/log
 
# Start MiniDLNA at boot
sudo update-rc.d minidlna defaults
 
# Start MiniDLNA now
sudo service minidlna start



See the error from the minidlna log file below:

Code: Select all
[2012/07/02 19:54:43] minidlna.c:898: warn: Starting MiniDLNA version 1.0.24 [SQLite 3.7.12.1].
[2012/07/02 19:54:43] minidlna.c:926: warn: Creating new database...
[2012/07/02 19:54:44] minidlna.c:1006: warn: HTTP listening on port 8200
[2012/07/02 19:54:44] scanner.c:727: warn: Scanning /media/ExternalHd
[2012/07/02 19:54:44] scanner.c:798: warn: Scanning /media/ExternalHd finished (0 files)!
[2012/07/02 19:54:44] playlist.c:125: warn: Parsing playlists...
[2012/07/02 19:57:56] minidlna.c:898: warn: Starting MiniDLNA version 1.0.24 [SQLite 3.7.12.1].
[2012/07/02 19:57:56] sql.c:41: error: SQL ERROR 8 [attempt to write a readonly database]
pragma default_cache_size = 8192;
[2012/07/02 19:57:56] minidlna.c:1006: warn: HTTP listening on port 8200
[2012/07/02 21:00:17] minidlna.c:155: warn: received signal 15, good-bye
[2012/07/02 21:00:17] sql.c:41: error: SQL ERROR 8 [attempt to write a readonly database]


the database file lives in
Code: Select all
/home/pi/.minidlna
but the permissions are as follows:

Code: Select all
drwxr-xr-x  2 pi   pi    4096 Jul  2 19:54 .
drwxr-xr-x 13 pi   pi    4096 Jul  2 21:06 ..
-rw-r--r--  1 root root 77824 Jul  2 19:54 files.db


So i have tried changing the permissions of files.db to 777 using chmod, but when i power cycle the pi the permissions have changed back to read only.

I think that files.db should be owned by minidlna, the same as the log file... Is this right?
Posts: 9
Joined: Wed Jun 13, 2012 9:36 pm
by 600stu » Thu Jul 05, 2012 6:50 pm
Bump
Posts: 9
Joined: Wed Jun 13, 2012 9:36 pm
by SirLagz » Fri Jul 06, 2012 2:10 am
run minidlna as root with the files.db in /root/ and see how you go.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044
Posts: 1704
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
by craigy72 » Mon Jul 23, 2012 8:43 pm
you can use the sudo apt-get install minidlna on the latest version of Debian Wheezy.

I have successfully installed miniDLNA on my raspberry Pi and can see the media server on my ps3. However, I cannot get the files to show up. The ps3 just says there are no files.

I'm sure there is a setting or a particular folder structure that the playstation uses. I've tried creating 3 folders with VIDEO, MUSIC, PICTURES but it still doesn't work.

Any ideas?

Thanks
Posts: 5
Joined: Mon Jul 09, 2012 12:17 pm
by craigy72 » Mon Jul 23, 2012 9:11 pm
quick update - when navigating to http://192.168.0.9:8200/ I get no files found status:

MiniDLNA status
Audio files: 0
Video files: 0
Image files: 0
Posts: 5
Joined: Mon Jul 09, 2012 12:17 pm
by obarthelemy » Mon Jul 23, 2012 10:48 pm
don't forget to set your media dir:

media_dir
Path to the directory containing the media files the minidlna
server should share. Use this option several times if you have
more than one directory to share. To restrict a path to one
specific media type, you can use the following syntax: the letter
‘A’, ‘V’ or ‘P’, followed by a comma (‘,’) followed by the path.
The meaning of the first letter is as follows:
· ‘A’ for audio files;
· ‘V’ for video files;
· ‘P’ for image files.
For example, if you want to include only video files located
under the /opt/media/videos directory, you would use
media_dir=V,/opt/media/videos.

After making changes to this option, you need to rebuild the
database. If you use an init script to start/stop minidlna, then
you should run (as root) service minidlna force-reload.
Otherwise, just add -R to your usual minidlna command line
(minidlna [...] -R).

from http://manpages.ubuntu.com/manpages/one ... onf.5.html
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm
by ghelfer » Thu Jan 31, 2013 8:41 pm
Hello,
I followed all the instructions but I am not using external HDD.
I put directly 3 video files into the video directory /home/1033class/share/video
Restarting the service and checking the log I see scanninig 0 files!!!
and more:

warn: Returning UPNPError 402: invalid args
warn: Inotify max_user_watches (8192) is low or closes to the number of used watches [6] and I dont have permission to increase...

Need help!
Posts: 1
Joined: Thu Jan 31, 2013 8:27 pm
by PiBoi » Tue Oct 22, 2013 9:10 am
to fix
Code: Select all
warn: Inotify max_user_watches (8192) is low or closes to the number of used watches [6] and I dont have permission to increase...


sudo nano /etc/sysctl.conf
add the following:
# Increase inotify max watchs per user for local minidlna
fs.inotify.max_user_watches = 100000

save and reboot
not sure about your "warn: Returning UPNPError 402: invalid args"
check your minidlna.conf file for errors
if you can't find anything increase the logging level on minidlna
there is a setting in minidlna.conf to turn on debug logging
Posts: 13
Joined: Sun Oct 20, 2013 11:53 pm