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

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Picture Add-ons (https://forum.kodi.tv/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 25 26 27 28 29


RE: [RELEASE] iPhoto Plugin Addon for XBMC - jingai - 2013-08-19

(2013-08-18, 22:59)whph Wrote: It wasn't clear to me how to write the "Local root path to Masters". I set it to smb://NAS/Public/FOTOS/. The FOTOS folder contains subfolders with the respective pictures. What is meant by "Rewrite root path as"? These two settings do not to seem to be the issue.

The reason this setting exists is because Aperture references the masters using the mount point on the Mac on which you're running Aperture. This is usually something like /Volumes/MyNAS/Photos/. On other systems (possibly the one on which you're running XBMC), this might not be the correct path to the mount point. On a Linux box, for instance, it might be /mnt/MyNAS/Photos/. So you'd use this setting to rewrite "/Volumes/MyNAS/Photos" to "/mnt/MyNAS/Photos" so the addon can find it.

Note that this doesn't touch the paths in your original Aperture/iPhoto library.

(2013-08-18, 22:59)whph Wrote: The main problem is that the add-on is looking for the iPhoto library (which does not even exist) instead of the Aperture library that I have specified. So, the update library command yields the error "iPhoto Library import failed" followed by "iPhoto database reset".

It isn't looking for an iPhoto library -- it just says iPhoto everywhere because that was what I originally supported. Aperture support was added later on.

(2013-08-18, 22:59)whph Wrote: The add-on detects an Aperture library version 3.4.5, but then things go astray.

If it detected that it's an Aperture library, then it's doing the right thing.

Your problem lies here:

Code:
21:58:22 T:4686647296  NOTICE: iphoto.parser: Parse: not well-formed (invalid token): line 17642, column 28

I've seen this before in other libraries. It usually is a hidden character you accidentally typed in an album, photo, face, place, etc name. For instance, another user here had mistakenly added a CTRL-E in the name of one of their persons in Faces. This CTRL-E won't display in Aperture/iPhoto, but it's technically invalid XML so my parser will choke on it. In truth, Aperture/iPhoto should sanitize input better and disallow this kind of thing.. but alas, it doesn't.

Easiest way to fix this is to edit the XML and remove the offending bit. If you are uncomfortable doing this yourself, you can PM me with a link to your AlbumData.xml and I can fix it for you.


RE: [RELEASE] iPhoto Plugin Addon for XBMC - Spinner65 - 2013-08-19

(2013-08-19, 15:54)jingai Wrote:
(2013-08-17, 20:23)Spinner65 Wrote: Is it possible to view Aperture videos with this plugin ?

I'm honestly not sure. Pretty sure it works for iPhoto, so I'd guess it should work for Aperture too. I don't use either program for videos though, so I'm not positive.

Best advice is to simply try it. If it doesn't work, send me your log.

Ok. Wasn't 100% sure if the plugin didn't handle aperture videos or the codec wasn't right.. or other possible issues
.
I have configured the photo settings so that videos show up in the lists, but when I click the video nothing happens.
I have confirmed that the videos will playback when accessed directly as a normal video source.

I'll reinstall iphoto and see if the same videos work with that, then try it again in aperture and post a log

Worst case I'll just not use aperture for holiday videos, but it makes it less hassle IMO to manage everything from my cameras in the same app.


RE: [RELEASE] iPhoto Plugin Addon for XBMC - jingai - 2013-08-19

(2013-08-19, 17:19)Spinner65 Wrote: I have configured the photo settings so that videos show up in the lists, but when I click the video nothing happens.
I have confirmed that the videos will playback when accessed directly as a normal video source.

If it works elsewhere, it really should work from within the plugin I'd think. If you send me the log I'm sure I can figure out why.


RE: [RELEASE] iPhoto Plugin Addon for XBMC - Spinner65 - 2013-08-19

(2013-08-19, 17:21)jingai Wrote:
(2013-08-19, 17:19)Spinner65 Wrote: I have configured the photo settings so that videos show up in the lists, but when I click the video nothing happens.
I have confirmed that the videos will playback when accessed directly as a normal video source.

If it works elsewhere, it really should work from within the plugin I'd think. If you send me the log I'm sure I can figure out why.



Installed iphoto and copied the same video to it's library.
With the addon configured for the iphoto library the video plays back.

With addon configured for the aperture library the video won't play (selected from the "projects" category)
No error message on screen.

Currently running xbmc gotham alpha7 (on atv1 on crystalbuntu (ubuntu precise))

If I remember correctly when I tried it a month ago, with same configuration running XBMC Frodo 12.2, videos from aperture library would not play, but if needed I can roll back to Frodo 12.2 and post a log.




Log is here:
http://pastebin.com/4LFfzSyQ


RE: [RELEASE] iPhoto Plugin Addon for XBMC - jingai - 2013-08-19

