Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Levas

#51
Raw Video / Re: AI algorithms for debinning
July 20, 2021, 11:39:03 AM
Quote from: IDA_ML on July 19, 2021, 01:22:25 PM
Thank you, Levas.  Could you please explain to me what 6:1 compression techniques are?  Is this some kind of lossless RAW compression or is it something else?

It's about how much the data is compressed.
A video frame of 1920x1080x14bit = 29030400 bits, divided by 8 -> 3628800 bytes, divided by a million -> 3.628800 Megabyte.
So a non compressed 14 bit 1920x1080 frame is 3.6 Mbyte in size.
With 6:1 compression rate, your file size becomes 6 times smaller. (so instead of 3.6Mbyte it would become 0.6Mbyte)
In ML 14 bit raw is none compressed, so compression ratio is 1:1.
Then a few years ago, Alex found out about lossless LJ92 compression available in camera (The standard LJ92 compression, also used for lossless compression by adobe DNG converter).
This is a lossless compression which makes the filesize about 33% smaller, so ML lossless raw compression has actually a 1.5:1 compression ratio.

Other camera manufacturers of have options for 6:1 compression ratio, the 8K raw in the R5 is done with Canon cinema lite format which has an advertised compression ratio of 5:1.
Most of these are advertised as lossy compression formats and not lossless...but how the compression is done is in most cases kept a mystery by the manufacturers.
But there should be definately some color/detail loss along the way.
#52
Raw Video / Re: AI algorithms for debinning
July 20, 2021, 11:23:31 AM
Quote from: Jonneh on July 19, 2021, 04:20:37 PM
"Read out" is a bit of a catch-all term though. Is there consensus on where exactly the bottleneck lies? Since fast CF and SD cards (w/ overclocking) see over 90 and 70 MB/s, respectively, and combined speeds don't surpass 135MB/s, it doesn't seem to be in the (final) write step. Is it known to lie at the sensor (analogue) level?

The read out speed I'm talking about is literally the time it takes to read out the sensor.
You might think that the sensor readout is very fast, since you can take pictures of 1/4000th of a second, right ?
But when you're taking a picture, the sensor is actually exposed to light for about 0.2 seconds.  (the time it takes to read out the whole sensor in full resolution)
The shutter is the only reason you get your 1/4000th or even 1/60th of a second exposure.
The shutter closes and no more light comes onto the sensor, the sensor is recording light for the full 0.2 seconds.

A reasonable approach to estimate the max readout speed of most Canon DSLR's is the max burst speed per second, multiplied by the sensor resolution.
In case of the 6d, the advertised max burst speed is 4.5 frames per second. 4.5 x 20Megapixel = 90 Megapixel per second.
For 5d3 the advertised burst mode is 6 frames per second, 6 x 22Megapixel = 132 Megapixel per second.

So for pure UHD/4K resolution, sensor read out speed will be a bottleneck.

Not much of a problem though, because at the moment, writing speed is the biggest bottleneck.
6d can do 2880x1200x25fps in crop mode, but not continuous in 14bit lossless raw  :-\
#53
Raw Video / Re: AI algorithms for debinning
July 19, 2021, 12:29:16 PM
Interesting discussion indeed, Ida.
Always interesting to see how others look at image quality and do their post process.

Quote from: mlrocks on July 18, 2021, 08:23:31 PM
I start to believe that the anamorphic 5.7k raw on 5D3 is a true 5.7k raw with a compression ratio of 6 or above, as the horizontal binning has a compression ratio of 3 or above, and the 14-bit lossless LJ92 has a compression ratio of 1.5-2.5, depending on scene complexity and ISO level. The image quality may be "mediocre" comparing to the native uncompressed 6k raw, but should be much better than 1920x2340 if AR is 2.40.

Currently, Red Komodore has a 6K raw with compression ratio choices of 3 to 12, the same as the BMPCC 6K Pro. If implemented the same as the Canon R5, Canon 1DX3 and C500MK2 have 6k raw with a compression ratio of 6.
...

...
My bet is that all of these cameras will be similar in terms of image quality if not pixel peeping, as long as the operator is an expert on the camera and on the raw process to release the full potential of the system.

