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

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6609
Re: Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1150 on: March 08, 2017, 12:27:22 PM »
Looks nice. Are you building a corresponding subfolder for each mlv file so the user can select a folder with multiple mlv files or how would we differ files otherwise?

kichetof

  • Contributor
  • Senior
  • *****
  • Posts: 469
  • Take a beer and enjoy it!
Re: Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1151 on: March 08, 2017, 12:53:55 PM »
Is up to you !

A folder with many MLV files, select from menu and creates a subfolder at the conversion ?

Or convert everything in the same folder ?

Exemple:

MLV_Files\M04-0001.MLV
MLV_Files\M04-0002.MLV
MLV_Files\M04-0003.MLV

Option 1 (everything in the same folder):
Code: [Select]
MLV_Files\M04-000100000.dng
MLV_Files\M04-000100001.dng
MLV_Files\M04-000100002.dng
MLV_Files\M04-000100003.dng
MLV_Files\M04-000100004.dng
MLV_Files\M04-000100005.dng
MLV_Files\M04-000200000.dng
MLV_Files\M04-000200001.dng
MLV_Files\M04-000200002.dng
MLV_Files\M04-000200003.dng
MLV_Files\M04-000200004.dng
MLV_Files\M04-000200005.dng
MLV_Files\M04-000300000.dng
MLV_Files\M04-000300001.dng
MLV_Files\M04-000300002.dng
MLV_Files\M04-000300003.dng
MLV_Files\M04-000300004.dng
MLV_Files\M04-000300005.dng

Option 2 (by subfolder):
Code: [Select]
MLV_Files\M04-0001\M04-000100000.dng
MLV_Files\M04-0001\M04-000100001.dng
MLV_Files\M04-0001\M04-000100002.dng
MLV_Files\M04-0001\M04-000100003.dng
MLV_Files\M04-0001\M04-000100004.dng
MLV_Files\M04-0001\M04-000100005.dng
MLV_Files\M04-0002\M04-000200000.dng
MLV_Files\M04-0002\M04-000200001.dng
MLV_Files\M04-0002\M04-000200002.dng
MLV_Files\M04-0002\M04-000200003.dng
MLV_Files\M04-0002\M04-000200004.dng
MLV_Files\M04-0002\M04-000200005.dng
MLV_Files\M04-0003\M04-000300000.dng
MLV_Files\M04-0003\M04-000300001.dng
MLV_Files\M04-0003\M04-000300002.dng
MLV_Files\M04-0003\M04-000300003.dng
MLV_Files\M04-0003\M04-000300004.dng
MLV_Files\M04-0003\M04-000300005.dng

I think the second option is more beautiful, but...

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6609
Re: Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1152 on: March 08, 2017, 01:02:49 PM »
Second one gets my vote but both options might be useful too.

kichetof

  • Contributor
  • Senior
  • *****
  • Posts: 469
  • Take a beer and enjoy it!
Re: Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1153 on: March 08, 2017, 02:18:54 PM »
Okay, I added a checkbox to enable/disable subfolder option :)


Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6609
Re: Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1154 on: March 08, 2017, 02:35:32 PM »
Nice work.

If you want davinci resolve compliance  :P


You,ll get the date in metadata form the mlv file
Code: [Select]
mlv_dump -m -v INPUT.MLV
Of course this is all optional but since we,re already at it. The original mlv should keep it,s original name but the folder an output can be changed. A third option, your call.

Example from cr2hdr.app
Code: [Select]
mlv_dump --dng -o "${BASE}_1_$date"_ INPUT.MLV
There is still the issue with lack of wav metadata which is needed for resolve folder embedding but that is also doable with bwfmetaedit and a template so let me know f you want to add this as well.

k2121

  • New to the forum
  • *
  • Posts: 15
Re: Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1155 on: March 08, 2017, 04:32:30 PM »
On my pc convert 25 frames (1 second) takes 5 minutes with used 10-30% cpu. Is there chance to speed up conversion from stripes to dual iso dng?
650d.104 ML • SX1.200h CHDK

kichetof

  • Contributor
  • Senior
  • *****
  • Posts: 469
  • Take a beer and enjoy it!
Re: Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1156 on: March 08, 2017, 08:29:35 PM »
I think I'm on the right way :)



Thanks @Danne for your help !

What does mean _1_2017-03-01_0001_C0000 ?

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6609
Re: Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1157 on: March 08, 2017, 10:39:30 PM »
Looks good Kichetof.
Naming convention comes from black magic cams and I think it,s scene number with date. You trick ML folders with dng files by following the convention suggested and add the needed metadata in wav file and then the dng sequence will autosync audio to the files and the folder itself will become a movie sequence.
http://www.magiclantern.fm/forum/index.php?topic=11520.msg112026#msg112026

