Author Topic: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)  (Read 1556840 times)

hwdbk

  • New to the forum
  • *
  • Posts: 15
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1775 on: October 22, 2017, 10:45:46 AM »
Tried with a clean Ubuntu VM (Ubuntu Linux 16.04):

All I had to do to get it going was:
Code: [Select]
- sudo apt-get install python-opengl
- sudo apt-get install python-numpy
- sudo apt-get install python-dev        (to be able to compile bitunpack etc.)
- sudo apt install python-pip
- pip install scandir
- sudo apt install ffmpeg
in the mlrawviewer directory:
- python setup.py build
- cp ./build/lib.linux-x86_64-2.7/bitunpack.so .
and then run the program from the command line:
- python mlrawviewer.py <MLV-file.MLV>

Quirks: Yes, I can reproduce the garbled output when High Quality demosaicing (AMaZE) is used in combination with LJPEG-compressed MLVs and in that mode. In that mode, the app also shows something of memory leak in 'top'. I'll look into that, maybe it's related.
The other quirks (TAB for fullscreen, L for looping the clip), I can't reproduce and work properly on my VM.

hwdbk

  • New to the forum
  • *
  • Posts: 15
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1776 on: October 23, 2017, 09:31:37 AM »
Hi all,

I've created a new version over the weekend,

- bitunpack: treat code with generic bit depth - now works with any depth 7-16 (tested with 7,8,9,11,13,15,16 bits created with mlv_dump, as these bit depths are not created from the camera); 10,12 and 14 from regular camera MLVs.
- fixed LJ92 decoding from within the Demosaic function (was not called and caused garbled output, basically showing the raw compressed data rather than the decompressed image)
- major cleanup of MlRaw.py - lots of code was never called
- code now also tested on Ubuntu, see README

https://bitbucket.org/hwdbk/mlrawviewer/commits/3d7c98f3a875d66451217aa212ea8a4c9d409d3c

Kharak

  • Hero Member
  • *****
  • Posts: 1027
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1777 on: October 23, 2017, 09:34:11 AM »
Is this for PC aswell ?

EDIT: see its mac only

Anyways, from what I could understand, Baldwin's code was a big mess of shaders and python and C+ or whatever, so much that the usual coders lost hope in that jungle code. Good job!
once you go raw you never go back

