DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#51 2008-10-31 01:30:17

boilerjt
Member
From: Minnesota, USA
Registered: 2008-09-15
Posts: 122

Re: [REL] MediaTomb 0.12.0 SVN 1899

bodbod wrote:

Hi Guys,

maybe you ll be able to help me on that issue, is it possible to keep the directory structure limited to the shared one.
I mean without all the parents directory before

thx you

I'm not sure what you are asking.  The static version of MediaTomb is pretty much self contained with one directory structure independent of ffp.  All of the libraries are statically compiled into the mediatomb binary so no shared libraries are needed.  If you wish to transcode, the files needed are externally called by MediaTomb and need to be installed separately and there are shared libraries that need to be installed in /ffp/lib.

Offline

 

#52 2008-10-31 08:42:00

rap
Member
From: Reading - UK
Registered: 2008-02-28
Posts: 119

Re: [REL] MediaTomb 0.12.0 SVN 1899

Quick update that this version has been absolutely fine for me now so I have managed to modify the scipt from fonz's package to stop and start this version. No expert but the below seems to work fine when run from /ffp/start :-

#!/ffp/bin/sh

# PROVIDE: mediatomb
# REQUIRE: LOGIN

. /ffp/etc/ffp.subr

media_dir="/mnt/HD_a2/Media/Video"
LAUNCHDIR=/mnt/HD_a2/mediatomb12
export MEDIATOMB_DATADIR="$LAUNCHDIR/usr/share/mediatomb"



name="mediatomb"
command="$LAUNCHDIR/usr/bin/$name"
mediatomb_flags="-m $LAUNCHDIR -f config -d --add $media_dir"

run_rc_command "$1"

Offline

 

#53 2008-10-31 19:09:25

bodbod
Member
Registered: 2007-11-22
Posts: 109

Re: [REL] MediaTomb 0.12.0 SVN 1899

Hey Boilerjt

I actually see that : /mnt/HD_a2/Media/Video when I navigate via my PS3

Offline

 

#54 2008-10-31 19:23:00

boilerjt
Member
From: Minnesota, USA
Registered: 2008-09-15
Posts: 122

Re: [REL] MediaTomb 0.12.0 SVN 1899

bodbod wrote:

Hey Boilerjt

I actually see that : /mnt/HD_a2/Media/Video when I navigate via my PS3

