Problem with automatic thumbnail generation

Please post your questions about using the web-based Photo, Music, Video Stations here.
mr_hyde
Easy as a breeze
Posts: 409
Joined: Sun Sep 02, 2007 3:51 pm
Location: Germany

Problem with automatic thumbnail generation

Post by mr_hyde »

Hello,

i've observed a problem with the automatic thumnail generation which is started through cronjob (ImR_all). The programm goes not through all of my folders. I've got less than 8 subfolders and the process scans some folders and does not scan folders with similar names, same users, rights....

When i've tried to generate the thumbnails via ImR_all directly in the specific folder:

ImR_all -soft specificfolder

it works.

I've written a small workaround which will now be started through cronjob instead of the original one.

Code: Select all

find /Qmultimedia/ -type d | grep -v .@ > foo
while read LINE
do
set $LINE
/usr/local/sbin/ImR_all -soft $LINE
done < foo
rm foo

Probably the code is not perfect since i am not an IT specialist, but it works reliable. This situation was under FW1.1.0 as well as it is still under 1.1.1.

My folders look like 2007_08_01
QNAP TS-453A
4 * Hitachi 3 TB HDD (RAID 5)
FW: 4.5.1 1540
User avatar
kent
QNAP Staff
Posts: 198
Joined: Fri Aug 31, 2007 5:21 pm
Location: Taipei, Taiwan

Post by kent »

I think that you are a great IT specialist, thanks for your sharing!

Actually, in the crontab the ImR_all should work fine.
What is the error message when you run "ImR_all -soft /Qmultimedia" in console?
I am Kent. Nice to meet you!
mr_hyde
Easy as a breeze
Posts: 409
Joined: Sun Sep 02, 2007 3:51 pm
Location: Germany

Post by mr_hyde »

kent wrote:I think that you are a great IT specialist, thanks for your sharing!

Actually, in the crontab the ImR_all should work fine.
What is the error message when you run "ImR_all -soft /Qmultimedia" in console?
Hello,

