XBMC Community Forum
[RELEASE] iPhoto Plugin Addon for XBMC - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: Add-ons Help and Support (/forumdisplay.php?fid=27)
+---- Forum: Picture Add-ons (/forumdisplay.php?fid=150)
+---- Thread: [RELEASE] iPhoto Plugin Addon for XBMC (/showthread.php?tid=77612)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24


This config not supported? - Toxic Man - 2012-01-21 17:05

Hi all,
New to the forum, not a newbie. Nerd

I have a kickin mac mini Lion server with thunderbolt connected to a Pegasus R4 loaded to 8gb. Tongue

The Pegasus storage array is my media hub and is mounted as a volume on the mac mini and shared via AFP and SMB.

My iPhoto library is on the array. I've configured my ATV2 with XBMC "Eden" and this iPhoto plugin as follows:
Video Folder added that points to AFP share of the iPhoto directory
Plugin configured to reference the iPhoto share, and scan automatically
Plugin appears to begin scan but progress bar does not progress. After a few minutes it disappears and no content is loaded.


I suspected that the xml references don't allow for the plugin to convert appropriately to a fully qualified AFP or SMB path. :confused2:

Here is a snippet of the AlbumData.xml header:
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>Application Version</key>
<string>9.2.1</string>
<key>Archive Path</key>
<string>/Volumes/Media Hub/Pictures/iPhoto Library</string>
<key>ArchiveId</key>
<string>1</string>
<key>List of Albums</key>

and here is a snippet of an asset within the library:

<key>ImagePath</key>
<string>/Volumes/Media Hub/Pictures/iPhoto Library/Masters/2006/Disneyland 2006/061004_0261.jpg</string>
<key>ThumbPath</key>
<string>/Volumes/Media Hub/Pictures/iPhoto Library/Thumbnails/2006/Disneyland 2006/061004_0261.jpg</string>
<key>ImageType</key><string>JPEG</string>
<key>latitude</key><real>33.8125201</real><key>longitude</key><real>-117.9189831</real>
</dict>
<key>4321</key>
<dict>
<key>MediaType</key>
<string>Image</string>
<key>Caption</key>
<string>061004_0262</string>
<key>Comment</key>
<string>Disneyland 2006</string>


Can any of the really smart people on this forum help me get this plugin configured to work with my setup? Big Grin

Much appreciated! Smile


- jingai - 2012-01-23 18:43

Toxic Man Wrote:Plugin appears to begin scan but progress bar does not progress. After a few minutes it disappears and no content is loaded.