_1_2017-03-01_0001_C0000

This part is the date from MLV metadata 2017-03-01 so you have to grab whatever date metadata is inside the specific MLV file and add that instead of in the example. For instance today´s date will become _1_2017-03-08_0001_C0000 if you recorded MLV files today.


Now if you want to check into wav metadata I inject this with bwfmetadata(open source)
http://bwfmetaedit.sourceforge.net/

#Print template to audio.xml file

echo "<?xml version="\"1.0"\" encoding="\"UTF-8"\"?><BWFXML><IXML_VERSION>1.5</IXML_VERSION><PROJECT>Magic Lantern</PROJECT><NOTE></NOTE><CIRCLED>FALSE</CIRCLED><BLACKMAGIC-KEYWORDS></BLACKMAGIC-KEYWORDS><TAPE>1</TAPE><SCENE>1</SCENE><BLACKMAGIC-SHOT>1</BLACKMAGIC-SHOT><TAKE>1</TAKE><BLACKMAGIC-ANGLE>ms</BLACKMAGIC-ANGLE><SPEED><MASTER_SPEED>$FPS/1000</MASTER_SPEED><CURRENT_SPEED>$FPS/1000</CURRENT_SPEED><TIMECODE_RATE>$FPS/1000</TIMECODE_RATE><TIMECODE_FLAG>NDF</TIMECODE_FLAG></SPEED></BWFXML>" > /tmp/DUALISO/audio.xml
#Add metadata information to the wav file
bwfmetaedit "${BASE}_1_$date".wav --in-iXML=/tmp/DUALISO/audio.xml

Template grabbed from mlvfs code. All variables called $FPS(there are three places) includes the framerate. It has to be five numbers so add with zeroes if needed. For instance 23.97 will become 23970
25fps becomes 25000

Check from line 641 here
https://bitbucket.org/Dannephoto/cr2hdr/src/c660bf558d56c7bde58c3776c1a12bfdd6e0c29c/source_code/cr2hdr_MAIN.txt?at=default&fileviewer=file-view-default



kichetof

  • Contributor
  • Senior
  • *****
  • Posts: 469
  • Take a beer and enjoy it!
Re: Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1158 on: March 08, 2017, 11:42:07 PM »
Thanks @Danne for all informations! Now it's more simple to understand :)

For the moment, I've a GUI partially final (some bugs on LR 2015.9 on Mac, need to check on Win) and I can convert MLV to DNG with all options (folder creations and mlv_dump options)

Next step, iterate over DNG converted to import it in LR.  8)
And play with wav file with bwfmetaedit.

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3391
  • 5D3 | M1 | 7D | 70D | SL1 | M2 | 50D
Re: Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1159 on: March 09, 2017, 12:17:03 AM »
Keep stirring this pot while it's still hot!
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 DEV (WIP)
« Reply #1160 on: March 09, 2017, 10:58:33 AM »
That's awesome  8)
  • WAV file fix with bwfmetaedit, done
  • Importation, done

LR Importation is the longest task... I hope I can speed up the process.

Need to test LR 2015.8 vs 2015.9 on windows to check if I've the same bug with GUI... [edit] no bug in 2015.9 on Win..

kichetof

  • Contributor
  • Senior
  • *****
  • Posts: 469
  • Take a beer and enjoy it!
Re: Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1161 on: March 09, 2017, 09:30:14 PM »
MLV importation

This is the first release to import MLV files in Lightroom!  8)

How to update ?

Replace cr2hdr.lrplugin with new one and reload Lightroom to be sure that every new files are correctly loaded.

On Plug-in Manager, check "reload plug-in":



Use the plugin

Create a folder with Lightroom or drop your MLV files inside a folder that already in Lightroom, otherwise, unable to find MLV files.



Run the plugin

On Library menu, in Plug-In Extra's section, run Import MLV file




Enjoy!




Keep in mind, it's a dev version, so keep a backup of your files! We're never too prudent.

Download cr2hdr.3.0-170309-02-MLV-DEV

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6609
Re: Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1162 on: March 09, 2017, 09:50:11 PM »
Nice.
Tried but plugin isn,t loading on my version of lightroom 5.

Plug-in error log for plug-in at: /Applications/Adobe Photoshop Lightroom 5.app/Contents/PlugIns/cr2hdr.lrplugin

**** Error 1