(2013-08-19, 18:49)Spinner65 Wrote:
(2013-08-19, 17:21)jingai Wrote:
(2013-08-19, 17:19)Spinner65 Wrote: I have configured the photo settings so that videos show up in the lists, but when I click the video nothing happens.
I have confirmed that the videos will playback when accessed directly as a normal video source.

If it works elsewhere, it really should work from within the plugin I'd think. If you send me the log I'm sure I can figure out why.
Installed iphoto and copied the same video to it's library.
With the addon configured for the iphoto library the video plays back.

With addon configured for the aperture library the video won't play (selected from the "projects" category)
No error message on screen.

Currently running xbmc gotham alpha7 (on atv1 on crystalbuntu (ubuntu precise))

If I remember correctly when I tried it a month ago, with same configuration running XBMC Frodo 12.2, videos from aperture library would not play, but if needed I can roll back to Frodo 12.2 and post a log.

Is iPhoto converting the video on import? The errors in your log indicate that XBMC cannot detect the format of the video:

Code:
11:29:08 T:2835344192   DEBUG: Open - probing detected format [mov,mp4,m4a,3gp,3g2,mj2]
11:29:08 T:2835344192   DEBUG: Open - avformat_find_stream_info starting
11:29:08 T:2835344192   ERROR: Seek - Error( 447441)
11:29:08 T:2835344192   ERROR: Seek - Error( 447729)
11:29:08 T:2835344192 WARNING: could not find codec parameters for afp://atv:[email protected]/Pictures/Aperture Library.aplibrary//Previews/2013/08/18/20130818-125448/mO24mqamQhmxkZLTRadeBg/P1040332-converted.m4v

What happens if you try to play the video using that exact path in XBMC? I am suspecting that the video file that works for you isn't that exact file above, but is in another location in a different (supported) container.


RE: [RELEASE] iPhoto Plugin Addon for XBMC - jingai - 2013-08-19

(2013-08-11, 12:33)ricki238 Wrote: after Many try i can see album, faces, places menu but the photo don't appear. The files info reveal the photo is 0mb. Also, nothing appears when you click on event. And when i try to refresh the library, the process work normally until approximately 60% and run fast to 100% to finish by "error addon.py".

EDIT: scratch what I originally said. Editing post to give you correct answer.

Something is wrong here:

Code:
16:05:56 T:2953850880    INFO: FileSmb->Open: Unable to open file : 'smb://..........:................@DiskStation/photo/ApertureData.xml'
                                            unix_err:'2' error : 'No such file or directory'

But it does continue on anyway.. somehow.. that's odd.

Anyway, the problem importing appears to be due to unicode in the French translated string. I have a fix for this that I'll release tonight. I'm not certain it will fix the problem of not being able to see the photos, though. If you want me to confirm that I will need a copy of your ApertureData.xml file.


RE: [RELEASE] iPhoto Plugin Addon for XBMC - Spinner65 - 2013-08-19

(2013-08-19, 18:59)jingai Wrote: Is iPhoto converting the video on import? The errors in your log indicate that XBMC cannot detect the format of the video:

Code:
11:29:08 T:2835344192   DEBUG: Open - probing detected format [mov,mp4,m4a,3gp,3g2,mj2]
11:29:08 T:2835344192   DEBUG: Open - avformat_find_stream_info starting
11:29:08 T:2835344192   ERROR: Seek - Error( 447441)
11:29:08 T:2835344192   ERROR: Seek - Error( 447729)
11:29:08 T:2835344192 WARNING: could not find codec parameters for afp://atv:[email protected]/Pictures/Aperture Library.aplibrary//Previews/2013/08/18/20130818-125448/mO24mqamQhmxkZLTRadeBg/P1040332-converted.m4v

What happens if you try to play the video using that exact path in XBMC? I am suspecting that the video file that works for you isn't that exact file above, but is in another location in a different (supported) container.

I didn't notice iphoto converting the file (it imported quickly) and xbmc can play the original file directly in a folder.
(the ..convertedm4v.. in the name is something I did, to differentiate between the original .mov from the camera and the handbrake converted one)

Code:
Pictures/Aperture Library.aplibrary//Previews/2013/08/18/20130818-125448/mO24mqamQhmxkZLTRadeBg/P1040332-converted.m4v
The file on that path is only 37k. and it's not a video file. I opened it with a text editor, and while it's a binary file, the readable sections make it look like it's some kind of alias type file (not an actual OS type alias but something that aperture creates)that references the actual file which is located at:
Code:
192.168.54.102/Pictures/Aperture Library.aplibrary/Masters/2013/08/18/20130818-125448/P1040332-converted.m4v

Note: I have aperture managing the files, not configured to use referenced files.


----iphoto test----