I recently set up XBMC on an ATV2 for my father (I don't personally have one) and encountered a similar issue. I'm not sure why it's not keeping the progress dialog up, but it actually *did* scan the library if I selected Update Library again manually after it disappeared. The progress dialog just never showed anything matching reality during the process.

I suggest you try it as I did (hit Update Library after the dialog disappears) and then be patient. Leave it sitting on the add-on screen for a while (5-10 minutes or so to be safe). Then exit the plugin and start it again. In my case, the photos were all there at this point.

I'm not totally sure why XBMC is having issues with the progress dialog. As I said, I don't personally own an ATV2 so it's a bit of trouble for me to debug it as I'd have to borrow my father's and he uses it frequently...

Toxic Man Wrote:I suspected that the xml references don't allow for the plugin to convert appropriately to a fully qualified AFP or SMB path. :confused2:

No, the add-on actually does take that into account. That *shouldn't* be the problem, but as always, if you send me a debug log I can know more.

-j


- Toxic Man - 2012-01-23 21:04

jingai Wrote:I recently set up XBMC on an ATV2 for my father (I don't personally have one) and encountered a similar issue. I'm not sure why it's not keeping the progress dialog up, but it actually *did* scan the library if I selected Update Library again manually after it disappeared. The progress dialog just never showed anything matching reality during the process.

I suggest you try it as I did (hit Update Library after the dialog disappears) and then be patient. Leave it sitting on the add-on screen for a while (5-10 minutes or so to be safe). Then exit the plugin and start it again. In my case, the photos were all there at this point.

I'm not totally sure why XBMC is having issues with the progress dialog. As I said, I don't personally own an ATV2 so it's a bit of trouble for me to debug it as I'd have to borrow my father's and he uses it frequently...

-j

Was very patient and the library never builds. The progress bar goes away, and no amount of refresh, scan, etc ever yields any photos in the library.


As for debug log, pls point me to process for extracting such and I'll do so.

Thanks!


- jingai - 2012-01-24 15:41

Toxic Man Wrote:Was very patient and the library never builds. The progress bar goes away, and no amount of refresh, scan, etc ever yields any photos in the library.

Right after the progress dialog went away, did you immediately select the "<<< Update Library>>>" button again? That's what got it to work on my father's ATV2.

How big is your photo library (number of photos), by the way? And you are using the iPhoto from iLife '11? Or an older one?

I'm not sure why it's doing this on the ATV2 -- it works fine on Windows/MacOS X/Linux. Maybe some XBMC dev here can have a look?

Toxic Man Wrote:As for debug log, pls point me to process for extracting such and I'll do so.

In System>Settings, enable debugging first of all. Then go into my addon and select "<<< Update Library >>>" (if it doesn't trigger on its own).

Then ssh into the box (or scp it) and copy the log file out to another machine from where you can paste it here (using pastebin or whatever you prefer). I don't remember the exact location of the log on the ATV2 but I'm sure a quick search of the forums/wiki will yield that answer.

-j


- Toxic Man - 2012-01-24 16:01

jingai Wrote:Right after the progress dialog went away, did you immediately select the "<<< Update Library>>>" button again? That's what got it to work on my father's ATV2.

Yes, no go

jingai Wrote:How big is your photo library (number of photos), by the way? And you are using the iPhoto from iLife '11? Or an older one?
iLife '11 and about 4500 photos across 35 events

jingai Wrote:I'm not sure why it's doing this on the ATV2 -- it works fine on Windows/MacOS X/Linux. Maybe some XBMC dev here can have a look?
-j

I'm not sure either, but would love some help from an ATV2 owner and dev with experience on this plugin...


- jingai - 2012-01-24 16:12

Toxic Man Wrote:I'm not sure either, but would love some help from an ATV2 owner and dev with experience on this plugin...

I'm the developer of the plugin Smile However, the problem may lie in the iOS port of XBMC, which is why I asked for another dev to have a look.

But I need your debug log (with debugging enabled, as instructed) to help you further..

-j


- Toxic Man - 2012-01-24 20:58

jingai Wrote:I'm the developer of the plugin Smile However, the problem may lie in the iOS port of XBMC, which is why I asked for another dev to have a look.

But I need your debug log (with debugging enabled, as instructed) to help you further..

-j

Super. Will enable the debug tonight and time permitting try to get some logs!


- Toxic Man - 2012-01-25 03:35

Log Created...

http://pastebin.com/va5xNAab

Thanks for taking a look...

AFP credentials removed for obvious reasons...


- jingai - 2012-01-25 03:53

Toxic Man Wrote:Log Created...

http://pastebin.com/va5xNAab

You've got something strange in your AlbumData.xml. Possibly a weird character the parser isn't expecting to see, but could also be that you've got some metadata or something stored on some photos that I wasn't expecting to see.

Would you mind sending me your AlbumData.xml? That would be the easiest way for me to debug this since I can just import it and debug things without a bunch of back-and-forth. Feel free to PM me with the link to get at it if you don't want it to be public.

-j


- Toxic Man - 2012-01-25 05:32

jingai Wrote:You've got something strange in your AlbumData.xml. Possibly a weird character the parser isn't expecting to see, but could also be that you've got some metadata or something stored on some photos that I wasn't expecting to see.

Would you mind sending me your AlbumData.xml? That would be the easiest way for me to debug this since I can just import it and debug things without a bunch of back-and-forth. Feel free to PM me with the link to get at it if you don't want it to be public.

-j

PM Sent.


- jingai - 2012-01-25 16:06

I'm not sure why, but on lines 326629, 326665, and 326701 of your XML file it's got the keys "OriginalType" and "ImageType" set to a value of "^@^@^@^@" (four ctrl-@ characters). This is causing the expat parser to choke because they are invalid characters in XML. When I remove these key/value pairs, the file parses fine.

All three instances of the keys are for movies in a folder entitled "iMovieSpeedConversion". Is that perhaps some 3rd-party conversion utility you're using that is putting junk in the metadata of its output files?

I can likely fix this by handling the exception and ignoring it, but I'd like to figure out first how those characters got there.

-j


- Toxic Man - 2012-01-25 17:15

jingai Wrote:I'm not sure why, but on lines 326629, 326665, and 326701 of your XML file it's got the keys "OriginalType" and "ImageType" set to a value of "^@^@^@^@" (four ctrl-@ characters). This is causing the expat parser to choke because they are invalid characters in XML. When I remove these key/value pairs, the file parses fine.

All three instances of the keys are for movies in a folder entitled "iMovieSpeedConversion". Is that perhaps some 3rd-party conversion utility you're using that is putting junk in the metadata of its output files?

I can likely fix this by handling the exception and ignoring it, but I'd like to figure out first how those characters got there.

-j

Interesting. Not sure why that is in the iPhoto library. This directory does not exist anywhere outside the iPhoto container, therefore I can not ascertain the source of this or why it's metadata is constructed as such.

Following some basic logic on how iPhoto works... When it is directed to scan a pictures folder and import, iPhoto creates its own structure within the container that does not resemble the original location hierarchies. So this directory is/was created by iPhoto.

Secondly, if a user of iPhoto chooses to setup iPhoto with a reference library, one in which the original photos are NOT copied into the iPhoto Container, then the xml file will reference the external directory structure source where the photos actually reside.

So in this case, to see the directory reference contained with the ...\Masters\ folder within the container indicates iPhoto pulled this movies into the library and created the directory structure we see, as well as the metadata. It must not have been able to interpret metadata and reacted as it did.

I would suggest insulating the plugin from this behavior to be safe...

Here is a video spec report of the actual file and its metadata...

***** First Analyzed File Results *****

*** General Parameters ***
- Name: IMG_0915.mov
- Container: MOV - QuickTime
- Creation Date: 2011-07-24 1:09:20 PM
- Size: 24.9 MiB
- Duration: 0:00:06
- Bitrate: 36.4 Mbps
- Encoding Library: Apple QuickTime
- Encoding Application: 4.3.3

*** Video Track Parameters ***
- Format: Apple Intermediate Codec
- Size: 23.8 MiB (96%)
- FourCC: icod
- Track number(s): 0
- Bitrate: Max.: Undefined
Average: 34.9 Mbps
Min.: Undefined
- Frame rate (fps): Max.: 54.545
Average: 29.694
Min.: 10.000
- Bitrate mode: Variable
- Encoding profile: Undefined
- Resolution: Undefined
- Width (Pixel number): 1280
- Height (Pixel number): 720
- Pixel Aspect Ratio: Undefined
- Display aspect ratio: 16:9
- Chroma subsampling format: Undefined
- TV standard: Undefined
- Interlacing: Undefined
- Encoding library: Undefined
- Additional Parameters: Bits/(Pixel*Frame) ratio: 1.275

*** Audio Track(s) Parameters ***
- Format: Uncompressed PCM
- Size: 1.05 MiB (4%)
- FourCC: 0x1
- Number(s) and language(s): 2: English
- Details: 16-bit, little endian, signed linear PCM
- Profile: Undefined
- Bitrate: 1 536 Kbps
- Bitrate mode: Constant
- Resolution: 16 bits
- Rate: 48.0 KHz
- Channel(s): 2 (stereo)
- Position: Undefined
- Encoding Library: Undefined
- Additional Parameters: Not available

*** Miscellaneous ***
- Subtitle(s): No Subtitle
- Metadata: Album: Undefined
Part number: Undefined
Track name: Undefined
Track name number: Undefined
Performer: Undefined
Screenplayer/Writer: Undefined
Genre: Undefined
Encoded date: UTC 2011-10-09 18:33:39
Comment: Undefined
Album artist: Undefined
Grouping: Undefined
Copyright: Undefined


- jingai - 2012-01-25 20:32

Toxic Man Wrote:Interesting. Not sure why that is in the iPhoto library. This directory does not exist anywhere outside the iPhoto container, therefore I can not ascertain the source of this or why it's metadata is constructed as such.

Following some basic logic on how iPhoto works... When it is directed to scan a pictures folder and import, iPhoto creates its own structure within the container that does not resemble the original location hierarchies. So this directory is/was created by iPhoto.

Secondly, if a user of iPhoto chooses to setup iPhoto with a reference library, one in which the original photos are NOT copied into the iPhoto Container, then the xml file will reference the external directory structure source where the photos actually reside.

So in this case, to see the directory reference contained with the ...\Masters\ folder within the container indicates iPhoto pulled this movies into the library and created the directory structure we see, as well as the metadata. It must not have been able to interpret metadata and reacted as it did.

Yes, I understand how it all works, but I've never seen such a sub-directory created so I am not sure how it came to be, however I don't think iPhoto created it; at least, not directly. It does say *iMovie*SpeedConversion, after all.

Just a wild guess based on the directory name alone.. perhaps iMovie adjusted the frame rate? Or maybe you used the Speed effect/tool/thing it has? (Sorry, haven't used iMovie in a while) I could be reading it wrong, but the media info you posted seemed to indicate that the frame rate of the source file was variable.

Do you happen to know what kind of device created the source movie? Is it a file straight out of a camera (no post processing etc) or did you transcode it first? If it was transcoded, what utility did you use?

Toxic Man Wrote:I would suggest insulating the plugin from this behavior to be safe...

It's actually less safe since I'd be ignoring all invalid characters (specifically, I'd be ignoring that exception from the parser), which may cause other unexpected behavior. Honestly, failing as it is currently is The Right Thing to do given that CTRL-@ is definitely not a valid character. I'll obviously work through the issue with you to resolution, but I don't want to jump to straight to kludging the source to work around this.

And just curious: have you tried simply deleting the movies in question from iPhoto and re-adding them?

-j


- Toxic Man - 2012-01-25 20:43

jingai Wrote:Do you happen to know what kind of device created the source movie? Is it a file straight out of a camera (no post processing etc) or did you transcode it first? If it was transcoded, what utility did you use?



It's actually less safe since I'd be ignoring all invalid characters (specifically, I'd be ignoring that exception from the parser), which may cause other unexpected behavior. Honestly, failing as it is currently is The Right Thing to do given that CTRL-@ is definitely not a valid character. I'll obviously work through the issue with you to resolution, but I don't want to jump to straight to kludging the source to work around this.

And just curious: have you tried simply deleting the movies in question from iPhoto and re-adding them?

-j

I have not tried to remove and re-add the file. The file originated from an iPhone 4 camera and was not transcoded. It was added to my library through a direct import into iPhoto, thus no other interpretations on the offending file. I can not explain the folder structure or how/why it resulted... or why iMovie has anything to do with this at all...

I will move the file out of the container and re-import it and see what happens.

Will do so this evening and post results...

Thanks....


- jingai - 2012-01-25 21:00

Toxic Man Wrote:I have not tried to remove and re-add the file. The file originated from an iPhone 4 camera and was not transcoded. It was added to my library through a direct import into iPhoto, thus no other interpretations on the offending file. I can not explain the folder structure or how/why it resulted... or why iMovie has anything to do with this at all...

I can only guess that iPhoto calls functions from a library that is part of iMovie to deal with video files.

I confess I've never used iPhoto for videos at all and honestly never understood why Apple added support for videos in a photo editing application either.. but that's neither here nor there.

What surprises me is that you're the first person to report this. I'm fairly positive my father imports his iPhone videos this way too, yet it works on his installation.

I'll take a short video with my phone and try importing it via iPhoto tonight to see if I get the same results.

Toxic Man Wrote:I will move the file out of the container and re-import it and see what happens.

I'm not so sure that will change anything since it sounds like the original file (before iPhoto transcoded it) is lost for good. You can try it, though.

You might also try importing a new video from your phone and see if you get different results. Just check the XML file it generates after import and look for those junk characters on the entries for the new movie.

If iPhoto does this for every iPhone/iPod video imported, I'll definitely add a workaround in the add-on to deal with it, but I'd like to first verify there isn't some setting (either in iPhoto or on the phone) that might be causing it.

-j