Lightroom Export Plugin: PhotoStation Upload

Questions about the Synology Photo Station can be placed here.
Forum rules
We've moved! Head over to Synology Community (community.synology.com) to meet up with our team and other Synology enthusiasts!
flingo
Sharp
Sharp
Posts: 176
Joined: Sun Feb 01, 2015 6:32 pm
Location: Berlin

Lightroom Export Plugin: PhotoStation Upload

Unread post by flingo » Sun Feb 01, 2015 7:24 pm

Hi Lightroomers,
after extensive recherche I came to the conclusion that there is no such thing as a PhotoStation Upload export plugin for Lr available.

"TreeMirror Export" in conjunction with "Synology PhotoStation Uploader" comes close to what I was looking for, but still there is too much manual interaction required to lift the photos from Lr to the PhotoStation. In fact, if you change or add only one photo, you will need to upload the whole directory to PhotoStation again...

So, I decided to do _some_ investigations and integrated the results of that into a Lr Export Service Provider plugin. You'll find the plugin as free software on GitHub:

https://github.com/flingo64/PhotoStatio ... -Lr-Plugin

What's it good for?
PhotoStation Upload is a Lightroom ExportServiceProvider plugin. As such, it adds a new "Export To" target called "PhotoStation Upload" to the "Export" dialog. It enables the export of pictures and videos from Lightroom directly to a Synology PhotoStation. It will not only upload the selected photos/videos but also create and upload all required thumbnails and accompanying additional video files.
Please, be aware that this plugin is an Exporter, not a Publisher! I.e. tags/comments on photos that were made on the PhotoStation will be overwritten by the next export of the photos from Lr. So, if you maintain and add/modify/delete comments, tags and other metadata on the PhotoStation, this is not the right tool for you! But if you maintain all your comments, tags and metadata in Lr and simply want to output all this to the PhotoStation, then this tool will simplify and speed up the export task quite a bit.

The plugin supports both Standard and Personal PhotoStation and it'll allow you to either export all selected files to a speficied album (flat) or to mirror the local directory structure of the exported photos under the specified target album.

Note: "Synology PhotoStation Uploader" has to be installed on you Lr machine, since the plugin uses some of the converters that come with that application.

I tested the plugin under Win7/Lr5.7 und Mac/Lr5.6. On the Mac I couldn't get the video export to run. So, if anyone with more Mac knowledge would like to investigate this issue, I would be happy to help.

You'll find more info on GitHub in the Readme.

So, have fun with it and leave me a note if you find this tool helpful.

Regards, Martin

local.bin
Student
Student
Posts: 73
Joined: Tue Aug 12, 2008 11:14 pm

Re: Lightroom Export Plugin: PhotoStation Upload

Unread post by local.bin » Tue Feb 03, 2015 3:54 pm

Nice work Martin and thanks :)

I am still struggling to get my workflow sorted with my diskstation and this give me another option at least.

Thanks

horatio
Novice
Novice
Posts: 42
Joined: Thu Jul 26, 2012 10:22 am

Re: Lightroom Export Plugin: PhotoStation Upload

Unread post by horatio » Fri Feb 06, 2015 12:05 pm

This seems a very useful LR plugin. I'll definitely try it.

Can you explain me what's the difference between the Publish and Export functionality in LR?

flingo
Sharp
Sharp
Posts: 176
Joined: Sun Feb 01, 2015 6:32 pm
Location: Berlin

Re: Lightroom Export Plugin: PhotoStation Upload

Unread post by flingo » Fri Feb 06, 2015 5:18 pm

Publish vs. Export Service:

The Lr concept of an Export Service is a simple one-way output process. This is what PhotoStation Upload is doing.

The Lr concept of a Publish Service is a bidirectional link between Lr and an external storage (e.g. PhotoStation): a two-way synchronization. A Publish Service has to keep track of changes to files that were added/deleted/modified on the external storage (not through Lr), so that whenever you do a "Publish" not only added/modified/deleted files from Lr will be propagated to the external storage but also all files that were added/deleted/modified in the meantime in the external storage (not through Lr) will be propagated to Lr.

Sounds simple? In theory: yes!

Regards, Martin

flingo
Sharp
Sharp
Posts: 176
Joined: Sun Feb 01, 2015 6:32 pm
Location: Berlin

Re: Lightroom Export Plugin: PhotoStation Upload

Unread post by flingo » Fri Mar 13, 2015 12:24 am

Hi folks,
just to let you know: starting with V 2.6.4 there are no more issues with video uploads on MacOS. In fact, I added some cool video upload features: hard rotation and such. Current version is 2.8.1.

I'm still waiting for the guy who will turn this plugin into a Publishing Service... :wink:

Cheers, Martin

