Author Topic: Lightroom plugin cr2hdr v3.0 DEV (WIP)  (Read 717018 times)

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7655
Re: Lightroom plugin cr2hdr v3.0 BETA1
« Reply #475 on: September 23, 2014, 04:56:07 PM »
Monkey wrench  :D :D

kichetof

  • Contributor
  • Senior
  • *****
  • Posts: 469
  • Take a beer and enjoy it!
Re: Lightroom plugin cr2hdr v3.0 BETA1
« Reply #476 on: September 23, 2014, 05:17:38 PM »
#define ALLOW_WRITEABLE_DNGS
at the top of the file is enough to make it "true" because we don't do:
#if ALLOW_WRITEABLE_DNGS
instead, we do:
#ifdef ALLOW_WRITEABLE_DNGS

Eyes stacked in the early morning  ;) no attention to def...

Okay, now I understand well what do you do with fuse!
DNG files aren't writeable.

Exiftool write into the file, so with no write access, exiftool can't do the job! I hope you will find an issue to this "bug" ;)

Thanks for your great work!

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Lightroom plugin cr2hdr v3.0 BETA1
« Reply #477 on: September 23, 2014, 05:30:31 PM »
What exactly are you trying to use exiftool to write into the file? Since I generate the DNG tags, I can make them whatever they need to be, so just let me know what that is. It is impossible to make the virtual DNGs truly writable.

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Lightroom plugin cr2hdr v3.0 BETA1
« Reply #478 on: September 23, 2014, 10:46:46 PM »
So looking at the cr2hdr code, all the --same-levels option does is set all the white levels to the same value. So, this is not needed, b/c all the virtual DNGs from MLVFS will already have the same white levels (the white level for the entire DNG sequence comes from the RAWI block, of which there is only one per MLV file).

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7655
Re: Lightroom plugin cr2hdr v3.0 BETA1
« Reply #479 on: September 23, 2014, 11:02:54 PM »
The conversion from cr2hdr changes levels so they differ from one dng to the next. Not linear. Exiftool can fix this quite fast in post but since the folders contain a exif temp file for each file one have to delete all of those after conversion which is tedious with many folders.

kichetof

  • Contributor
  • Senior
  • *****
  • Posts: 469
  • Take a beer and enjoy it!
Re: Lightroom plugin cr2hdr v3.0 BETA1
« Reply #480 on: September 24, 2014, 09:37:59 AM »
Hi dmilligan,

cr2hdr loop into all converted files to apply a new white level (cr2hdr source for --same-levels)

Exiftool function to change white level set_white_level.

This value is applied after cr2hdr conversion, maybe you can set a tags editable for this setting ?

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Lightroom plugin cr2hdr v3.0 BETA1
« Reply #481 on: September 24, 2014, 01:15:31 PM »
Ah, I see, it changes the converted files, well that seems kind of strange to me, why doesn't it just write the same white level when it writes the DNGs in the first place, rather than using exiftool afterwards?