An error occurred while attempting to run one of the plug-in’s scripts.
Could not find namespace: LrSelection

**** Error 2

Could not load the post-processing filter from this plug-in.
Could not find namespace: LrSelection

kichetof

  • Contributor
  • Senior
  • *****
  • Posts: 469
  • Take a beer and enjoy it!
Re: Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1163 on: March 09, 2017, 09:58:50 PM »
Problem solved!

Download cr2hdr.3.0-170309-02-MLV-DEV

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6609
Re: Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1164 on: March 09, 2017, 10:13:54 PM »
Yes, same issue with both. What version are you using? Lightroom 6?

*Ok, will try new version.

kichetof

  • Contributor
  • Senior
  • *****
  • Posts: 469
  • Take a beer and enjoy it!
Re: Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1165 on: March 09, 2017, 10:18:27 PM »
Download the cr2hdr.3.0-170309-02-MLV-DEV version, fixed!

I use LR 2015.9 (6.9) and LrSelection was introduced in version 6 https://forums.adobe.com/thread/1822776

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6609
Re: Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1166 on: March 09, 2017, 10:28:27 PM »
Diagnostic messages are gone and dualiso processing works. However I can,t find the MLV option in plug-in EXTRAS even though I stuffed MLV files In the folder. I have the folder inside lightroom and as you say files are not recognized but they are in there.

kichetof

  • Contributor
  • Senior
  • *****
  • Posts: 469
  • Take a beer and enjoy it!
Re: Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1167 on: March 09, 2017, 10:42:26 PM »
The menu is under Library, not File :)

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6609
Re: Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1168 on: March 09, 2017, 10:57:45 PM »
Nice, working :)

About the xml file, the fps can,t contain dots in wav metadata. For instance 29.973 has to be 29973

Also wonder why my wav file doesn,t contain the metadata inside the wav file but the xml file is inside the folder next to the file? Are you completing the last step with bwfmetaedit?
Code: [Select]
bwfmetaedit M07-1812_1_2017-03-07_0001_C0000.wav --in-iXML=M07-1812_1_2017-03-07_0001_C0000.xml
Can the original MLV file stay outside the subfolder instead of moved into it?

kichetof

  • Contributor
  • Senior
  • *****
  • Posts: 469
  • Take a beer and enjoy it!
Re: Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1169 on: March 09, 2017, 11:27:36 PM »
Great news! :)

Normally metadata for wav file should works, but I don't know how to check if it's really done.
Actually it's done only if you check "davinci compliance". Should I do it for every option ?

I keep the file inside original folder, I've forgot to pass -o for subfolder... done! (available in future release)

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3391
  • 5D3 | M1 | 7D | 70D | SL1 | M2 | 50D
Re: Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1170 on: March 10, 2017, 04:01:46 AM »
Great save, @Danne as per usual and thanks for being on a roll @kichetof!
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6609
Re: Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1171 on: March 10, 2017, 06:55:52 AM »
Hi Kichetof.
You can check the wav file directly in bwfmetaedit. Drag the wav file straight into the program and check the ixml section. There should be a yes.


About no-fixcp the default option should not be set since mlv_dump has cold pixel fix defaults set to auto.

kichetof

  • Contributor
  • Senior
  • *****
  • Posts: 469
  • Take a beer and enjoy it!
Re: Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1172 on: March 10, 2017, 07:36:49 AM »
Hi @Danne thanks for the info! I'll play with it. Did you try with Davinci compliance? For the moment the ixml file is added only with this option. In the future release, the ixml will be added every time.

So there are 3 options for cold pixel: no fix, fix cp and fix cp2?

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6609
Re: Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1173 on: March 10, 2017, 07:56:50 AM »
Yes, compliance is always on and subfolder option as well but wav data isn,t injected nevertheless. Don,t forget to fix removing the dots in fps. 29.973 to 29973 etc.
The fix-cp option is default in mlv_dump nowadays. The other two could be set as optional.
Another question. Could MLV to dng processing be set to recursive as an alternative so that all MLV files will be processed instead of having to do them one by one? Maybe as an option?


kichetof

  • Contributor
  • Senior
  • *****
  • Posts: 469
  • Take a beer and enjoy it!
Lightroom plugin cr2hdr v3.0 DEV (WIP)
« Reply #1174 on: March 10, 2017, 08:10:42 AM »
Hmmm I changed the way to get FPS and I forgot to multiply by 1000! Maybe this is the bug!

Okay I'll add fix-cp option and defined it as default.

Hmm why not! A checkbox to convert every MLV files with same settings. Is it useful for you?

Should I set subfolder option by default?