[deprecated] MLV Viewer to view .mlv (and .raw) files on windows (C#)

Started by g3gg0, September 22, 2013, 01:25:04 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

g3gg0

here is a _very_ simple and hackish MLV viewer to check your footage
it is also available as an OSX-App


it will read uncompressed MLV files and display the frames with just a few frames per second.
this tool was programmed in C# on windows, but it uses nothing windows-specific, so it should run on any OS using mono. (positive reports from linux and mac os x)

please remind:
- these tools are just a PROOF OF CONCEPT
- it is not meant as productional tool
- i used it to check what is necessary to decode and view RAW/MLV files, its just my playground
- it has bugs!
- it will most likely not be continued
- i shared it as a last resort tool in case you need something like that

MLVViewSharp:


notes:
- just drop the .mlv or .m00, .raw, .r01, ... file into the program window
- shows the video in full res using bilinear demosaicing
- other debayering methods (e.g. fast ones) are available (right click onto image)
- ramps exposure up/down if there is under/overexposure (so it may not be accurate enough for some of you)
- has no white balance algorithm
- just tested on 5D3, other cameras have different bayer patterns - didnt check them yet
- it uses the coefficients from the raw info block, so color weighting should be correct caused trouble, disabled
- the scene is scaled to TV black and white levels (16..235) for a better looking playback
- updated to work with files that have less bpp than 14 (e.g. when used mlv_dump to reduce size)
- supports both .mlv and old .raw file format

it has a white balancing feature:
- press and hold SHIFT
- press LEFT mouse button
- image will get displayed 1:1
- move to where you have gray level
- release LEFT mouse button
it will pick a 8x8 pixel area and use this as white balance reference after debayering and kelvin correction.

camera color matrices are also used now, which should result in better colors

to disable all correction post processing:
- right click to get context menu
- there is an option to disable color correction

MLVBrowseSharp:


- just select the folder to browse on the left pane
- you can select multiple files on the right pane as you are used to (CTRL click etc)
- the only thing you can do yet, is RIGHT CLICK and choose anything you want
- for opening using MLV Viewer, please asign the .mlv extension to MLVViewSharp.exe
- for every file visible, it creates a thread, so this might overload your computer when you have several hundreds of files in one directory (i hope you sort your footage better than this...)
- selected files play back in maximum speed, unselected play slower (1 fps)
- selecting a file causes it to play back from the beginning
- you cannot set WB or debayering in the preview window (its simple to add, but i dont understand why someone would need that)

- when a file is selected, you can CLICK and HOLD the left mouse button on the icon and DRAG left and right to seek in the file
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

RenatoPhoto

Than must be you playing with EOSM... ;)  Nice looking kid! ;D

The first version seem to run a bit faster..
Not much change in the colors from previous version.  The brightness change seem a bit slower now.
http://www.pululahuahostal.com  |  EF 300 f/4, EF 100-400 L, EF 180 L, EF-S 10-22, Samyang 14mm, Sigma 28mm EX DG, Sigma 8mm 1:3.5 EX DG, EF 50mm 1:1.8 II, EF 1.4X II, Kenko C-AF 2X

g3gg0

right. here the notes from the other thread:

now it supports resizing and different debayering algorithms.
parts of it are faster now, others are slower.
in the end its about the same speed as the version before ;)

okay maybe it is a bit slower now - default debayering is full size bilinear filtering.
do a right click and select half/quarter etc resolution. then it will be faster ;)
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

RenatoPhoto

All functions tested well.. 1/2 is pretty good compromise between speed and resolution.
In Bilinear mode with windows 7 64 bit 4 cores CPU at 20% max at 45%.  Any way to speed it up?
http://www.pululahuahostal.com  |  EF 300 f/4, EF 100-400 L, EF 180 L, EF-S 10-22, Samyang 14mm, Sigma 28mm EX DG, Sigma 8mm 1:3.5 EX DG, EF 50mm 1:1.8 II, EF 1.4X II, Kenko C-AF 2X

g3gg0

Quote from: RenatoPhoto on September 22, 2013, 02:25:34 AMAny way to speed it up?

yes, not to use C#, but native code and using accelerated 2D.
-> not the focus for this test tool
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

RenatoPhoto

I think it is a great tool.  No post processing required to review the shots and also saves a lot of space needed for all the dngs etc.
http://www.pululahuahostal.com  |  EF 300 f/4, EF 100-400 L, EF 180 L, EF-S 10-22, Samyang 14mm, Sigma 28mm EX DG, Sigma 8mm 1:3.5 EX DG, EF 50mm 1:1.8 II, EF 1.4X II, Kenko C-AF 2X

g3gg0

Quote from: RenatoPhoto on September 22, 2013, 02:25:34 AM4 cores CPU at 20% max at 45%

btw - the CPU load for a task is scaled to the number of cores.
hyperthreading and 4 cores with one core fully utilized gives you 12.5% CPU load for the thread.
without HT the maximum is 25%.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

Andy600

Just tried the update with mlv recorded on the 50D. Everything is green ;D and much slower playback. The original player worked well.
Colorist working with Davinci Resolve, Baselight, Nuke, After Effects & Premier Pro. Occasional Sunday afternoon DOP. Developer of Cinelog-C Colorspace Management and LUTs - www.cinelogdcp.com

g3gg0