I reconfigured the addon to use the iphoto library with the same video imported into it.
Video played back... (after 1 aborted attempt which I assume was because this was immediately after rebooting and xbmc wasn't fully "up" yet)

Paste for same video in iphoto is here.
http://pastebin.com/sWz0dSn1


RE: [RELEASE] iPhoto Plugin Addon for XBMC - jingai - 2013-08-19

(2013-08-19, 19:56)Spinner65 Wrote:
Code:
Pictures/Aperture Library.aplibrary//Previews/2013/08/18/20130818-125448/mO24mqamQhmxkZLTRadeBg/P1040332-converted.m4v
The file on that path is only 37k. and it's not a video file. I opened it with a text editor, and while it's a binary file, the readable sections look like it's some kind of alias type file that references the actual file which is located at:
Code:
192.168.54.102/Pictures/Aperture Library.aplibrary/Masters/2013/08/18/20130818-125448/P1040332-converted.m4v

Well that would be the problem... Hmm, I'm really not sure how to fix that.

Can you paste the relevant section for that file from your ApertureData.xml? I need to see if it references the correct file at all (instead of just the alias). If it only references the alias, I don't know how to make that work portably (since I suspect it's an OSX alias).


RE: [RELEASE] iPhoto Plugin Addon for XBMC - Spinner65 - 2013-08-19

(2013-08-19, 20:00)jingai Wrote:
(2013-08-19, 19:56)Spinner65 Wrote:
Code:
Pictures/Aperture Library.aplibrary//Previews/2013/08/18/20130818-125448/mO24mqamQhmxkZLTRadeBg/P1040332-converted.m4v
The file on that path is only 37k. and it's not a video file. I opened it with a text editor, and while it's a binary file, the readable sections look like it's some kind of alias type file that references the actual file which is located at:
Code:
Pictures/Aperture Library.aplibrary/Masters/2013/08/18/20130818-125448/P1040332-converted.m4v

Well that would be the problem... Hmm, I'm really not sure how to fix that.

Can you paste the relevant section for that file from your ApertureData.xml? I need to see if it references the correct file at all (instead of just the alias). If it only references the alias, I don't know how to make that work portably (since I suspect it's an OSX alias).


Looks like videos use a slighty different format in the XML file, and unlike photos, contain an "Original Path" tag

Aperture has the ability to support versions.
This snip of the XML file shows that the XML "ImagePath" doesn't point to the actual master file, but to a lower resolution preview.
Of course those image preview files are higher enough resolution for XBMC use on a TV.
No idea how aperture knows where the master file is, other than maybe using consistent path naming ?

Is it possible to have the addon use some logic for aperture libraries, like:
"OriginalPath" if the "MediaType" = "Movie"
"ImagePath' if "MediaType" = "Image"

XML snippet here:
http://pastebin.com/Gf5gWeNY


RE: [RELEASE] iPhoto Plugin Addon for XBMC - jingai - 2013-08-19

@Spinner65

Pretty sure I can get this to work. I'll play with it some tonight. Next release will likely be Wednesday.


RE: [RELEASE] iPhoto Plugin Addon for XBMC - Spinner65 - 2013-08-19

(2013-08-19, 20:00)jingai Wrote: (since I suspect it's an OSX alias).


Just for interest...
Looking deeper at these preview Video files used by Aperture:

Finder, VLC, and Quicktime see it as an actual video file. (Mp4)
The file appears to be some type of empty video file with extended attributes
(In terminal it shows @ which evidently means the file has extended attributes)

Finder and Quicktime appear to use it like an alias, whereas vlc just simply loads the file without either playback or error.

(2013-08-19, 20:54)jingai Wrote: @Spinner65

Pretty sure I can get this to work. I'll play with it some tonight. Next release will likely be Wednesday.

Awesome. No worries. Glad this may work and end up helping others.

Your iPhoto addon is so much "better" than having to copy photos and videos into another folder structure and adding that as a source in XBMC.

Thanks for the great support.

If you need a full XML file just let me know.


RE: [RELEASE] iPhoto Plugin Addon for XBMC - ricki238 - 2013-08-20

Jingai, i don't have aperture but a iphoto library. I don't understand why an aperture library appears here ?

Do you want i send you my iphoto library ?


[RELEASE] iPhoto Plugin Addon for XBMC - jingai - 2013-08-20

(2013-08-20, 13:27)ricki238 Wrote: Jingai, i don't have aperture but a iphoto library. I don't understand why an aperture library appears here ?

Do you want i send you my iphoto library ?

Sorry, yes, I meant AlbumData.xml

Was responding to too many people at once Tongue


RE: [RELEASE] iPhoto Plugin Addon for XBMC - jingai - 2013-08-21

@ricki238,

I got your AlbumData.xml, which appears to import fine here. Since I don't have your actual images, it's hard to tell if they would load properly, but I did copy in a couple of dummy images and they load OK.

Your issue might have been with the error you're getting on import, which I've fixed. I really don't think it should be, since the import did actually complete, but we'll see. If you still can't view your photos after you try version 2.1.7 of the plugin, let me know. I hope to release it tonight.


RE: [RELEASE] iPhoto Plugin Addon for XBMC - ricki238 - 2013-08-21

Ok Jingai if i understand your note, i've nothing to do with my files but just wait for your update that's right ?