hwdbk

  • New to the forum
  • *
  • Posts: 15
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1778 on: October 23, 2017, 09:43:36 AM »
Yes, it seems that code was written, then split up (for instance demosaic = predemosaic+lowlevel_demosaic+postdemosaic, but the original demosaic was not taken down - lots of duplication and code specifically for 12 or 14 bit, or worse, for an implied bit depth, not taking bitsPerSample from the file into account. So, a lot of that has been cleaned up and I have a much better understanding of what the program does.

On Windows: it should work but I'm in no position to try this build. I'm on Mac OS and Ubuntu. Looking for a volunteer to build the Windows version and report back here.

/Henk

Kharak

  • Hero Member
  • *****
  • Posts: 1027
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1779 on: October 23, 2017, 01:37:41 PM »
Sorry, but I dont know how to compile or build.

But I can do extensive testing of any win build, if someone else makes a build and i am sure lots of others will too, on mac or pc.
once you go raw you never go back

Lars Steenhoff

  • Senior
  • ****
  • Posts: 473
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1780 on: October 23, 2017, 02:42:03 PM »
tested on osx High Sierra version MLRawViewer 1.5

Results:

14 bit uncompressed works
14 bit compressed gives me back screen.

Do I need to install something extra like python gl ?

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7701
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1781 on: October 23, 2017, 03:55:35 PM »
I´ve been messing with compiling and boy it´s a hustle on my macs. Almost have it working following a mix of instructions from hwdbk and elsewhere. Try following this and see if you get it to work. I think we should start a dedicated MlRawViewer compiling thread soon. No time atm:

Compile from this branch:
https://bitbucket.org/hwdbk/mlrawviewer/branch/raw_video_10bit_12bit_lj92compressed

pip
Code: [Select]
sudo -H easy_install pip
homebrew
Code: [Select]
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
macports
https://www.macports.org/

xcode
https://developer.apple.com/xcode/

command line tools
Code: [Select]
xcode-select --install
ffmpeg
Code: [Select]
brew install ffmpeg
PyInstaller
Code: [Select]
sudo -H easy_install PyInstaller   
PyOpenGL
Code: [Select]
sudo -H pip install PyOpenGLIf above PyOpenGL doesn´t work uninstall it and install instead:
Code: [Select]
sudo -H pip install -I PyOpenGL==3.0.2
pynumpy
Code: [Select]
sudo -H pip install numpy      
glfw3
Code: [Select]
brew install glfw
Then grab the file here:
/usr/local/Cellar/glfw/3.2.1/lib/libglfw.3.2.dylib
rename it to libglfw3.dylib and place in in mlrawviewer/extlibs dir folder together with a ffmpeg binary
http://www.ffmpegmac.net/resources/Lion_Mountain_Lion_Mavericks_Yosemite_El-Captain_15.05.2017.zip
   
scandir
Code: [Select]
sudo -H pip install scandir   
pyAudio
Code: [Select]
sudo -H port install portaudio
Code: [Select]
sudo -H pip -v install --global-option=build_ext --global-option="-I/opt/local/include" --global-option="-L/opt/local/lib" pyaudio
Now run following shell script from within mlrawviewer folder:
Code: [Select]
./makemac.sh

About dmg creation
If you don´t get the expected dmg package it might need a bigger container. Change this line in makemac-sh:
Code: [Select]
hdiutil create -srcfolder "macdmg" -volname "MlRawViewer 1.5.0" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW -size 58000k mlrawviewer.temp.dmgto
Code: [Select]
hdiutil create -srcfolder "macdmg" -volname "MlRawViewer 1.5.0" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW -size 100000k mlrawviewer.temp.dmg



Expected issues:
- Black screen
- White screen
- tkinter import not working and different flags not being copied:
https://github.com/pyinstaller/pyinstaller/issues/1350
ie.
Code: [Select]
22543 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/hi.msg
22548 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/es_bo.msg
22553 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/package.tcl
22558 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/encoding/cp950.enc
22562 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/en_bw.msg
22567 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/encoding/cp737.enc
22571 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/gl_es.msg

Expected to be working:
- Everything functioning except dragging MLV files onto MLRawViewer

When dragging I get this most probably related to failed to copy flags issues:


On one of my machines I had it working by installing:
pillow
Code: [Select]
sudo -H pip install pillow

hwdbk

  • New to the forum
  • *
  • Posts: 15
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1782 on: October 23, 2017, 06:49:04 PM »
For those of you who would wish to try:

https://bitbucket.org/hwdbk/mlrawviewer/downloads/MlRawViewer%201.5.0%20(Commit%203d7c98f,%20Mac%20OS%20X%20build).zip

No ffmpeg inside due to licensing issues, see Danne's instructions above; ffmpeg goes into Contents/MacOS or Contents/MacOS/extlibs - can't figure out why one sometimes works and the other not, or reverse... Just try out with the E key (export to MOV) and you'll quickly find out.

Lars Steenhoff

  • Senior
  • ****
  • Posts: 473
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1783 on: October 23, 2017, 08:37:46 PM »
I can't install the audio part

sudo port install portaudio
sudo: port: command not found

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7701
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1784 on: October 23, 2017, 08:57:12 PM »
You´ll need macports:
https://www.macports.org/

Command line tools and maybe xcode too...

Lars Steenhoff

  • Senior
  • ****
  • Posts: 473
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1785 on: October 23, 2017, 08:59:35 PM »
Thanks!

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7701
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1786 on: October 23, 2017, 09:37:51 PM »
If on python 2.7.10 be prepared for this issue:
https://github.com/pyinstaller/pyinstaller/issues/1350

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7701
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1787 on: October 24, 2017, 03:00:31 PM »
Updated this post with some more dependency links and an issue tracker regarding compiling:
http://www.magiclantern.fm/forum/index.php?topic=9560.msg192172#msg192172

Teamsleepkid

  • Member
  • ***
  • Posts: 248
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1788 on: October 24, 2017, 07:14:53 PM »
so i tried it. 1.5 and...its really great. maybe some of the best looking images I've ever gotten out of a magic lantern post production tool. but...i see focus pixels! god damn focus pixels always ruin everything. I mean they are much worse with the stripe correction turned off. if you turn it on they go away a little bit. but they are still there. I know this is another guys software but any way to tweek it? also the mov export doesn't seem to work. the dng works fine. feel like i could use my eos m for a film if i could just find the right post production tools...excited for dannes new switch app with gui as well. currently using switch. thanks guys.
EOS M

hwdbk

  • New to the forum
  • *
  • Posts: 15
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1789 on: October 25, 2017, 07:41:32 AM »
so i tried it. 1.5 and...its really great. maybe some of the best looking images I've ever gotten out of a magic lantern post production tool. but...i see focus pixels! god damn focus pixels always ruin everything. I mean they are much worse with the stripe correction turned off. if you turn it on they go away a little bit. but they are still there. I know this is another guys software but any way to tweek it? also the mov export doesn't seem to work. the dng works fine. feel like i could use my eos m for a film if i could just find the right post production tools...excited for dannes new switch app with gui as well. currently using switch. thanks guys.
On my Ubuntu, I can't get MOV export going either (DNG works). It does launch an ffmpeg subprocess with the right parameters (you can see with ps -efww), but that process stalls - I guess it's not getting raw frames through stdin. Was looking at it yesterday evening (subprocess class, Popen) but no apparent solution yet.
On the focus pixels, I think I know what you mean, that regardless of the AMaZEing demosaicing algorithm, still some pixellation occurs, for instance between tree leaves. If you mean a more general pixellation, please try the Q button and see if AMaZE improves things (PS> AMaZE is always on when exporting to MOV, always off (RAW mode) when exporting to DNG). Please could you post an image of your artefact?

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7701
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1790 on: October 25, 2017, 08:17:49 AM »
@hwdbk. It´s worse than that regarding the focus pixels for these cams:
http://www.magiclantern.fm/forum/index.php?topic=16054.0

dfort, dmilligan, bouncyball spent some quality time on this and streamlined solutions into mlv_dump which I use in scriptbased tool Switch(also used in MLVFS and batch_mlv, probably in MLV app and MLVP too) bit MlRawViewer has some other pixel fixing code, not sure how well it works.

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3413
  • 5D3 | M1 | 7D | 70D | SL1 | M2 | 50D
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1791 on: October 27, 2017, 08:35:19 PM »
Great work on updating MLRV to 1.5 since it has been long overdue, quite frankly. Thanks @hwdbk for your contributions!

Just in case anyone hasn't notice yet already but if I use the one that's shared by @hwdbk's bitbucket site (build 10/23) then upon previewing Lossless 14-bit Dual-ISO files I get all kinds of garbled rainbow effect (funky type of false color alike) however when I use the version that's shared by @Danne's bitbucket (build 10/20) it shows the Dual-ISO stripes like normal upon previewing.

Can anyone else confirm this to be reproducible on your end?
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

Rob Curd

  • Member
  • ***
  • Posts: 103
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1792 on: October 30, 2017, 12:18:19 AM »
I’ve also installed version 1.5 but having the no export to prores problem.

Sorry total noob question but do I need to install anything other than the .dng?

This stuff is way over my head but exporting to pro res is just such an easier option for me.

Thanks


Sent from my iPhone using Tapatalk

hwdbk

  • New to the forum
  • *
  • Posts: 15
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1793 on: October 30, 2017, 07:37:43 AM »
@DeafEyeJedi: I’m seeng the striped output on dusl-iso 14bit raw, nothing stranger than expected. Which OS are you on? Could it be that what you see depends on the zoom/scale/size of the window? AFAIK, Danne is working on essentially the same version. The branches haven’t divergered much yet

@Rob: yes, I know MOV export doesn’t work on Linux, no pointer as to why ffmpeg doesn’t receive the raw frames from stdin. Any help there is welcome.

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3413
  • 5D3 | M1 | 7D | 70D | SL1 | M2 | 50D
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1794 on: October 30, 2017, 05:15:37 PM »
@DeafEyeJedi: I’m seeng the striped output on dusl-iso 14bit raw, nothing stranger than expected. Which OS are you on? Could it be that what you see depends on the zoom/scale/size of the window? AFAIK, Danne is working on essentially the same version. The branches haven’t divergered much yet

That's quite strange. This was done on a Mac Mini running OS X 10.12.6 and here's how it actually looks when comparing one another.

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

Rob Curd

  • Member
  • ***
  • Posts: 103
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1795 on: October 30, 2017, 06:01:58 PM »
@Rob: yes, I know MOV export doesn’t work on Linux, no pointer as to why ffmpeg doesn’t receive the raw frames from stdin. Any help there is welcome.


Hi sorry, failed to mention, I’m on a Mac

Thanks


Sent from my iPhone using Tapatalk

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7701
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1796 on: October 30, 2017, 06:05:03 PM »
Is ffmpeg even in there? Need to fetch a version maybe.

Rob Curd

  • Member
  • ***
  • Posts: 103
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1797 on: October 30, 2017, 06:33:05 PM »
Is ffmpeg even in there? Need to fetch a version maybe.

Again sorry, I have downloaded the latest ffmpeg however where does this need to be located for MLRV to recognise it?

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7701
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1798 on: October 30, 2017, 06:38:35 PM »
Download the official mlrawviewer and check inside.

Rob Curd

  • Member
  • ***
  • Posts: 103
Re: MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)
« Reply #1799 on: October 30, 2017, 11:41:44 PM »
Download the official mlrawviewer and check inside.
Likely me being incredibly dense. The program works perfectly exporting to Dng but when exported to pro res I get this screen for a few seconds then stops.

Thanks for your patience.




Sent from my iPhone using Tapatalk