Can you dump one frame into a separate frame using 'mlv_dump -f1 - o out.mlv in.mlv' and upload using upload.g3gg0.de?

The default demosaic algorithm is bilinear.  Just right click and select half res to have faster decoding.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

Andy600

Colorist working with Davinci Resolve, Baselight, Nuke, After Effects & Premier Pro. Occasional Sunday afternoon DOP. Developer of Cinelog-C Colorspace Management and LUTs - www.cinelogdcp.com

Doyle4

Possible to download the mlv raw module anywhere for latest nightly on 600d/5d2?

Thanks.

g3gg0

i changed these things:

- disabled camera matrix from raw info, as i dont really understand how to use it
- added saturation code and pushed colors a bit
- changed code to use LUT which is a bit faster

so the 50D footage should work. just the colors might not look perfect
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

maxotics


g3gg0

Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

maxotics

Thanks g3gg0.  Please let me know when it is.  No rush, of course.  I think the MLV format has tons of potential and would love to help out.  Naturally, I'd like to use it with my 50D. 

Another thing that is driving me nuts is the focus pixel problem with the EOS-M (if it can shoot MLV? reliably).  I don't have the time to learn Java and fork PDR.  I'm too old for C :)  C# I can do (barely).  I'm hoping through your code I can figure out some solutions for that. 

Or, maybe I can help you with some domestic UI stuff.  C# is not beneath me :)

g3gg0

Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

maxotics

The EOS-M, and other new Canon cameras that use the new hybrid focus system, set aside some pixels for focus.  When ML captures the RAW it captures these pixel values which usually appear as pink dots (because they are mostly red-pixels de-bayered).  Anyway, PDR uses start/end locations, with offsets, to go through a RAW or DNG file to remove them (before bebayering).  Unfortunately, I still see these pixels in my videos, the green and blue ones.  I think I know what the reasons are (there are more pixels than PDR takes care of), but it's a complicated subject and the original PDR devs are not around, though Mixer2 is coming back and Rewind is pretty knowledgeable. 

I believe a better strategy is to use a static sensor map, calibrate it to the crop, or whatever section of the sensor is used, and go through and "deaden" these pixels if they seem to be fired, which also seems to only happen if the camera is focused on the area or there is no detail (over-exposed). 

I started trying to do this through .NET, but there is no RAW library to make it easy for me.  Even DNGs/TIFFs are not easy.  So I'm hoping that by looking at what you did I may be able to modify it to follow this strategy.  Another great thing about MLV is you'll have the crop mode, camera, etc., stuff you need to know before you apply the routine for deadening the focus pixels.

As more Canon cameras are hacked, and the newer models come out, I believe this problem will become more pronounced and I won't seem so crazy to keep going on and on about it :)




g3gg0

ok, uploaded a version of the viewer that supports LEGACY .RAW files.
so it is useful for the non-mlv builds too ;)
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

g3gg0

Quote from: maxotics on September 23, 2013, 02:39:51 AM
I believe a better strategy is to use a static sensor map, calibrate it to the crop, or whatever section of the sensor is used, and go through and "deaden" these pixels if they seem to be fired, which also seems to only happen if the camera is focused on the area or there is no detail (over-exposed). 

easy to do. i can add support to mlv_dump.
the only question is how to specify the map.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

maxotics

Found source, thanks.  Will work on static location file.  If you need something specific let me know. 

arrinkiiii



"ramps exposure up/down if there is under/overexposure (so it may not be accurate enough for some of you)"

-It's not possible to have a check/uncheck box or in the right key mouse to have te possibility to enable/unable the ramps exposure?


RenatoPhoto

Quote from: g3gg0 on September 23, 2013, 08:49:07 PM
ok, uploaded a version of the viewer that supports LEGACY .RAW files.
so it is useful for the non-mlv builds too ;)
Ohh Yes!  That is sweet!  I tested some raw files, worker very well..
Thank you!
http://www.pululahuahostal.com  |  EF 300 f/4, EF 100-400 L, EF 180 L, EF-S 10-22, Samyang 14mm, Sigma 28mm EX DG, Sigma 8mm 1:3.5 EX DG, EF 50mm 1:1.8 II, EF 1.4X II, Kenko C-AF 2X

RenatoPhoto

Just found that it crashes at 1/8 resolution.. 

Again this is a great tool for quick checking of the video files.
It could be even better if it ran a bit faster, although the slider works fantastic so it is easy to just skip forward!!  <-- Congrats nicely done!!
It could be a bit better if the contrast could be lowered a bit.

Could not get proper playback for multiple spanned raw files, xxx.raw and xxx.r00 and xxx.r01.  It worked well after they got joined but if I play any of the  pieces got lots of pink frames, and off sequence playback.
http://www.pululahuahostal.com  |  EF 300 f/4, EF 100-400 L, EF 180 L, EF-S 10-22, Samyang 14mm, Sigma 28mm EX DG, Sigma 8mm 1:3.5 EX DG, EF 50mm 1:1.8 II, EF 1.4X II, Kenko C-AF 2X

bart


tecgen

Nice work. Can you please provide your C# source code? Maybe we can port it to Java and run it on OSX, Linux and Windows.

best regards
Marco
Canon 5D Mark II, 50D, 550D/Rebel T2i, EF 40mm f/2.8 STM, Sigma 18-35mm f/1.8, EF 85 f1.8, EF 135 f2.8 SF, Zoom H2n