The problem must be something strange that exiftool is trying to do when writing the file, some file operation that I haven't implemented in MLVFS perhaps. It looks like it tries to make some sort of temp file copy to write the changes into and then overwrites the original with that, instead of writing directly into the original file (this also will cause a large performance penalty too, since the whole file has to be copied). I'll try to investigate to see what exactly exiftool is trying to do.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Lightroom plugin cr2hdr v3.0 BETA1
« Reply #482 on: September 24, 2014, 01:34:28 PM »
The white level is decided after processing all frames (if the first frame has no clipped stuff in it, the white level can't be detected in advance). For video, there are several optimizations that can be made, like relying on metadata, or scanning a few key frames in advance to detect exposure and white level, and use those for the entire video file, or even implementing the deflicker algorithm in cr2hdr.

Exiftool creates a temporary file, then renames it; not sure how to avoid this behavior. If this is too slow, exiv2 is much faster (but the syntax is different).

jpaana

  • New to the forum
  • *
  • Posts: 28
Re: Lightroom plugin cr2hdr v3.0 BETA1
« Reply #483 on: September 25, 2014, 11:23:47 PM »
Exiftool creates a temporary file, then renames it; not sure how to avoid this behavior. If this is too slow, exiv2 is much faster (but the syntax is different).

Also with -overwrite_original_in_place option?

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Lightroom plugin cr2hdr v3.0 BETA1
« Reply #484 on: September 25, 2014, 11:30:24 PM »
Yes (see the exiftool documentation or try the time command).

senzazn12

  • Freshman
  • **
  • Posts: 83
Re: Lightroom plugin cr2hdr v3.0 BETA1
« Reply #485 on: September 27, 2014, 08:31:37 PM »
I'm getting an error when exporting my Dual ISO DNG sequence in LR 5.6 when using the plugin Beta 3.0 V2. It says no files converted but not errors. However, when just exporting a single Dual ISO DNG in LR it converts. I'm using Win 7.

Kapuhy

  • New to the forum
  • *
  • Posts: 9
Re: Lightroom plugin cr2hdr v3.0 BETA1
« Reply #486 on: September 27, 2014, 09:14:34 PM »
I started to have an issue with v3.0 BETA2 - it says task completed but no export is being done. Removing /adding back the plugin does not work. However the version 2.1 continues to work when I install it. I also noticed that removing the plugin does not clear it completely - the data is still in the Lightroom 5 Preferences.agprefs file (I suspect this is where the problem is otherwise the re-install should fix it)...

kichetof

  • Contributor
  • Senior
  • *****
  • Posts: 469
  • Take a beer and enjoy it!
Re: Lightroom plugin cr2hdr v3.0 BETA1
« Reply #487 on: September 27, 2014, 10:58:33 PM »
@Kapuhy & senzazn12
It seems that you have the same bug.
I need more informations because all works fine with me.

Could you post your settings for the plugin and an exemple of your path with filename ?
Where does come your DNG files ?

Could you check the log from Console (mac) or a log viewer (win) and post the line that start with command:

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3411
  • 5D3 | M1 | 7D | 70D | SL1 | M2 | 50D
Re: Lightroom plugin cr2hdr v3.0 BETA2
« Reply #488 on: September 28, 2014, 08:20:38 AM »
I believe that I am also getting the same bug and here are the post of the settings in LR5 with the latest cr2hdr 20-bit Beta 3



5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

kichetof

  • Contributor
  • Senior
  • *****
  • Posts: 469
  • Take a beer and enjoy it!
Re: Lightroom plugin cr2hdr v3.0 BETA2
« Reply #489 on: September 28, 2014, 09:37:02 AM »
Ok guys,

I don't understand your problem, it works well with same settings from DeafEyeJedi.

@DeafEyeJedi could you try to launch export from folder M20-1628.MLV and not from Previous import ?

Could you post screenshot from summary dialog?
Please, tell me how do you obtain your DNG files ?
Could you check keywords? (if you have no Dual-ISO, plugin skip)
If file isn't available, plugin skip too

Could you share 2-3 dng files from your sequence ?
or
Could you share a MLV that have problem (I think you use MLVFS)

I'm not a filmmaker, so I didn't test the plugin with it, I need to test it!

For Mac Users, could you paste me the log from Console.app (located into /Applications/Utilities, search Lightroom) and I need for the moment only line start with command. Windows users are welcome too :)

like this:
Code: [Select]
28.09.14 09:28:32.236 Adobe Photoshop Lightroom 5[44598]: MLDualISO DEBUG command : exec "/Users/tof/Documents/MagicLantern/LR plugin/cr2hdr.lrdevplugin/bin/cr2hdr20bit" --amaze-edge --cs2x2 --really-bad-pix --fullres --alias-map --stripe-fix --wb=graymax --same-levels "/Users/tof/Pictures/Photographies/ML Dev/Dual ISO/_MG_12826.dng" "/Users/tof/Pictures/Photographies/ML Dev/Dual ISO/_MG_12827.dng" > "/Users/tof/Pictures/Photographies/ML Dev/Dual ISO/_MG_12826-_MG_12827.TXT"