i get an error message 'Segmentation fault' when it creates thumbnails. Nevertheless, when i got this message, thumbnails were generated correctly for this subfolder. The command above does not recognize the some (~50%) of the other folders (even when they've got the same name structure, owners, rights (e.g. 2006_08_01 ok and 2006_07_26 not ok)). When i aplly the command directly to /Qmultimedia/SUBFOLDER it works as for the other folders. As a consequence i apply the command to each subfolder.
QNAP TS-453A
4 * Hitachi 3 TB HDD (RAID 5)
FW: 4.5.1 1540
tschi
Starting out
Posts: 23
Joined: Sun Sep 09, 2007 5:50 am
Location: The Netherlands

Post by tschi »

Hi,

I found this thread because I get lots of errors like:

Code: Select all

Server Name: qnap
IP Address: 192.168.0.102
Date/Time: 09/09/2007 01:17:43
Level:  Warning

Re-launch process [ImRd].
There are more than 20000 jpeg files in this directory structure.
It seems that the cronjob is not able to handle all of this.

I have tried this command as well "ImR_all -soft /Qmultimedia" and also get the segmentation fault.
However if you do:
cd /share/MD0_DATA
ImR_all -soft ./Qmultimedia
There are no problems and it starts generating the thumbnails.
Theo
chowchow2003
Starting out
Posts: 30
Joined: Sun Sep 16, 2007 9:36 pm

Very Slow Speed of Photo Thumbnails Generation

Post by chowchow2003 »

Dear Sir,

Pls advise how to improve the thumbnails speed since I have about 20GB photos put into the multimedia folder 3 days before. However, the thumbnails process still carrying on. :(
mr_hyde
Easy as a breeze
Posts: 409
Joined: Sun Sep 02, 2007 3:51 pm
Location: Germany

Re: Very Slow Speed of Photo Thumbnails Generation

Post by mr_hyde »

chowchow2003 wrote:Dear Sir,

Pls advise how to improve the thumbnails speed since I have about 20GB photos put into the multimedia folder 3 days before. However, the thumbnails process still carrying on. :(
I fully support this. My former NAS from a competitor was faster (for this process) with less ram and cpu power. Nevertheless, when this NAS generated thumbnails, the other processes were extremely slow. If a faster thumbnail generation would reduce the speed of the other processes, i am happy with the current speed.

One question: Do you know, that the process is still ongoing or do you've got just folders without thumbs and they will be only generated when you go into the folder with the multimediainterface?
QNAP TS-453A
4 * Hitachi 3 TB HDD (RAID 5)
FW: 4.5.1 1540
User avatar
aquila
New here
Posts: 5
Joined: Thu Sep 13, 2007 4:27 pm
Location: Australia

Post by aquila »

I agree, there is a problem with generating thumbnails. After loading 30GB of images files the cronjob has not been up to it. I find I have to do it manually by opening each image folder !!
- QNAP TS-109 / fw: 2.0.1 Build 0319T / HDD: Samsung 500GB HD501LJ
- Enabled: Twonky, FTP, QDownload, QMultimedia
- XP SP2 / English / Other: Billion 7402VGP; Media players: Roku M500 & Roku M1001
mr_hyde
Easy as a breeze
Posts: 409
Joined: Sun Sep 02, 2007 3:51 pm
Location: Germany

Post by mr_hyde »

aquila wrote:I agree, there is a problem with generating thumbnails. After loading 30GB of images files the cronjob has not been up to it. I find I have to do it manually by opening each image folder !!
Still the same problem in Fw 1.1.2. Here it seems to be that at least the folder with ImR_all was updated since my shell script was deleted after FW update. The crontab was not modified at all. I just had to copy my script back and the automatic thumbnail generation works again.

Probably the ImR_all works only for a certain number of folders. I would appreciate, if QNAP could add this script to the FW as long the problem with ImR_all is not fixed.
QNAP TS-453A
4 * Hitachi 3 TB HDD (RAID 5)
FW: 4.5.1 1540
MathieuMa

Segfault

Post by MathieuMa »

The Qmultimedia feature is un-usable.
I managed to get a first directory cleanly generated, but the new ones I made all segfault during generation :

[/share/HDA_DATA/Qmultimedia] # /usr/local/sbin/ImR_all -soft Pour\ nous/
Generating Thumbnails...[Pour nous]
Segmentation fault

Qnap - is there anything planned regarding such issues ?
This problem, the issues with MacOS ... overall a good product on paper, good hardware - but many issues.

And the only mails I receive are press release telling me Qnap got a new nice review ...
(I didn't asked particular support - as enough people are asking already - no need to add myself to the pile of direct support)
QNAPRei
Been there, done that
Posts: 700
Joined: Mon Aug 27, 2007 1:16 pm
Location: Taipei
Contact:

Post by QNAPRei »

Hi MathieuMa,

The command should be:
[/share/Qmultimedia] # ImR_all -soft /Qmultimedia/Pour\ nous/

Pls remember to enter the NAS share folder "Qmultimedia".
Online Support Form: http://www.qnap.com/onlinesupport.asp
Support email: q_support@qnap.com.tw
MSN: q.support@hotmail.com
Skype: qnapskype
MathieuMa

Post by MathieuMa »

Hi,

Thanks the info, it works that way.
There is still an issue - as the web interface don't generate the pictures as it should (I receive a mail telling me the process was restarted)

Now waiting for the next firmware for MacOS fixes ;)
gtisi
New here
Posts: 3
Joined: Sun Jan 04, 2009 2:28 am

Re: Problem with automatic thumbnail generation

Post by gtisi »

Code: Select all

find /Qmultimedia/ -type d | grep -v .@ > foo
while read LINE
do
set $LINE
/usr/local/sbin/ImR_all -soft $LINE
done < foo
rm foo

Good man, works great
mr_hyde
Easy as a breeze
Posts: 409
Joined: Sun Sep 02, 2007 3:51 pm
Location: Germany

Re: Problem with automatic thumbnail generation

Post by mr_hyde »

gtisi wrote:

Code: Select all

find /Qmultimedia/ -type d | grep -v .@ > foo
while read LINE
do
set $LINE
/usr/local/sbin/ImR_all -soft $LINE
done < foo
rm foo

Good man, works great
look here, you will find an updated script, since with the old version also problems could occur (depending on the dir names)

http://forum.qnap.com/viewtopic.php?f=2 ... job#p46439
QNAP TS-453A
4 * Hitachi 3 TB HDD (RAID 5)
FW: 4.5.1 1540
mandragor59
New here
Posts: 4
Joined: Wed Dec 17, 2008 4:09 am

Re: Problem with automatic thumbnail generation

Post by mandragor59 »

Hello,

I've tested several single directories with ImR_all because of the "segmentation fault" Problem.

I've found several Problems: :(

1. ImR_all has problems with directory names, especialy if there are special characters an spaces in it. (shell problem ?)
2. ImR_all sometimes has problems with the explorer thumbnail-database "thumbs.db" if it is generated in the same directory.
3. ImR_all has problems with wildcards and shell-expressions in the commandline, whitch makes scripting a bit difficult. (shell ?)
4. ImR_all sometimes crashes with a "segmentation fault" if there are other files (maybe indigestible ?) than pictures.

So i have modified the posted script to "workaround" some of the problems:

1. delete all Thumbnails

Code: Select all

#!/bin/sh
find /Qmultimedia/ -name .@__thumb > /tmp/thumblist.txt
while read LINE
do
set $LINE
echo "delete $LINE"
rm -r "$LINE"
done < /tmp/thumblist.txt
rm /tmp/thumblist.txt
2. Create them all (Also usefull for cron-operating)

Code: Select all

#!/bin/sh
find /Qmultimedia/ -type d | grep -v @__thumb > /tmp/dirlist.txt
while read LINE
do
set $LINE
/usr/local/sbin/ImR_all -soft "$LINE"
done < /tmp/dirlist.txt
rm /tmp/dirlist.txt
The trick are the quotation-marks. They mask the spaces and special characters with in the directory names.

An other shell than /bin/sh could help. Is there any bash or korn-shell implementation for the NAS ?
Scripting would be much easier.

Testing with in other language-enviroments than the english one could help too to prevent such errors ! :wink:
mr_hyde
Easy as a breeze
Posts: 409
Joined: Sun Sep 02, 2007 3:51 pm
Location: Germany

Re: Problem with automatic thumbnail generation

Post by mr_hyde »

Hy,

quotation marks were in the new script, i was reffering to. :-)

BR
QNAP TS-453A
4 * Hitachi 3 TB HDD (RAID 5)
FW: 4.5.1 1540
Post Reply

Return to “Photo Station, Music Station, Video Station”