In terms of resolution, the 5d3 and other ML cameras will never win in anamorphic modes, on resolution/detail that is.
The other cameras don't use pixelbinning or lineskipping as technique to lower compression rates.
The biggest digfference between these professional video cameras and the 5d3 and other canon DSLR's is the readout speed of the sensor.
The ML cameras can't readout fast enough to read enough pixels for 4K.
For example, the 6d sensor can be read out at a speed of about 90 megapixel per second.
UHD 3840x2160 x 24(fps) = about 200 megapixel per second...so not possible on 6d (that's the reason why highest crop mode on 6d in 25 fps = 2880x1200 which is about 86 megapixel per second)

The 5d3 sensor has the fastest readout speed of all ML cameras, that's why it has higher resolutions available in crop and anamorphic modes, but still not fast enough to readout 3840x2160x24fps.

But how these 6:1 compression ratio's work is a bit of a blackbox.
My bet is that most detail is cut off in dark(er) areas of the image.

Still also not sure how raw the BRAW of the blackmagic cameras is, or how raw the CRM files of the Canon 5dR are.
Blackmagic used to have raw cinema dng, which is as raw as raw gets.
But the more you read about BRAW, the more it sounds like a video codec, some say the image is already debayered in BRAW  ???
 
What is also a mystery to me is canon cinema raw light format (which is the only raw format in the Canon 5dR).
Cinema raw light has a high compression rate and there are no software tools available to extract a raw image sequence out of it.
Which is weird, if I buy a camera that shoots raw,  I'd like to be somehow able to extract an image sequence out of the files in a raw format,  like CR2, CR3 or DNG.
Doesn't matter if the CR3 or DNG's are lossy compressed, but I like to open them in different photo and video editors to compare different outputs.

That said ML raw has some pros against the 6:1 compression techniques.
ML raw gives you true 14 bit lossless raw compression. (or lower, like 10 bit if you want to, but still lossless compression)
So color detail and shadow area's are probably better compared against 6:1 compression techniques. 
#54
Raw Video / Re: AI algorithms for debinning
July 18, 2021, 07:05:05 PM
By using magic lantern raw video for years, you get used to the quality of it.
Sometimes I shoot a 4k/UHD clip with my phone, just to see a different quality level of footage  :P
#55
Raw Video / Re: AI algorithms for debinning
July 18, 2021, 07:02:32 PM
The quality difference between crop and anamorphic is in the pixel peepers range.

But difference aside, even the anamorphic modes look a hell of a lot better then 4k/UHD clips from my phone   8)
#56
Raw Video / Re: AI algorithms for debinning
July 18, 2021, 03:59:19 PM
Didn't test the workflow with Topaz (don't have it)

But I expect it to not give better results (if you're aiming to get less artifacts).
The Canon horizontal pixelbinning used in anamorphic modes is far unique in cinema/photo world.
The only ones using it are a bunch of ML enthousiast with old Canon cameras  :P

Topaz AI is made with normal images in mind, full pixel readout images, where no tricks like pixelbinning is used.
So it's not trained/made for images that are horizontal pixelbinned.
Therefore I don't expect it to give better results on anamorphic ML footage.

#57
Raw Video / Re: AI algorithms for debinning
July 18, 2021, 03:26:03 PM
Hard to compare crop mode against anamorphic mode, hard to get the same field of view in both modes  :P

But for me the biggest difference is that in crop mode, the footage can be tweaked in post like it was a normal raw photo image.
No moire, no alliasing, just pristine sharp pictures  8)
In anamorphic mode, you have to be careful when tweaking your footage in post, too much (local) contrast or sharpness and you get jagged edges.
Anamorphic is softer compared to crop to begin with, but not much you can do about it, trying to get some detail back and you'll get this:
Quote from: Jonneh on July 18, 2021, 09:31:28 AM
but I find I consistently have artefacts (coloured pixel blocks and jaggies) in tree branches against a bright sky that are visible at normal viewing distances, which has somewhat put me off those modes

Lately I'm trying to experiment a little with anamorphic mode, you can get it to look good, no jagged edges and such, but it won't be as sharp as crop mode.

What works best for me is to export the MLV as a DNG image sequence, do some standard processing in RawTherapee and export as PNG files.
So after I have my PNG image sequence I use FFmpeg to make a correct aspect ratio movie file out of it.


ffmpeg -i M27-1724_frame_%06d.png -filter:v "scale=3840:2160:sws_flags=gauss"  -c:v libx264 -r 25 -pix_fmt yuv420p -crf 17 Output.mp4

The above works for an image sequence that is named M27-1724_frame_ ...and 6 digits... with png extension.
You could also stretch a movie file instead, of course one that isn't stretched yet:

ffmpeg -i Input.mp4 -filter:v "scale=3840:2160:sws_flags=gauss"  -c:v libx264 -r 25 -pix_fmt yuv420p -crf 17 Output.mp4


The "gauss" option in scaling works best to avoid jagged edges and weird color artifacts when unstrecthing.
FFmpeg has many more options for scaling, for example lanczos, but those are a little sharper and introduce artifacts.
#58
Camera Emergency Department / Re: 6D bricked?
July 12, 2021, 05:58:11 PM
Not sure if you googled on err80 canon, but some say it happens due dust behind the memorycard door, maybe some dust shorting some pins ?

Other say you should try deattach and reaatach the lens(see if something is wrong with those metal contact pins.

Before going to Canon I would try some of the stuff found by googling err80 Canon.
#59
Camera Emergency Department / Re: 6D bricked?
July 12, 2021, 04:03:08 PM
Probably some hardware defect.
But out of curiosity, what happens when you use no sd card at all ? Does the camera work, can you enable liveview, does err 80 still show up ?
#60
@calintwf, sorry for the late reply  :P

About builds for ML, there are roughly three build options:

normal nightly build on the ML downloadpage https://builds.magiclantern.fm
Experimental builds, best for 6d is the croprec4K build https://builds.magiclantern.fm/experiments.html
And there is the custom build for 6d, which is basically the croprec4K build from the experimental builds page, but with added resolutions options for the crop rec module and the SD_UHS speed hack module.

-Nightly build from downloadpage
probably most stable build, but lacks many for raw video options like 10/12 bit raw video (only 14 bits) and lacks lossless raw recording for raw video.

-experimental croprec4k build from ML downloadpage:
In this build the lossless raw recording is added, as well as lower bit recording options in lossless.

-custom build.
Link to latest build for 6d(https://drive.google.com/file/d/128mnuStzJcuCa71pmnPl6XOuwVB_LNKr/view?usp=sharing) as seen on this site Walter posted https://wiki.magiclantern.fm/reddit:progress_bar

Most interesting build available for 6d, if you're going for raw video, the custom builds are the only ones with SD_UHS speed hack module in it.
This improves the write speed, so raw video in normal modes becomes continuous, even in 14 bit lossless.
Probably even continuous in 14 bit lossless in full 1824x1216 (3:2 whole sensor view).
You need SD card that can handle those speeds and is compatible with the camera (Sandisk extreme pro with 95mb/s or 170mb/s on the labels)

Also, there is a whole lot of more options in crop_rec module menu. for example 2880x1200@25 fps or 2560x1440@24fps.

Furthermore, the dual iso module works in this custom build for photo and video, not sure if dual-iso works in the two other builds.





#61
I think something changed from 1.1.3 to 1.1.6 on 6d.
Anyway, the  'ISOless PH err(3)' for 6d is fixed in the builds I uploaded the last couple of years, although those aren't available on the experimental downloadpage.

In this post there's a linkt to the latest build for 6D I uploaded, should work for dual iso:
https://www.magiclantern.fm/forum/index.php?topic=25782.msg229094#msg229094

But be aware that this is a experimental build, this build also contains the SD_UHS speed hack module and has a special crop_rec module with more resolution options.
To know how it all works, you might want to read the whole topic, it's only 6 pages, so it's not that much. But a lot of info in there.
https://www.magiclantern.fm/forum/index.php?topic=25782.msg223031#msg223031

Comes to mind that the dual iso module in these builds should be compatible with the 4k build on the experimental downloadpage, so if you don't want to use all the stuff in the new build, you could copy the 'dual_iso.mo' in the modules folder of my build and overwrite it to the 4k experimental build you are using from the downloadpage.

#62
Hello and welcome to the forum,

Point 1, yes that is possible, but not for higher resolution options in crop_recording.
           -So if you want normal liveview with exact composition, max resolution is 1824x1026 (the same resolution Canon uses for normal 1080p mov recording)
BUT
There is one thing though, for continuous raw recording you need more.
You need the SD_UHS module activated (available in the latest build for 6d in this forum) and a SD card that can handle the write speed needed.
Your card must be able to have a write speed of about 90Mb/s. Not all cards have the ability to write at ~90Mb/s.
The Sandisk extreme pro UHS-I U3 V30 170MB/S series give good results. (you don't need to buy the Sandisk extreme pro UHS II SDXC 300MB/S series, the 6d can't make use of the extra speed UHS II gives)
Also the older, but maybe still available, sandisk extreme pro UHS-I U3 95MB/S are also good.
You can search the forum for SD_UHS module and which cards work and which not, but the Sandisk extreme pro with either 95Mb/s or 170Mb/s on the label should certainly work.

If you have the above you should be able to have continuous raw recording:
1824x1026x 14 bit lossless compressed raw, for 24 and 25 frames per second, 30 fps might work, but the write speed needed might just be too much, but you could always step back to 12 bit lossless raw recording if you need 30 fps to be continuous.

Point 2:

Dynamic range/noise/color is best in normal 1824x1026 resolution mode (not crop or 5x zoom mode).
This because horizontal pixelbinning is done in this mode (the 1824 horizontal pixels are actually 5472 pixels read and pixelbinned to 1824, so each pixel is actually combined info from 3 pixels)
The crop and high resolution modes have less little less quality (dynamic range/noise/color) since there is no pixelbinning happening, but this is mostly noticable when high iso is used, I doubt if you experience any difference up to iso 800.
#63
No doubt rawtype 0x10 is in most scenarios the best.

Without rawtype 0x10, there is no crop_rec module. Couldn't live without it   :D
It also gives about half a stop more dynamic range compared to 0x12 (which suggest some sort of darkframesubstraction)

But there is one field where 0x12 is the better option and that is lowlight in combination with high iso (3200-6400).

It's an interesting niche option for very few scenarios. But it's good to know it exist.


#64
If I'm correct topicstarter has a 5d3.

For best results in lowlight, you want to gather as much light as you can so:
Make shutter speed as low as possible, probably 1/33th of a second.
Shoot with the lens wide open(max aperture), the lower the F-number the better, depends on the lens, but probably F 3.5 or lower.
(Consider buying a lens with a big aperture, for example Canon 35mm I.S. F2.0)
As stupid as it sounds, but if you need it, don't be afraid to use high iso numbers like 3200 or 6400 (6400 max)
When in low light situations, you're better of with a right epxosure with iso 6400, then with a wrong exposure at iso 800 and then have to bump exposure in post proces.

Other things that help, shoot in normal pixelbinning mode, 1920x1080.
4K options are nice, but it's much noisieer because there is no pixelbinning done.
Pixelbinning helps in reducing noise, especially on the 5d3 which bins both horizontal and vertical.

So
Shutter speed of 1/33th seconds
Wide open aperture (lowest F number)
High iso, like 3200-6400
1920x1080 in pixelbinning normal mode

And there is one other thing which helps a lot on the 6d, probably also on the 5d3, but it's not in the standard builds.
But since crop_rec 4k recording options became available, ML switched from rawtype stream 0x12 to 0x10.
Rawtype 0x12 doesn't work in altered crop modes.(only in vanilla crop modes when 5x zoom is used without crop_rec module)

Rawtype 0x12 is much cleaner (at least on the 6d that is, but my guess it's also the case for other cams).
With rawtype 0x10, you will see vertical lines(vertical bands) when using high iso on low light scenes, when rawtype 0x12 is used, these vertical banding is gone.
My guess is that Rawtype 0x12 is the cleanest rawtype where Canon performs some sort of darkframesubstraction in camera.

In the source code of magiclantern you can find "raw.c" in the "src" directory.
In raw.c you can find this line

#undef RAW_DEBUG_TYPE   /* this lets you select the raw type (for PREFERRED_RAW_TYPE) from menu */


change the "#undef" to "#define" and compile a build.


#define RAW_DEBUG_TYPE   /* this lets you select the raw type (for PREFERRED_RAW_TYPE) from menu */


When doing this you get an option in the debug menu to change rawtype to whatever you want, default is 0x10, but if you set it to 0x12 and record high iso, like 6400, you still get pretty good results.



#65
General Help Q&A / Re: App for viewing Code
March 09, 2021, 12:40:21 PM
Quote from: a1ex on March 09, 2021, 07:52:33 AM
That command will output the actual image data encoded in the CR2 file, into a 16-bit PPM

ppm you say, interesting, easy to modify.
Is there anyway to convert such a ppm file back to DNG or CR2 ?

Still a big fan of this script:
https://www.magiclantern.fm/forum/index.php?topic=20999.msg193367#msg193367
Curious if it works for ppm files with raw data.
I know, there are other programs out there which can average out multiple raw files, but this script works really well and is easy to modify to do a Median output instead of mean.

#66
The adtg module can be downloaded seperate:
https://builds.magiclantern.fm/modules.html

The adtg module is at the bottom of the page, I think it would work with the build you're using now.

But you can't use it while enabling high resolution modes or other crop_rec presets, best to turn them off while using adtg module.
High resolution crop modes use overriding registers just as you can do with the Adtg module, so when using both at the same time you're not really sure if your adtg override settings are set or not.

And in case of weird shit, be prepared to pull the battery to prevent bricking your camera  :P
#67
Sorry for the late reply  :D

QuoteEDIT: when I turn off mlv_rec it does not show an error but this way I can not use RAW mode. What is the sollution to this?
For raw recording you either use mlv_rec or mlv_lite, you can't use them both.
mlv_lite supports lossless compression, so use of mlv_lite is advised. So best to not enable mlv_rec module.

Quote1)  I tried to use the 1x3 preset "5496x1960". When reviewing it at home the video looks not sharp and kinda blurry. Any ideas why this happens?
The 1x3 presets are not supersharp, the reason, the data is not saved as 5496x1960 but as 1832x1960 resolution. The sensor does horizontal pixelbinning, 3 pixels become one.
So the sensor does really readout 5496x1960 in pixels, but passes this data on as (5496/3 pixelbinning)= 1832 horizontal pixels x 1960 vertical pixels.
In post, for example in MLV_App, these 1832 horizontal pixels are stretched to the original 5496 pixels for normal aspect ratio.
So 1x3 is not as sharp as you would expect from the resulting resolution, because some trickery is used that is available at hardware level of the Canon camera.

Quote2) When I shoot in 1x1 with 5x crop i can get a resolution of 2560x1440. I need to upscale this but which is the best way to do this?
In my experience the free software, DaVinci Resolve from Blackmagic does a really good job for upscaling video. (for free, download the normal version, the studio version is the paid one)
It's not that intuitive to use, but there are a lot of tutorials availabe on youtube.
https://www.blackmagicdesign.com/products/davinciresolve/

Quote3) When I am trying to shoot in 1x3 I can choose the preset "4896x2160" but then there are only magenta, pink lines across the Live View. Any ideas why? 
Unfortunately, this is normal  :P 
I couldn't get normal liveview to work in this mode, you could however use ML preview to see what the recording will be like.
You can choose different preview options in the 'RAW video' submenu. It's on the MOVIE tab of Magic lantern menu, highlight the 'RAW video' option and press Q button on camera.
Now the 4th option from above should show Preview, here you can set the option from 'real-time' to 'framing', whith the option framing selected, you should see a low resolution preview of your liveview (it's a little slow in FPS).
Another option, you could switch to 'framing' by doing a half press on the shutter button, while doing half press, you should see a preview.
I like this option, I use the half press to check the framing, and press record button, you can even do half press of the shutter button while filming, to check the framing.


#68
The GPS in the 6D is known for draining the battery while idle, or even off.
So for longer battery live, turn GPS off in Canon menu.

There is an option to not load Magic lantern at startup of the camera.
I believe you have to press and hold the 'set' button while switching on the camera.
#69
When using DNG's sequences in DaVinci Resolve, you can edit the raw parameters in the camera raw tab, it is within the 'Color' window, you have to click the camera icon on the left of the screen.
In here you set the raw paramaters like; white balance, exposure etc.
See left lower border of this screenshot:

#70
Raw Video Postprocessing / Re: UGLY clipping samples
February 06, 2021, 01:39:25 PM
Found one photo that's completely done in blue/violet lighting.
It's in the same folder as the other images:
https://drive.google.com/drive/folders/1XMrMDNt_-dy4K6cXUHxhU3w4MPedG8dL?usp=sharing

You can get some sort of natural colors when using crazy white balance values in your photo editor (in this case RawTherapee 5.8 ).
White balance = 60000
Tint = 10.000
Blue/red balance = 0.8


If you use standard white balance, as shot, it looks like this:

#71
Raw Video Postprocessing / Re: UGLY clipping samples
February 05, 2021, 11:02:59 PM
Uploaded some more examples in the same folder:
https://drive.google.com/drive/folders/1XMrMDNt_-dy4K6cXUHxhU3w4MPedG8dL?usp=sharing

About the negative luma and hard clipping, it also has to do with highlight reconstruction in software (reconstructions by using values from non clipped channels)
In my examples you'll find blown out highlights in the red/blue channel, while the green channel is almost black.
So...if software is gonna reconstruct highlight detail from the green channel(s), it has a real hard time doing that  :P

For highlight reconstruction, you should need some sort of minimum value in other channels to perform a nice detail reconstruction. If the value is below that threshold, it should not even try to reconstruct detail from other channels.
#72
Raw Video Postprocessing / Re: UGLY clipping samples
February 03, 2021, 03:07:01 PM
Diving some more into this, the above example is actually how the CR2 file is displayed in preview in MacOs.
As you can see, weird highlight clipping, where the reds and blues become suddenly darker intowards the lights. (The negative luma describe by Ilia in the first post)
Now, the file looks normal on Google drive.
Here's a side by side, Google drive on the left, MacOs on the right.



Opening the file in most raw editors, it looks perfectly fine...
Opening it up in Lightroom (in this case LR 5.7), on the camera calibration tab -> with "adobe standard" profile, it looks not that good.
Changing the profile to the Canon profiles, for example, the profile "Camera Neutral" it looks much better.
Going back "adobe standard" and changing the processing version from 2012 to 2010...you start crying  :P

So most software get's it right, some don't, like Adobe and MacOs.
#73
Raw Video Postprocessing / Re: UGLY clipping samples
February 03, 2021, 12:12:03 PM
Found some more examples, placed them in this folder on google drive.
https://drive.google.com/drive/folders/1XMrMDNt_-dy4K6cXUHxhU3w4MPedG8dL?usp=sharing

Most of the time you can fix those shots by adjusting white balance and tint, many times there is a sweet spot where the colors don't fight each other with hard clipping.
A little desaturation will help too.

Best example (image_3110.CR2) of how a straight out of camera jpg conversion would look:

#74
Raw Video Postprocessing / Re: UGLY clipping samples
February 03, 2021, 10:39:33 AM
@Ilia3101

I've got many concert photos with blue/purple led light...Blue/Purple is the worst :P

Here's one example of Example ;) :
https://drive.google.com/file/d/1vzKa3SS-ATFOof-zM1oqxwofxscwoIKR/view?usp=sharing

How it shows in google drive is not bad, but that's because I used a modified picture style preset on my camera with desaturation, apparently google drive reads these custom settings from the file and actually uses them, not bad.
If I open the file in Finder on MacOs, a standard picture style preset is used and you'll see your bad clipping.

I will look for more...



#75
Not sure what you mean with your last question ?

Quote
Any idea of crop_mode2?

What works for me for crop_mode is to go to raw video menu tab and then inside raw video options I choose preview option -> real-time.
This gives me 5x zoom Canon liveview in the high resolution modes.
Now the only problem is framing, to check framing, use half-press on the shutter button. When doing half shutter press, you'll see the actual framing (although a bit slow fps).
You can even do half shutter once in a while, while recording, to check framing.