SamD
Trainee
Trainee
Posts: 13
Joined: Mon Mar 09, 2015 10:01 pm

Re: Lightroom Export Plugin: PhotoStation Upload

Unread post by SamD » Wed Mar 25, 2015 3:59 pm

+1
Thanks man! Great work.

flingo
Sharp
Sharp
Posts: 176
Joined: Sun Feb 01, 2015 6:32 pm
Location: Berlin

Re: Lightroom Export and Publish(!!) Plugin: PhotoStation Up

Unread post by flingo » Tue Jun 16, 2015 10:53 pm

Hi folks,
just to let you know that I just released version 3.0 of the plugin.

https://github.com/flingo64/PhotoStatio ... -Lr-Plugin

Version 3.0 adds Publish support to the plugin, so that Lightroom can take care of the status of the photos you uploaded to the PhotoStation. The plugin is 100% compatible to the former Export plugin and still supports the pure Export mode as well.

It also speeds up the transformation of a set of already exported photos into a "Published Collection" or "Published Smart Collection" by finding photos that are "already there" in the PhotoStation, so that you don't need to re-publish again all the photos you already exported before.

Also, it can identify photos that were moved to a different directory locally and thus have to be re-published when using the "tree-mirror" method. This is - believe it or not - not supported by Lightroom at all.

Actually, I'm a little bit proud of it and I'm happy to share it with the community. If you find the plugin helpful (or even find a - no,no,no - bug), don't hesitate to give me a short feedback.

Ciao, Martin

Parsifal25
Trainee
Trainee
Posts: 14
Joined: Thu Jan 17, 2013 6:19 pm

Re: Lightroom Export Plugin: PhotoStation Upload

Unread post by Parsifal25 » Sun Jun 21, 2015 12:25 pm

Looks good, but I can't get it to work :(
I installed the plugin and it works in Lightroom (CC 2015), but when I am trying to either export or publish I keep on getting errors.

I am getting the following:

13:30:33: processRenderedPhotos starting
13:30:33: initializeEnv starting:
13:30:34: Login to Standard PhotoStation(http://vagnpetersen.synology.me) OK
13:30:34: processRenderedPhotos(mode: Export).
13:30:34: --------------------------------------------------------------------
13:30:38: Create dir - parent: newDir: Vagn_22 newPath: /Vagn_22
13:30:40: convertPicConcurrent: C:\Users\Vagn Petersen\AppData\Local\Temp\84B0AF42-2D22-49F6-8FFB-CB9CAC846CE7\DSC_2078.jpg failed!
13:30:40: Upload of "DSC_2078.jpg" to "http://vagnpetersen.synology.me-->Vagn_22" failed!!!
13:30:43: convertPicConcurrent: C:\Users\Vagn Petersen\AppData\Local\Temp\84B0AF42-2D22-49F6-8FFB-CB9CAC846CE7\DSC_2079.jpg failed!
13:30:43: Upload of "DSC_2079.jpg" to "http://vagnpetersen.synology.me-->Vagn_22" failed!!!
13:30:45: convertPicConcurrent: C:\Users\Vagn Petersen\AppData\Local\Temp\84B0AF42-2D22-49F6-8FFB-CB9CAC846CE7\DSC_2080.jpg failed!
13:30:45: Upload of "DSC_2080.jpg" to "http://vagnpetersen.synology.me-->Vagn_22" failed!!!
13:30:45: --------------------------------------------------------------------


I have the Synology Uploader installed and I can convert and upload without any problems...

Please help...

Vagn

flingo
Sharp
Sharp
Posts: 176
Joined: Sun Feb 01, 2015 6:32 pm
Location: Berlin

Re: Lightroom Export Plugin: PhotoStation Upload

Unread post by flingo » Sun Jun 21, 2015 8:53 pm

Hi Vagn,
could you please change the Loglevel to "Debug", re-test with 1 picture and send the output again.
Also, please let me know the OS.

Thanks, Martin

Parsifal25
Trainee
Trainee
Posts: 14
Joined: Thu Jan 17, 2013 6:19 pm

Re: Lightroom Export Plugin: PhotoStation Upload

Unread post by Parsifal25 » Mon Jun 22, 2015 3:22 pm

Hi Martin,

I changed to "debug" mode, but the output is the same:

16:17:48: processRenderedPhotos starting
16:17:48: initializeEnv starting:
16:17:48: Login to Standard PhotoStation(http://vagnpetersen.synology.me) OK
16:17:48: processRenderedPhotos(mode: Export).
16:17:48: --------------------------------------------------------------------
16:17:51: Create dir - parent: newDir: Vagn_22 newPath: /Vagn_22
16:17:53: convertPicConcurrent: C:\Users\Vagn Petersen\AppData\Local\Temp\0B9AB7FA-2DA6-455F-B1F1-B63903D8C8D2\DSC_2080.jpg failed!
16:17:53: Upload of "DSC_2080.jpg" to "http://vagnpetersen.synology.me-->Vagn_22" failed!!!
16:17:53: --------------------------------------------------------------------


My OS is Windows 8.1 (64 bits)

Best regards,

Vagn

flingo
Sharp
Sharp
Posts: 176
Joined: Sun Feb 01, 2015 6:32 pm
Location: Berlin

Re: Lightroom Export Plugin: PhotoStation Upload

Unread post by flingo » Tue Jun 23, 2015 12:18 am

Hi Vagn,
unfortunately, there was a bug in the code that prevented the change of the loglevel in certain situations. I fixed it in version 3.0.4.

Anyway, until now I have no idea what is happening in your case. The only thing I can tell for sure is that there is an issue with calling the convert program. I hope to see clearer with debug output.

Ciao, Martin

Parsifal25
Trainee
Trainee
Posts: 14
Joined: Thu Jan 17, 2013 6:19 pm

Re: Lightroom Export Plugin: PhotoStation Upload

Unread post by Parsifal25 » Tue Jun 23, 2015 8:47 pm

Hi Martin,

Here is a new dump with debug activated...

21:41:45: updateExportSettings: done
21:41:45: CheckForUpdate starting...
21:41:45: sendCheckUpdate: LrHttp.post(http://messmer-online.de/LrPSUploadChec ... d46be9c536)
21:41:45: got back: uid= <Nil>, res= OK, sec= 4f01778b703edb489edec7e6bdcda59c, checksum(local)= 4f01778b703edb489edec7e6bdcda59c, latestVersion= <Nil>, downloadUrl= <Nil>
21:41:45: done!
21:41:46: processRenderedPhotos starting
21:41:46: initializeEnv starting:
21:41:46: PSUploadAPI.initialize(serverUrl=http://vagnpetersen.synology.me, Standard PS)
21:41:46: PSFileStationAPI.initialize(serverUrl=http://vagnpetersen.synology.me:5000)
21:41:46: PSConvert.initialize: PSUploaderPath= C:\Program Files (x86)\Synology\Photo Station Uploader
21:41:46: PSConvert.initialize:conv: C:\Program Files (x86)\Synology\Photo Station Uploader\ImageMagick\convert.exe
ffmpeg: C:\Program Files (x86)\Synology\Photo Station Uploader\ffmpeg\ffmpeg.exe
qt-faststart: C:\Program Files (x86)\Synology\Photo Station Uploader\ffmpeg\qt-faststart.exe
21:41:46: login: LrHttp.post(http://vagnpetersen.synology.me/photo/i ... upload.php,...)
21:41:47: Got Body:
{"success":true,"run_photo":true,"has_photo_root_path":true}
21:41:47: Login to Standard PhotoStation(http://vagnpetersen.synology.me) OK
21:41:47: processRenderedPhotos(mode: Export).
21:41:47: --------------------------------------------------------------------
21:41:51:
Next photo: C:\Users\Vagn Petersen\AppData\Local\Temp\0A0FFEE2-BB2F-4120-AA5A-82367313E0D6\DSC_2080.jpg
21:41:51: sanitized dstRoot: Vagn_22
21:41:51: createTree: Src Path: ./Vagn_22 from: . to:
21:41:51: createTree: dstDir is: /Vagn_22
21:41:51: Create dir - parent: newDir: Vagn_22 newPath: /Vagn_22
21:41:51: createFolder: LrHttp.post(http://vagnpetersen.synology.me/photo/i ... upload.php,...)
21:41:51: Got Body:
{"success":true,"err_msg":"","duplicate_folder":true}
21:41:51: dateTimeOriginal: 2015-06-13 10:26:35
21:41:51: ""C:\Program Files (x86)\Synology\Photo Station Uploader\ImageMagick\convert.exe" "C:\Users\Vagn Petersen\AppData\Local\Temp\0A0FFEE2-BB2F-4120-AA5A-82367313E0D6\DSC_2080.jpg" ( -clone 0 -define jpeg:size=1280x1280^>^^ -thumbnail 1280x1280^>^^ -strip -flatten -quality 80 -auto-orient -colorspace RGB -unsharp 0.5x0.5+1.25+0.0 -colorspace sRGB -write "C:\Users\Vagn-Petersen\AppData\Local\Temp\DSC_2080_XL.jpg" ) -delete 0 ( +clone -define jpeg:size=640x640^>^^ -thumbnail 640x640^>^^ -strip -flatten -quality 80 -auto-orient -colorspace RGB -unsharp 0.5x0.5+1.25+0.0 -colorspace sRGB -write "C:\Users\Vagn-Petersen\AppData\Local\Temp\DSC_2080_B.jpg" +delete ) ( +clone -define jpeg:size=320x320^>^^ -thumbnail 320x320^>^^ -strip -flatten -quality 80 -auto-orient -colorspace RGB -unsharp 0.5x0.5+1.25+0.0 -colorspace sRGB -write "C:\Users\Vagn-Petersen\AppData\Local\Temp\DSC_2080_M.jpg" +delete ) -define jpeg:size=120x120^>^^ -thumbnail 120x120^>^^ -strip -flatten -quality 80 -auto-orient -colorspace RGB -unsharp 0.5x0.5+1.25+0.0 -colorspace sRGB "C:\Users\Vagn-Petersen\AppData\Local\Temp\DSC_2080_S.jpg""
21:41:53: ... failed!
21:41:53: convertPicConcurrent: C:\Users\Vagn Petersen\AppData\Local\Temp\0A0FFEE2-BB2F-4120-AA5A-82367313E0D6\DSC_2080.jpg failed!
21:41:53: Upload of "DSC_2080.jpg" to "http://vagnpetersen.synology.me-->Vagn_22" failed!!!
21:41:53: --------------------------------------------------------------------
21:41:53: closeSession(Export):...
21:41:53: closeSession(Export) done.


To me it looks as if the "temp"-folder can not be created???

Best regards,

Vagn

flingo
Sharp
Sharp
Posts: 176
Joined: Sun Feb 01, 2015 6:32 pm
Location: Berlin

Re: Lightroom Export Plugin: PhotoStation Upload

Unread post by flingo » Wed Jun 24, 2015 12:30 am

Hi Vagn,
you're right, the Tempdir is the problem! Or to be more accurate: the way I build it.
Look at the command execution
""C:\Program Files (x86)\Synology\Photo Station Uploader\ImageMagick\convert.exe" "C:\Users\Vagn Petersen\AppData\Local\Temp\0A0FFEE2-BB2F-4120-AA5A-82367313E0D6\DSC_2080.jpg" ( -clone 0 -define jpeg:size=1280x1280^>^^ -thumbnail 1280x1280^>^^ -strip -flatten -quality 80 -auto-orient -colorspace RGB -unsharp 0.5x0.5+1.25+0.0 -colorspace sRGB -write "C:\Users\Vagn-Petersen\AppData\Local\Temp\DSC_2080_XL.jpg" ) -delete 0 ( +clone -define jpeg:size=640x640^>^^ -thumbnail 640x640^>^^ -strip -flatten -quality 80 -auto-orient -colorspace RGB -unsharp 0.5x0.5+1.25+0.0 -colorspace sRGB -write "C:\Users\Vagn-Petersen\AppData\Local\Temp\DSC_2080_B.jpg" +delete ) ( +clone -define jpeg:size=320x320^>^^ -thumbnail 320x320^>^^ -strip -flatten -quality 80 -auto-orient -colorspace RGB -unsharp 0.5x0.5+1.25+0.0 -colorspace sRGB -write "C:\Users\Vagn-Petersen\AppData\Local\Temp\DSC_2080_M.jpg" +delete ) -define jpeg:size=120x120^>^^ -thumbnail 120x120^>^^ -strip -flatten -quality 80 -auto-orient -colorspace RGB -unsharp 0.5x0.5+1.25+0.0 -colorspace sRGB "C:\Users\Vagn-Petersen\AppData\Local\Temp\DSC_2080_S.jpg""
As you can see, the target dir:
"C:\Users\Vagn-Petersen\AppData\Local\Temp\"
doesn't match the source dir:
"C:\Users\Vagn Petersen\AppData\Local\Temp\"

There was still a blank substitution in the code to prevent some nasty side effects when working with pathnames having blanks in it (as your username has).
I removed this code now as a quick hack, but this requires definitely a more careful consideration, but not today.

Please, try the latest (untagged) version and let me know if it works (I'm pretty sure, though).

Ciao, Martin

Parsifal25
Trainee
Trainee
Posts: 14
Joined: Thu Jan 17, 2013 6:19 pm

Re: Lightroom Export Plugin: PhotoStation Upload

Unread post by Parsifal25 » Wed Jun 24, 2015 6:22 pm

Hi Martin,

YES!! It works. Thank you for the good work and using time for this :)

Vagn

flingo
Sharp
Sharp
Posts: 176
Joined: Sun Feb 01, 2015 6:32 pm
Location: Berlin

Re: Lightroom Export Plugin: PhotoStation Upload

Unread post by flingo » Wed Jun 24, 2015 9:30 pm

Thanks for the feedback.

I just published a more robust version of the fix (will also allow stupid characters such as '(' and ')' in filenames but probably not in the directory name) as version 3.0.5

Martin

Locked

Return to “Photo Station”