You can also manually import data into MediaTomb using the Web UI (http://IP_of_NAS:49152).  If 49152 doesn't work, try 49153.  In this way, your media can be located anywhere on either drive.

Offline

 

#55 2008-11-02 01:16:35

boilerjt
Member
From: Minnesota, USA
Registered: 2008-09-15
Posts: 122

Re: [REL] MediaTomb 0.12.0 SVN 1899

Rival (and anyone else interested),

Here is vlc 0.9.5 for you to try.  Download:  http://www.box.net/shared/0xstexb0dm

This thing was a real pain to compile and I don't really know if it is better than 0.8.6i.  The one thing that is fixed is the ability to transcode the aacplus stream to a different samplerate.  If you set the samplerate to 44100 in the command line and save to a file, it will play at normal speed (sort of...)  It will not play in WMP, but will play in VLC (Windows).  With 0.8.6i, the file (with slow playback) played in WMP and VLC, and it appears something has changed in the way VLC is writing the wav file.  When I stream the transcoded wav to my device, it will not play at all, while it played with 0.8.6i.  Maybe some parameters in the command line have to be changed for 0.9.5?

What is weird is that I can transcode .m4a files to wav using the script and my device plays them...

Here is the updated vlcaudio script using the samplerate parameter:

Code:

#!/ffp/bin/bash

INPUT="$1"
OUTPUT="$2"
AUDIO_CODEC="s16l"
AUDIO_BITRATE="192"
AUDIO_SAMPLERATE="44100"
AUDIO_CHANNELS="2"
FORMAT="wav"

exec vlc -I dummy "${INPUT}" --sout \
"#transcode{acodec=${AUDIO_CODEC},samplerate=${AUDIO_SAMPLERATE},\
ab=${AUDIO_BITRATE},channels=${AUDIO_CHANNELS}}:\
standard{access=file,mux=${FORMAT},dst=${OUTPUT}}" vlc:quit >/dev/null

Also, I realized I messed up last time when telling you the pcm parameters.  To change the script to output pcm audio:

AUDIO_CODEC="s16l" to AUDIO_CODEC="s16b"
FORMAT="wav" to FORMAT="raw"
Also, the samplerate parameter must be in the command line for this to work.

I tested the script streaming pcm and my device played .m4a files, but would not play the online stream.

I'm passing this on to you and see if you can get it to work for aacplus streams.  Good Luck smile

Offline

 

#56 2008-11-02 12:27:50

Rival
Member
From: Budapest
Registered: 2008-03-13
Posts: 53
Website

Re: [REL] MediaTomb 0.12.0 SVN 1899

boilerjt wrote:

AUDIO_CODEC="s16l" to AUDIO_CODEC="s16b"
FORMAT="wav" to FORMAT="raw"

Half speed... sad

No success with new vlc:

vlc: can't load library 'libintl.so.8'

I can't find it neither in my system nor in optware packages...

And what about that vlc could transcode aac+ to mp3? smile

Offline

 

#57 2008-11-02 14:12:33

boilerjt
Member
From: Minnesota, USA
Registered: 2008-09-15
Posts: 122

Re: [REL] MediaTomb 0.12.0 SVN 1899

Rival wrote:

boilerjt wrote:

AUDIO_CODEC="s16l" to AUDIO_CODEC="s16b"
FORMAT="wav" to FORMAT="raw"

Half speed... sad

No success with new vlc:

vlc: can't load library 'libintl.so.8'

I can't find it neither in my system nor in optware packages...

And what about that vlc could transcode aac+ to mp3? smile

For libintl, you need to install the gettext package with libintl. Download here: http://www.box.net/shared/3h2strierx

If you have installed the gettext in ffp 0.5, you will need to uninstall it first (funpkg -r).  Fonz's version does not have libintl.

For aac+ to mp3, I have not tried it because my device will not play mp3.  libmad was compiled into vlc, so it might work and it might not work...

Offline

 

#58 2008-11-02 14:35:58

Rival
Member
From: Budapest
Registered: 2008-03-13
Posts: 53
Website

Re: [REL] MediaTomb 0.12.0 SVN 1899

Final words: it works...

...AAC+ transcoded to RAW... I'll try to transcode to WAV...

...happiness... ... ...thank you boilerjt... ... ... big_smile

...testing in progress... not always connects for the first time, just for the 3rd-5th time...

Last edited by Rival (2008-11-02 14:36:16)

Offline

 

#59 2008-11-02 17:17:40

boilerjt
Member
From: Minnesota, USA
Registered: 2008-09-15
Posts: 122

Re: [REL] MediaTomb 0.12.0 SVN 1899

Rival wrote:

Final words: it works...

...AAC+ transcoded to RAW... I'll try to transcode to WAV...

...happiness... ... ...thank you boilerjt... ... ... big_smile

...testing in progress... not always connects for the first time, just for the 3rd-5th time...

Great news smile  One thing to experiment with are the buffer size, chunk-size, and fill-size parameters in the vlcwav transcoding profile.  The mediatomb documentation at http://mediatomb.cc/pages/documentation will explain these settings.  There are probably also new parameters in vlc 0.9.x that I have not tried.  One thing I do not like about vlc is that it is a memory hog.  0.9.5 takes up 53% of memory when playing an m4a file.  0.8.6i takes 45%. 

I still haven't got 0.9.5 working on my device for aac+ streams, but 0.8.6i still works and plays at the correct speed.  Like I mentioned earlier, it is probably a fluke that it plays.

Keep me updated on your testing smile

Offline

 

#60 2008-11-02 19:19:07

Rival
Member
From: Budapest
Registered: 2008-03-13
Posts: 53
Website

Re: [REL] MediaTomb 0.12.0 SVN 1899

I told that aac+ streams started only for the 4-5th time. The vlc parameter -vv tells nothing special (some yellow colored lib warning in connection with video things, but no red colored error lines). Vlc just starts again and again. Last few lines from output are:

[...]

[00000311] main stream out debug: Filter 'audio_format' (0x178c38) appended to chain
[00000315] main mux debug: adding a new input
[00000315] mux_dummy mux debug: adding input
[00000322] faad decoder warning: decoded zero sample
[00000321] main packetizer debug: switching to async mode
[00000309] main input debug: control type=1


and right after it starts again:

2008-11-02 18:04:08    INFO: Arguments: %in %out
VLC media player 0.9.5 Grishenko
[00000001] main libvlc debug: VLC media player - version 0.9.5 Grishenko - (c) 1996-2008 the VideoLAN team
[00000001] main libvlc debug: libvlc was configured with ./configure  '--prefix=/ffp' '--host=arm-unknown-linux-uclibc' '--enable-run-as-root' '--disable-hal' '--disable-dbus' '--disable-dbus-control' '--disable-telepathy' '--disable-avcodec' '--disable-avformat' '--disable-swscale' '--disable-imgresample' '--disable-postproc' '--disable-a52' '--disable-remoteosd' '--enable-libgcrypt' '--disable-glx' '--enable-mad' '--enable-faad' '--enable-flac' '--disable-ogg' '--disable-vorbis' '--enable-tremor' '--disable-freetype' '--disable-fribidi' '--disable-qt4' '--disable-skins2' '--disable-v4l' '--disable-v4l2' '--disable-libv4l2' 'host_alias=arm-unknown-linux-uclibc'
[00000001] main libvlc debug: translation test: code is "C"
[00000001] main libvlc debug: checking builtin modules
[00000001] main libvlc debug: checking plugin modules

[...]


The warning about faad (decoded zero smaple) you can see above is yellow colored, but when it starts to play this line is also there.

After several times it connects, but more I'm trying, connection ratio goes to zero. So I look at running processes: I can see 30-40 instances of vlc. I can't kill them. Kill `pidof vlc`or killall vlc says nothing, vlc instances are running... I have to restart DNS-323.

So it might be that mediatomb can't kill vlc properly.

I tried to change chunk settings, but had no effect. I tried to transcode to wav, no effect.

Last edited by Rival (2008-11-02 19:27:47)

Offline

 

#61 2008-11-02 19:32:33

boilerjt
Member
From: Minnesota, USA
Registered: 2008-09-15
Posts: 122

Re: [REL] MediaTomb 0.12.0 SVN 1899

Rival wrote:

I told that aac+ streams started only for the 4-5th time. The vlc parameter -vv tells nothing special (some yellow colored lib warning in connection with video things, but no red colored error lines). Vlc just starts again and again. Last few lines from output are:

[...]

[00000311] main stream out debug: Filter 'audio_format' (0x178c38) appended to chain
[00000315] main mux debug: adding a new input
[00000315] mux_dummy mux debug: adding input
[00000322] faad decoder warning: decoded zero sample
[00000321] main packetizer debug: switching to async mode
[00000309] main input debug: control type=1


and right after it starts again:

2008-11-02 18:04:08    INFO: Arguments: %in %out
VLC media player 0.9.5 Grishenko
[00000001] main libvlc debug: VLC media player - version 0.9.5 Grishenko - (c) 1996-2008 the VideoLAN team
[00000001] main libvlc debug: libvlc was configured with ./configure  '--prefix=/ffp' '--host=arm-unknown-linux-uclibc' '--enable-run-as-root' '--disable-hal' '--disable-dbus' '--disable-dbus-control' '--disable-telepathy' '--disable-avcodec' '--disable-avformat' '--disable-swscale' '--disable-imgresample' '--disable-postproc' '--disable-a52' '--disable-remoteosd' '--enable-libgcrypt' '--disable-glx' '--enable-mad' '--enable-faad' '--enable-flac' '--disable-ogg' '--disable-vorbis' '--enable-tremor' '--disable-freetype' '--disable-fribidi' '--disable-qt4' '--disable-skins2' '--disable-v4l' '--disable-v4l2' '--disable-libv4l2' 'host_alias=arm-unknown-linux-uclibc'
[00000001] main libvlc debug: translation test: code is "C"
[00000001] main libvlc debug: checking builtin modules
[00000001] main libvlc debug: checking plugin modules

[...]


The warning about faad (decoded zero smaple) you can see above is yellow colored, but when it starts to play this line is also there.

After several times it connects, but more I'm trying, connection ratio goes to zero. So I look at running processes: I can see 30-40 instances of vlc. I can't kill them. Kill `pidof vlc`or killall vlc says nothing, vlc instances are running... I have to restart DNS-323.

So it might be that mediatomb can't kill vlc properly.

I tried to change chunk settings, but had no effect. I tried to transcode to wav, no effect.

Try getting rid of the ">/dev/null" at the end of the script and see if this helps kill the vlc process.  I noticed a lot of running processes as well and had to reboot the NAS.  After I edited the script, it looks like mediatomb is able to kill the vlc process.

Offline

 

#62 2008-11-03 13:03:08

Rival
Member
From: Budapest
Registered: 2008-03-13
Posts: 53
Website

Re: [REL] MediaTomb 0.12.0 SVN 1899

boilerjt wrote:

Try getting rid of the ">/dev/null" at the end of the script and see if this helps kill the vlc process.  I noticed a lot of running processes as well and had to reboot the NAS.  After I edited the script, it looks like mediatomb is able to kill the vlc process.

Ok, it's working now, mediatomb kills vlc properly.

I'll try to transcode aac to mp3, just to check whether this connection-disconnection thing is there or not. Anyway vlc takes about 48% of memory, and 30-35% of CPU when transcoding aac to pcm. I tried to set the size of chunk and fill buffers, but had no effect. Your config.xml has a line:

<use-chunked-encoding>no</use-chunked-encoding>

I can't find it also in mediatomb docs. It means that mediatomb doesn't use these chunk settings, doesn't it?

Offline

 

#63 2008-11-03 13:41:38

Rival
Member
From: Budapest
Registered: 2008-03-13
Posts: 53
Website

Re: [REL] MediaTomb 0.12.0 SVN 1899

I suspect that my MusicPal device occours this connection retry problem. I have to find a way to set a higher timeout for UPnP connection, because vlc can't start transcoding as fast as this timeout ends. Do you know a mediatomb config parameter for this? <retries-on-timeout>xxx</retries-on-timeout> is not for me, and has no effect...

Offline

 

#64 2008-11-03 15:19:28

boilerjt
Member
From: Minnesota, USA
Registered: 2008-09-15
Posts: 122

Re: [REL] MediaTomb 0.12.0 SVN 1899

Rival wrote:

<use-chunked-encoding>no</use-chunked-encoding>

I can't find it also in mediatomb docs. It means that mediatomb doesn't use these chunk settings, doesn't it?

This is a new setting in 0.12.0 and is primarily for transcoding video.  The online documentation is for 0.11.0.

Offline

 

#65 2008-11-03 15:26:02

boilerjt
Member
From: Minnesota, USA
Registered: 2008-09-15
Posts: 122

Re: [REL] MediaTomb 0.12.0 SVN 1899

Rival wrote:

I suspect that my MusicPal device occours this connection retry problem. I have to find a way to set a higher timeout for UPnP connection, because vlc can't start transcoding as fast as this timeout ends. Do you know a mediatomb config parameter for this? <retries-on-timeout>xxx</retries-on-timeout> is not for me, and has no effect...

I haven't see anything like this before.  You might want to post on the mediatomb forum and Jin might have an answer.

https://sourceforge.net/forum/forum.php?forum_id=440751

Offline

 

#66 2008-11-10 16:16:09

flintster
New member
Registered: 2008-11-10
Posts: 2

Re: [REL] MediaTomb 0.12.0 SVN 1899

Hi, quick question - has anyone had a problem with id3 tags on mp3's on this static build? I imported using the js import and m4a's appeared to get classified correctly, mp3's all tagged as 'unknown' - I tried to debug a bit (yes im a noob so needed to confine to the js ... ) and it looks like the M_TITLE, M_ARTIST etc are not getting set for mp3's (show as 'undefined' when printed from the js) but are for m4a's so it seems like a taglib issue?  i did install all the funplug stuff using funpkg -i and using 0.5. Also made sure the tags are valid (showing up in mediamonkey).  No errors in the log file.


Great work boilerjt and all who help on this , I got this nas not having any idea what was in there... haven't done linux stuff ever and got this going in a couple hours.

thanks!

Last edited by flintster (2008-11-10 16:23:45)

Offline

 

#67 2008-11-10 17:28:29

boilerjt
Member
From: Minnesota, USA
Registered: 2008-09-15
Posts: 122

Re: [REL] MediaTomb 0.12.0 SVN 1899

flintster wrote:

Hi, quick question - has anyone had a problem with id3 tags on mp3's on this static build? I imported using the js import and m4a's appeared to get classified correctly, mp3's all tagged as 'unknown' - I tried to debug a bit (yes im a noob so needed to confine to the js ... ) and it looks like the M_TITLE, M_ARTIST etc are not getting set for mp3's (show as 'undefined' when printed from the js) but are for m4a's so it seems like a taglib issue?  i did install all the funplug stuff using funpkg -i and using 0.5. Also made sure the tags are valid (showing up in mediamonkey).  No errors in the log file.


Great work boilerjt and all who help on this , I got this nas not having any idea what was in there... haven't done linux stuff ever and got this going in a couple hours.

thanks!

MP3 tagging is working for me.  As an experiment, try setting <virtual-layout type="builtin"> in config.xml and see if this works when importing mp3.  It could also be a libmagic problem if the mimetype is not detected right.  Try placing this in the mappings in config.xml <map from="mp3" to="audio/mpeg"/>.

Offline

 

#68 2008-11-10 21:08:08

flintster
New member
Registered: 2008-11-10
Posts: 2

Re: [REL] MediaTomb 0.12.0 SVN 1899

Great, thanks for the quick response! Your mappings comment led me to it, there was an error in the 'treat' section - I had mis-configured it when trying to figure out some transcoding and failed to put it back.  Works great now!

Offline

 

#69 2008-11-13 12:14:35

Rival
Member
From: Budapest
Registered: 2008-03-13
Posts: 53
Website

Re: [REL] MediaTomb 0.12.0 SVN 1899

With default settings Mediatomb couldn't handle the Hungarian accentuated characters (like íéáőúűöüó) well, it just showed a question mark and cut the word (ex. "Demjén Ferenc" = "Demj?"). So I added/modified the following lines in config.xml:

<filesystem-charset>UTF-8</filesystem-charset>
<metadata-charset>UTF-8</metadata-charset>
<playlist-charset>UTF-8</playlist-charset>
<scripting script-charset="UTF-8">
<...>


Mediatomb now imports and shares file names/mp3 tags well.

boilerjt: I can't figure out why vlc has this very low connection ratio. It seems that Mediatomb or my player can't catch the line and can't start playing. I played with buffer settings, but no effect...

A small addon to process kill problem: It seems that not just vlc has this process kill problem, oggdec has it too (I removed /dev/null of course). When vlc or oggdec can't connect to a stream correctly or the stream disconnects it often remains in running status. Not always, but often... and of course DNS-323 runs out of CPU resource because of many vlc or oggdec instances.

Last edited by Rival (2008-11-13 13:13:29)

Offline

 

#70 2008-11-13 15:35:07

boilerjt
Member
From: Minnesota, USA
Registered: 2008-09-15
Posts: 122

Re: [REL] MediaTomb 0.12.0 SVN 1899

Rival wrote:

With default settings Mediatomb couldn't handle the Hungarian accentuated characters (like íéáőúűöüó) well, it just showed a question mark and cut the word (ex. "Demjén Ferenc" = "Demj?"). So I added/modified the following lines in config.xml:

<filesystem-charset>UTF-8</filesystem-charset>
<metadata-charset>UTF-8</metadata-charset>
<playlist-charset>UTF-8</playlist-charset>
<scripting script-charset="UTF-8">
<...>


Mediatomb now imports and shares file names/mp3 tags well.

boilerjt: I can't figure out why vlc has this very low connection ratio. It seems that Mediatomb or my player can't catch the line and can't start playing. I played with buffer settings, but no effect...

A small addon to process kill problem: It seems that not just vlc has this process kill problem, oggdec has it too (I removed /dev/null of course). When vlc or oggdec can't connect to a stream correctly or the stream disconnects it often remains in running status. Not always, but often... and of course DNS-323 runs out of CPU resource because of many vlc or oggdec instances.

Thanks for the character set information.  As for the transcoding running processes remaining open, I have no answer for you.  MediaTomb just passes the URL to these apps and if they don't let MediaTomb know there was an error (or gracefully exit on their own), MediaTomb will not kill the process.  Maybe you can submit a bug report to VLC and see if anything happens.

Offline

 

#71 2008-11-15 02:53:20

mozkill
Member
Registered: 2008-04-26
Posts: 20

Re: [REL] MediaTomb 0.12.0 SVN 1899

FW version 1.06 is supposed to support PS/3  with Mediatomb.    Does anyone have their Mediatomb working with a PS/3 already, and if so, how is it configured to stream to a PS/3 ?

Offline

 

#72 2008-11-15 18:27:54

scarcow
Member
From: Hungary
Registered: 2008-10-10
Posts: 16

Re: [REL] MediaTomb 0.12.0 SVN 1899

boilerjt wrote:

scarcow wrote:

Hi,

Great news, this means that all the music files i have will have properly read tags, which is good. Thanks for the update, your work is really appreciated. smile

Btw, a little feedback: i am now using the static build you did earlier and it works nicely, also as you mentioned m4a tags are read. For the wma, i have a crude workaround using the import.js, that MT reads the folder structure if it cannot read the tags - of course the real tags would be much better.

One thing i noticed, is that when i import my files into MT (something like 1500 songs), the memory usage goes quite high (66% - ok, i know that the DNS doesn't have too much memory, but anyway) and stays there. If i restart it, then the memory usage goes down to around 13%. Is this a normal behaviour?

-sc

I ran an experiment to check this out.  First off, I rebooted the NAS to get it into a known state.  When I launched MediaTomb in daemon mode (the way it is started in mediatomb.sh), it uses 12% of the memory and 0% CPU (using top).  I then imported about 7000 tracks.  The CPU usage is between 80-85% and the memory slowly climbed to 21%.  When the import finished, CPU dropped back to 0%, but the memory stayed at 21%.  I'm going to check it later to see if it stays at 21%.  There may be a memory leak and if so, I'll report it to the MediaTomb developer (Jin).  I definitely did not see 66%....

I finally made myself to do the reimporting of all my tracks. For me, after importing all my tracks, the memory usage went up to 64%, see the attachments mt1 and mt2. Mt2 is done after a couple of hours, including some streaming of music.
After restarting mt, it went back to normal - around 13%. See mt_restarted.

So, it definiately is happening for me. I just don't know, what can be the difference. Maybe the import script, or the usage of UTF-8 coding in tags and filenames as well...

Anyway, it is not a big issue, as it only happens when i import all my tracks at once, and even then it can be fixed quite easily.

-sc

Last edited by scarcow (2008-11-15 18:29:05)


Attachments:
Attachment Icon screenshots.zip, Size: 118,673 bytes, Downloads: 732

Offline

 

#73 2008-11-16 07:09:33

boilerjt
Member
From: Minnesota, USA
Registered: 2008-09-15
Posts: 122

Re: [REL] MediaTomb 0.12.0 SVN 1899

I have reported this to the developer about the memory not being released after import and he said he would look into it.  I agree that is a not a major issue since memory is released after an app restart, but I hope he can fix it.  He told me yesterday that he is trying to get 0.12 released in 2 weeks.  We'll see if it is fixed at that time.

scarcow wrote:

boilerjt wrote:

scarcow wrote:

Hi,

Great news, this means that all the music files i have will have properly read tags, which is good. Thanks for the update, your work is really appreciated. smile

Btw, a little feedback: i am now using the static build you did earlier and it works nicely, also as you mentioned m4a tags are read. For the wma, i have a crude workaround using the import.js, that MT reads the folder structure if it cannot read the tags - of course the real tags would be much better.

One thing i noticed, is that when i import my files into MT (something like 1500 songs), the memory usage goes quite high (66% - ok, i know that the DNS doesn't have too much memory, but anyway) and stays there. If i restart it, then the memory usage goes down to around 13%. Is this a normal behaviour?

-sc

I ran an experiment to check this out.  First off, I rebooted the NAS to get it into a known state.  When I launched MediaTomb in daemon mode (the way it is started in mediatomb.sh), it uses 12% of the memory and 0% CPU (using top).  I then imported about 7000 tracks.  The CPU usage is between 80-85% and the memory slowly climbed to 21%.  When the import finished, CPU dropped back to 0%, but the memory stayed at 21%.  I'm going to check it later to see if it stays at 21%.  There may be a memory leak and if so, I'll report it to the MediaTomb developer (Jin).  I definitely did not see 66%....

I finally made myself to do the reimporting of all my tracks. For me, after importing all my tracks, the memory usage went up to 64%, see the attachments mt1 and mt2. Mt2 is done after a couple of hours, including some streaming of music.
After restarting mt, it went back to normal - around 13%. See mt_restarted.

So, it definiately is happening for me. I just don't know, what can be the difference. Maybe the import script, or the usage of UTF-8 coding in tags and filenames as well...

Anyway, it is not a big issue, as it only happens when i import all my tracks at once, and even then it can be fixed quite easily.

-sc

Offline

 

#74 2008-11-19 11:35:41

Rival
Member
From: Budapest
Registered: 2008-03-13
Posts: 53
Website

Re: [REL] MediaTomb 0.12.0 SVN 1899

[off]What do you think how much time does it take to import 16700 mp3 files? Mediatomb is working on it for five days now and didn't finished yet. Now the database file is 55MB large. It's normal? I don't think that just I have this amount of files...[/off]

Offline

 

#75 2008-11-19 16:12:59

boilerjt
Member
From: Minnesota, USA
Registered: 2008-09-15
Posts: 122

Re: [REL] MediaTomb 0.12.0 SVN 1899

Rival wrote:

[off]What do you think how much time does it take to import 16700 mp3 files? Mediatomb is working on it for five days now and didn't finished yet. Now the database file is 55MB large. It's normal? I don't think that just I have this amount of files...[/off]

People with other NAS boxes have been reporting the slow import as well.  A lot of it depends on the amount of tags reads and number of menus processed/created per song.  Also, I've noticed that the longer the import is running, the slower it gets.

I have about 16K songs and what I do is import them in batches using the Web UI.  For example, the directory structure on my hard drive is  /Music/Artist/Album/Song.  Instead of importing the entire Music directory, I'll import each Artist directory.  This is more work, but I was able to import everything in 2 hours.  Also, it helps if you use a custom js import script and minimize the tags and menu structure.  For example, here is my music import script in import.js:

Code:

function addAudio(obj) 
{ 
var desc = ''; 
var artist_full; 
var album_full;
var NumChars = "0123456789"; 
 
// first gather data 
var title = obj.meta[M_TITLE]; 
if (!title) title = obj.title; 
 
var artist = obj.meta[M_ARTIST]; 
var first_letter = ''; 
if (!artist) { 
artist = 'Unknown'; 
first_letter = 'Unknown'; 
artist_full = null; 
} else { 
artist_full = artist; 
first_letter = artist.charAt(0).toUpperCase();
if (NumChars.indexOf(first_letter) != -1) 
{
   first_letter ='0-9';
}

desc = artist; 
} 
 
var album = obj.meta[M_ALBUM]; 
if (!album) { 
album = 'Unknown'; 
album_full = null; 
} else { 
desc = desc + ', ' + album; 
album_full = album; 
} 

var track = obj.meta[M_TRACKNUMBER]; 
if (!track) 
track = ''; 
else { 
if (track.length == 1) { 
track = '0' + track; 
} 
track = track + ' '; 
}
 
chain = new Array('Audio', first_letter, artist, album); 
obj.title = track + title; 
addCdsObject(obj, createContainerChain(chain), UPNP_CLASS_CONTAINER_MUSIC_ALBUM); 
 
chain = new Array('Audio', first_letter, artist, '-All Songs-'); 
obj.title = album_full + ' - ' + track + title; 
addCdsObject(obj, createContainerChain(chain), UPNP_CLASS_CONTAINER_MUSIC_ALBUM); 
}

My menu structure is Music-First Letter Of Artist-Artists-Albums-Songs and that is it.  There is no genre, all songs, or all albums that are present in the default import.  To use a custom import script, this must be set in config.xml: <virtual-layout type="js"> not <virtual-layout type="builtin">.

I hope this helps smile

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB