News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu

About Metadata

Started by golgoj4, October 30, 2010, 04:33:09 PM

Previous topic - Next topic

golgoj4

Hello All,

If your interested in compiling or just checking out the code (warning - im very new to c++) it can be found @ http://gitorious.org/linuxmce-autotagger. Whenever i push it to the server, it should be able to compile and run. There is also a binary called 'autotagger' that should be ready to go stand alone.

Beta version 1.1
-Takes 2 different command line arguments:
    -The path in quotes "/home/public/data/videos/test/"
    -The file number of the directory. This can be located in mediaFilesSync in the webadmin. Whenever you mouse over a link to a file, it shows you the file number (as its part of the link)

Test if you have a chance on a smaller media set (or large if your brave). In my testing the biggest impact is sustained db activity over %50 while running over larger lists of files. And this is the reason its specifically NOT recursive. So wherever you direct it, files should be there and not in a subdir.


Thanks for taking the time to read and test. Hopefully this can be integrated in the near future so our media will get tagged automagically.
-golgoj4
Linuxmce - Where everyone is never wrong, but we are always behind xbmc in the media / ui department.

golgoj4

Quote from: michel7more on November 03, 2010, 05:24:44 AM
Metadata can be stored either internally, in the same file as the data, or externally, in a separate file. Metadata that is embedded with content is called embedded metadata. A data repository typically stores the metadata detached from the data.

?
Linuxmce - Where everyone is never wrong, but we are always behind xbmc in the media / ui department.

Marie.O

If I helped you, feel free to buy me a coffee: [url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES"]https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES[/url]

golgoj4

Linuxmce - Where everyone is never wrong, but we are always behind xbmc in the media / ui department.

golgoj4

http://gitorious.org/linuxmce-autotagger/linuxmce-autotagger

Any brave souls are welcome to test it out.

By default it finds /home/public/videos and looks there for files.
You can direct it to another directory by entering the path , but as this is testing i recommend a small set of files.

On to updateMedia...
-golgoj4
Linuxmce - Where everyone is never wrong, but we are always behind xbmc in the media / ui department.

phenigma

If I point it at a specific directory I get this:
dcerouter_1013980:~/linuxmce-autotagger# ./autotagger /home/public/data/videos/test
connection made!
Media Autotagger v1.1
./autotagger: symbol lookup error: ./autotagger: undefined symbol: _ZN9QListData11detach_growEPii


If I run it with no parameters I get the following output, autotagger immediately exits:

dcerouter_1013980:~/linuxmce-autotagger# ./autotagger
connection made!
Media Autotagger v1.1
This is default scan directory: /home/public/data/videos
Got File List for Directory, Going to Work
DB Closed!
dcerouter_1013980:~/linuxmce-autotagger#


Any thoughts?

J.
My setup: [url="http://wiki.linuxmce.org/index.php/User:Phenigma"]http://wiki.linuxmce.org/index.php/User:Phenigma[/url]

golgoj4

Quote from: phenigma on November 07, 2010, 06:23:34 PM
If I point it at a specific directory I get this:
dcerouter_1013980:~/linuxmce-autotagger# ./autotagger /home/public/data/videos/test
connection made!
Media Autotagger v1.1
./autotagger: symbol lookup error: ./autotagger: undefined symbol: _ZN9QListData11detach_growEPii


If I run it with no parameters I get the following output, autotagger immediately exits:

dcerouter_1013980:~/linuxmce-autotagger# ./autotagger
connection made!
Media Autotagger v1.1
This is default scan directory: /home/public/data/videos
Got File List for Directory, Going to Work
DB Closed!
dcerouter_1013980:~/linuxmce-autotagger#


Any thoughts?

J.

in my late night brilliance, i failed to test it with all path types. I just noticed it chokes on certain kinds. Trying to enter my own custom path errors out on some (specifically with spaces)...do'h! Do you have any videos in /home/public/data/videos? It may immediatly exit because it doesn't find any there.

-golgoj4
Linuxmce - Where everyone is never wrong, but we are always behind xbmc in the media / ui department.

golgoj4

updated it, fixed the issue. When passing command line arguments, they need to be quoted i.e. "/home/public/data/videos/Hard Drive 1 [47]/tV/BSG"

Sorry for the mistake before
-golgoj4
Linuxmce - Where everyone is never wrong, but we are always behind xbmc in the media / ui department.

phenigma

#8
In /home/public/data/videos is the automatic LinuxMCE symlink to my Windows Share and a directory named 'test' that I've stuffed some movies and tv shows into.

If it gets to the windows share it'll find thousands of files to churn on but I don't think it followed the symlink to the windows share.

I get the exact same results with the updated version.

J.
My setup: [url="http://wiki.linuxmce.org/index.php/User:Phenigma"]http://wiki.linuxmce.org/index.php/User:Phenigma[/url]

golgoj4

Quote from: phenigma on November 07, 2010, 11:09:29 PM
In /home/public/data/videos is the automatic LinuxMCE symlink to my Windows Share and a directory named 'test' that I've stuffed some movies and tv shows into.

If it gets to the windows share it'll find thousands of files to churn on but I don't think it followed the symlink to the windows share.

I get the exact same results with the updated version.

J.

Its set to not follow symlinks because in case of lots of files, it can eat a lot of cpu while it churns through them. I know this is going to sound silly, but did you enclose the directory in quotes? "/home/public/data/videos/test"

Thanks for your time and patience in testing my 1st c++ program.

-golgoj4
Linuxmce - Where everyone is never wrong, but we are always behind xbmc in the media / ui department.

phenigma

Hey golgo,

Yes I did enclose them in quotes.  There appeared to be no difference either way (unless there is a space of course).  I updated to your latest git version with a 'git pull' just a few minutes ago and tried again.

With no arguments it is happy but quits immediately without going into any sub-directories (there are 2, one real and one is an lmce symlink to my NAS share), and it is correct in that there are 0 actual media files in this directory.

dcerouter_1013980:~/linuxmce-autotagger# ./autotagger
connection made!
Media Autotagger v1.1
"/home/public/data/videos"
This is default scan directory: /home/public/data/videos
"/home/public/data/videos"
0
()
Got File List for Directory, Going to Work
DB Closed!


If I add a trailing '/' to any directory location it is 'Not Found in DB', if I do not include the trailing '/' it is happy but doesn't process any files (see above).  This is the case for any directory name I provide it.

dcerouter_1013980:~/linuxmce-autotagger# ./autotagger "/home/public/data/videos/"
connection made!
Media Autotagger v1.1
"/home/public/data/videos/"
User Path Entered: /home/public/data/videos/
/home/public/data/videos/ - Was Not Found in DB


If I point to any folder other than "/home/public/data/videos" it errors with the undefined symbol but has identified that there are 2 files in the test directory.

dcerouter_1013980:~/linuxmce-autotagger# ./autotagger "/home/public/data/videos/test"
connection made!
Media Autotagger v1.1
"/home/public/data/videos/test"
User Path Entered: /home/public/data/videos/test
"/home/public/data/videos/test"
2
./autotagger: symbol lookup error: ./autotagger: undefined symbol: _ZN9QListData11detach_growEPii



dcerouter_1013980:~/linuxmce-autotagger# ./autotagger "/home/public/data/videos/Windows Share-Public [32]/TV/Castle S01Part1"
connection made!
Media Autotagger v1.1
"/home/public/data/videos/Windows Share-Public [32]/TV/Castle S01Part1"
User Path Entered: /home/public/data/videos/Windows Share-Public [32]/TV/Castle S01Part1
"/home/public/data/videos/Windows Share-Public [32]/TV/Castle S01Part1"
10
./autotagger: symbol lookup error: ./autotagger: undefined symbol: _ZN9QListData11detach_growEPii


Anyways, those are my results so far.  Let me know if you want me to try anything specific.

Hmm:

dcerouter_1013980:~/linuxmce-autotagger# ldd autotagger
linux-gate.so.1 =>  (0xb7797000)
        ...

I don't seem to have this lib.  Likely the symbol problem.  I'll have to try to locate it.

J.
My setup: [url="http://wiki.linuxmce.org/index.php/User:Phenigma"]http://wiki.linuxmce.org/index.php/User:Phenigma[/url]

golgoj4

It appears im doing something very wrong. I noticed that in that cases where it locks onto the proper directory its going dead immediately.

Did you build and run it locally with the qt sdk?


-golgoj4
Linuxmce - Where everyone is never wrong, but we are always behind xbmc in the media / ui department.

phenigma

I have been using the binary in git so far.  The library is not an issue, apparently it's a special library file of some sort that doesn't have an actual file.  Hmm, if I get time I'll try to build it.

J.
My setup: [url="http://wiki.linuxmce.org/index.php/User:Phenigma"]http://wiki.linuxmce.org/index.php/User:Phenigma[/url]

golgoj4

Quote from: phenigma on November 08, 2010, 11:42:04 PM
I have been using the binary in git so far.  The library is not an issue, apparently it's a special library file of some sort that doesn't have an actual file.  Hmm, if I get time I'll try to build it.

J.

Nah no need to, i was just wondering because someone else had a completly different error. Ill need to check further to see what im doing wrong.
Linuxmce - Where everyone is never wrong, but we are always behind xbmc in the media / ui department.

golgoj4

if any experienced dev's want to jump in here...im curious as to how i should plan to deploy this? statically linked? dynamic? Im throwing these words around but I barely know what they mean. The one currently compiled is a 'shared' version i believe. Im trying to make a static version to help with testing. Is this a bad idea for any reason.

-golgoj4
Linuxmce - Where everyone is never wrong, but we are always behind xbmc in the media / ui department.