MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win)

Started by baldand, December 09, 2013, 06:10:19 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

hwdbk

Tried with a clean Ubuntu VM (Ubuntu Linux 16.04):

All I had to do to get it going was:
- 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

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

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

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

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

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

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
sudo -H easy_install pip

homebrew
/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
xcode-select --install

ffmpeg
brew install ffmpeg

PyInstaller
sudo -H easy_install PyInstaller
   
PyOpenGL
sudo -H pip install PyOpenGL
If above PyOpenGL doesn´t work uninstall it and install instead:
sudo -H pip install -I PyOpenGL==3.0.2

pynumpy
sudo -H pip install numpy
      
glfw3
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
sudo -H pip install scandir
   
pyAudio
sudo -H port install portaudio
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:
./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:
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.dmg
to
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.
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
sudo -H pip install pillow

hwdbk

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

I can't install the audio part

sudo port install portaudio
sudo: port: command not found

Danne




Danne


Teamsleepkid

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

Quote from: Teamsleepkid 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.
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

@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

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

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

@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

Quote from: hwdbk 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

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

Quote from: hwdbk on October 30, 2017, 07:37:43 AM
@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

Is ffmpeg even in there? Need to fetch a version maybe.

Rob Curd

Quote from: Danne on October 30, 2017, 06:05:03 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


Rob Curd

Quote from: Danne on October 30, 2017, 06:38:35 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