Kapuhy

  • New to the forum
  • *
  • Posts: 9
Re: Lightroom plugin cr2hdr v3.0 BETA2
« Reply #490 on: September 28, 2014, 06:54:09 PM »
I noticed that my issue is gone when I use a different catalog - re-import the same photos and then use the v3.0 BETA2 conversion and it works. So this is most likely related to the catalog and not the plugin itself. Does the plugin modify the catalog?

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8607
Re: Lightroom plugin cr2hdr v3.0 BETA2
« Reply #491 on: September 28, 2014, 07:14:28 PM »
Sure it does!
Don't know if you have the same error: I had strange issues with directory name where the plug-in is located. It won't work properly when renamed or copied to another location. Reinstallation didn't help. I did not investigate further and never had issues after using the directory name used for the first installation.

kichetof

  • Contributor
  • Senior
  • *****
  • Posts: 469
  • Take a beer and enjoy it!
Re: Lightroom plugin cr2hdr v3.0 BETA2
« Reply #492 on: September 28, 2014, 08:55:26 PM »
@Kapuhy yes this plugin modify the catalog by adding a custom metadata preset!

@Walter I change a lot of time the directory and no problem appear. Do you have some special char on your path ?

My workflow is only on Mac, maybe there are some issues on Windows ?

senzazn12

  • Freshman
  • **
  • Posts: 83
Re: Lightroom plugin cr2hdr v3.0 BETA2
« Reply #493 on: September 29, 2014, 01:41:55 AM »

I noticed that my issue is gone when I use a different catalog - re-import the same photos and then use the v3.0 BETA2 conversion and it works.

Just wondering how do I change the catalog?

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8607
Re: Lightroom plugin cr2hdr v3.0 BETA2
« Reply #494 on: September 29, 2014, 01:48:15 AM »
LR basics:
File -> New catalog
and
File -> Open catalog ...
And consult help files, please.

senzazn12

  • Freshman
  • **
  • Posts: 83
Lightroom plugin cr2hdr v3.0 BETA2
« Reply #495 on: September 29, 2014, 01:56:43 AM »
Conversion works good for me to now after changing catalog.

Thanks Kapuhy for mentioning the fix.

chris_overseas

  • Moderators
  • Member
  • *****
  • Posts: 234
Re: Lightroom plugin cr2hdr v3.0 BETA2
« Reply #496 on: September 29, 2014, 02:58:44 AM »
I'm seeing the same problem. This is with an existing catalog that I've successfully processed dual ISO images in before, but using an older version of the plugin. I'm running Windows 8.1, Lightroom 5.6, and the latest version of the same-levels branch from BitBucket.

If I select a bunch of photos then Right-click on them and choose Export -> Dual ISO Converter, a "Preparing for Export" dialog and progress bar appears. Once that's finished (a few seconds with ~800 images selected), the dialog disappears and a background task/progress bar appears in the top left saying "Exporting 800 photos to cr2hdr". So far so good... but after just a second or so the progress bar hits 100% and "Task complete" is shown. A "cr2hdr export finished" dialog then appears, saying no images were converted, no errors, and all the images are listed under the "No Dual ISO" tab. Roughly 200 or so of the images are dual ISO.

My path to the plugin is "F:\Lightroom\Plugins\lr_cr2hdr.lrplugin"
My path to the images is "F:\Photos\RAW\2014\2014-09 London" (note the space). They're definitely all present in that folder and Lightroom has imported them all fine. They are all individual photos - CR2 files copied straight from the camera. No MLV/DNGs.

It doesn't seem to matter how I launch the export, though if I launch it via the File menu instead of right-click, I don't get the final "cr2hdr export finished" dialog. Other than that, the behaviour is always the same.

I haven't added any new keywords anywhere, just left it with the default "Dual-ISO".

Is there anything else you'd like me to do to help diagnose the problem? Where can I find any log files? (enabling "Keep log file after conversion" doesn't generate any log files in my photo directory).

(I haven't yet tried a fresh catalog though presumably that will work OK given it seems to work for everyone else too)
EOS R5 1.1.0 | Canon 16-35mm f4.0L | Tamron SP 24-70mm f/2.8 Di VC USD G2 | Canon 70-200mm f2.8L IS II | Canon 100-400mm f4.5-5.6L II | Canon 800mm f5.6L | Canon 100mm f2.8L macro | Sigma 14mm f/1.8 DG HSM Art | Yongnuo YN600EX-RT II

kichetof

  • Contributor
  • Senior
  • *****
  • Posts: 469
  • Take a beer and enjoy it!
Re: Lightroom plugin cr2hdr v3.0 BETA2
« Reply #497 on: September 29, 2014, 08:10:56 PM »
@ chris_overseas Many thanks for all these informations!

I've some troubles to identify the problem.
Maybe the problem come from the location of the pictures ‽ Not in the same drive that lightroom  ‽

If you select only one, does it work ?

@all with the problem, could you run this version and share the log file located in your Documents folder ?

chris_overseas

  • Moderators
  • Member
  • *****
  • Posts: 234
Re: Lightroom plugin cr2hdr v3.0 BETA2
« Reply #498 on: September 29, 2014, 09:31:05 PM »
Sorry I forgot to mention that even selecting a single photo doesn't work for me.

Thanks for the logging version - after playing around with it briefly I think I've found the problem. It's due to the space in the directory path. Seems the filename is being wrapped in quotes twice, so the "" ends up cancelling itself out and the space becomes an issue. If I try to convert photos where there's no space in the path they convert fine.

Code: [Select]
09/29/2014 20:18:04 DEBUG I'm called before exportServiceProvider.processRenderedPhotos
09/29/2014 20:18:04 DEBUG Path: C:\Temp Folder\LOND4158.CR2
09/29/2014 20:18:04 DEBUG Path DNG: C:\Temp Folder\LOND4158.DNG
09/29/2014 20:18:04 DEBUG Path TXT: C:\Temp Folder\LOND4158.TXT
09/29/2014 20:18:04 DEBUG first: C:\Temp Folder\LOND4158
09/29/2014 20:18:04 DEBUG arguments :  --amaze-edge --cs2x2 --no-bad-pix --fullres --alias-map --stripe-fix --compress --wb=graymax
09/29/2014 20:18:04 DEBUG command : "start /D "F:\Lightroom\Plugins\lr_cr2hdr.lrplugin\bin" /B /WAIT /BELOWNORMAL cr2hdr20bit.exe --amaze-edge --cs2x2 --no-bad-pix --fullres --alias-map --stripe-fix --compress --wb=graymax ""C:\Temp Folder\LOND4158.CR2"" > "C:\Temp Folder\LOND4158.TXT""

It looks like there's an additional quote right at the end of the command too that should probably be removed (though I don't think it really matters).
EOS R5 1.1.0 | Canon 16-35mm f4.0L | Tamron SP 24-70mm f/2.8 Di VC USD G2 | Canon 70-200mm f2.8L IS II | Canon 100-400mm f4.5-5.6L II | Canon 800mm f5.6L | Canon 100mm f2.8L macro | Sigma 14mm f/1.8 DG HSM Art | Yongnuo YN600EX-RT II

kichetof

  • Contributor
  • Senior
  • *****
  • Posts: 469
  • Take a beer and enjoy it!
Re: Lightroom plugin cr2hdr v3.0 BETA2
« Reply #499 on: September 29, 2014, 11:09:57 PM »
It looks like there's an additional quote right at the end of the command too that should probably be removed (though I don't think it really matters).

Sure!!! Thanks guy!!

Could you try this version ?

I forget to remove escaped args for windows... shame on me :) Mac user  8)