MLV App 1.14 - All in one MLV Video Post Processing App [Windows, Mac and Linux]

Started by ilia3101, July 08, 2017, 10:19:19 PM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

50mm1200s

@Andy600 suggestion here:

Quote from: Andy600 on April 12, 2018, 02:17:28 PM
...you're also likely losing some color information when rendering to Prores 'AlexaLog' in MLVApp.

The matrices are originally from Adobe. MLVApp looks to be writing a single matrix (D65) which should be ok for most daylight shots but white balance accuracy would be improved a bit if it also included the tungsten matrix.

Couldn't find the tungsten matrix, so I already asked him about it.
Thanks the suggestion @Andy600, if you're reading this.

50mm1200s

So, another idea: improved tone mapping with Fattal method. There's a implementation here. That's really work looking into, even if it's too difficult to implement (doesn't seem to, rawtherapee has a working version), it is still very fun to read.

50mm1200s

Ok, so I've read some time about ffmpeg, and it doesn't seem to support custom colorspace/colormatrix, only the ones linked in documentation. I searched if avisynth has some script for conversions using colormatrix, but they don't. :(
It seems we are limited to 444XQ in Rec.2020 (10-bit). That's the maximum ffmpeg handles in ProRes, from the documents I've read.

Using the option "-pix_fmt yuv444p10le" together with profile 5 or 6 (444 and 4444XQ):

ffmpeg -i input.avi -c:v prores_ks -profile:v 5 -quant_mat 4 -pix_fmt yuv444p10le output.mov


Could'nt get profile 6 (supposedly 4444XQ) to work. Maybe my build is too old (version 3.4)
ffprobe log:

Stream #0:0(eng): Video: prores (ap4x / 0x78347061), yuv444p10le(progressive), 1920x1080, 142603 kb/s, 24 fps, 24
tbr, 12288 tbn, 12288 tbc (default)
    Metadata:
      handler_name    : DataHandler
      encoder         : Lavc57.107.100 prores_ks


Just a note: ffmpeg documentation suggests Kostya instead of Anatolyi, so it can be removed, right?


In our testing we've used the "prores" and the "prores_ks" encoders and found "prores_ks" to be the best encoder to use. It is the only one that supports the 4444 colorspace and although it may be slightly slower. The color quality of the videos produced by these two codecs was visually indistinguishable Because of the 4444 support we've decided to go with Kostya's version of prores.



Another note: I've found this website possibly useful.

reddeercity

Quote from: masc on April 12, 2018, 09:12:48 AM
@reddeercity: did you try this parameters with success? I tried them out and in current MLVApp version we also use that (set to bt709). But in my tests I can set whatever I want - the exported file looks identical. The only difference seems to be metadata inside the exported file (tested with MediaInfo).
No I haven't work with ffmpeg for a long time , I could try thou
Quote from: masc on April 12, 2018, 09:12:48 AM
   .......... in my tests I can set whatever I want - the exported file looks identical.
The only difference seems to be metadata inside the exported file (tested with MediaInfo).
That's right , you will see the differences in the scopes , remember the limitation of your computer monitor , most are BT709 Limited (16-235) so you won't
see the tones under 16 or the hi-lights above 235 in fact the video card will crush those values . You need to set & calibrate you monitor to Full Range wide gamut
In Win7 right click on the open desktop get to your color management and you get this


 
The profiles I hi-lighted are wide gamut & full range even the rec.709 but it's not wide gamut , I use sRGB gamma 2.1




And there the Viewing Conditions , I use D65 for sRGB and then I calibrate that profile , a have other profiles I use when I work with HDR/Wide Gamut .
You can only see what the monitor can support .
Quote from: masc on April 12, 2018, 09:12:48 AM
I found another parameter, e.g. -vf scale=in_color_matrix=bt601:out_color_matrix=bt709, this is visible in output.
Yes that right , bt601=SD color's  (standard definition) and bt709=HD color space but not limited , if you would have added color_matrix=bt709-16-235 , I think that's for 8bit prores .
These color spaces are viewable in all know monitors , and if you check them with scopes you will see the big differences -- try encoding to BT2020 , you still will not see the differences
until you start grading and pulling the hi-lights & shadows .

That's the biggest reason I had a dictated grading monitor,  https://www.asus.com/ca-en/Commercial-Monitors/PA238Q/
Quote100% sRGB  pre-calibrated with a maximum ΔE (Delta E) of less than 5.
Ensures precise reading of color input and guarantees excellent color fidelity
...... PA238Q's built-in internal 10-bit Look-up Table can produce greater depth for each RGB colors than 8-bit Look-up Table in conventional monitors.
Resulting in smooth gradation and accurate color resolution
I have it connected to either my Blackmagic UltraStudio SDI USB 3.0 thought the HDMI which has a preset calibrated NTSC rec709 color space PC/MAC
or on my real 5.1MP I use my AJA Capture card with break out box (HDMI) , there I always see the differences .
There is cheap version of what I have even blackmagic has a cheap hdmi monitoring card for around $125.00 with rec709 preset .
Sorry for the long post again , I hope that helps

masc

Thanks @reddeercity, that was very informative! I tried again many settings with ffmpeg. The parameters you wrote about: I tested bt709, nothing, and bt2020 for all 3 parameters. All files look identical, also with the waveform scope in FCPX. Only the metadata was different. Then I set the parameters back to bt709, and added this matrix code (this is the new version of matrix which can be used for more than 8bit, the old version (the code was different) was 8bit only). Now I see a tiny difference on my Monitor and I also see the difference in the scope. I would say, with this matrix operation I have more space in the shadows and a better quality when lifting the mids in FCPX. And using this matrix operation brings the clip very close to what AVFoundation exports.
5D3.113 | EOSM.202

bouncyball


masc

Quote from: bouncyball on April 14, 2018, 09:41:12 AM
Hmm... what matrix you're referring to?
-vf scale=in_color_matrix=bt601:out_color_matrix=bt709
It is also in our ffmpeg export function.
5D3.113 | EOSM.202


Danne

I
Quote from: masc on April 14, 2018, 01:47:48 PM
-vf scale=in_color_matrix=bt601:out_color_matrix=bt709
It is also in our ffmpeg export function.

Isn't ffmpeg output bt709 already as default? How to verify otherwise?

masc

Quote from: Danne on April 15, 2018, 02:10:44 PM
I
Isn't ffmpeg output bt709 already as default? How to verify otherwise?
From what I heard standard is bt601, but that may be wrong.
Quoteffmpeg always assumes the BT.601 colorspace when converting from RGB->YUV and from YUV->RGB.
I had clips with a very intensive red - it was set up as red in MLVApp, it was also the same red in exprted AVFoundation files, but it was orange/brown when exporting with ffmpeg. This was the point when I started searching in the net and I found that I am not alone with this. I then found to add this operation and since I tested that, the exported ffmpeg file looks identical to the MLVApp viewer (at least for me, please report, if it is not the same for you!).
5D3.113 | EOSM.202

masc

5D3.113 | EOSM.202

Danne

Great. a1ex pointed to a solution so let's fix it :).
Another thing. I tried exporting with native apple codec into prores444 and I notice audio isn't included. Correct? If an issue it's fast and easy to add audio to the finished file with ffmpeg lossles with acoded copy. Could this be added as a solution until audio gets added in av foundation?
I can give you the ffmpeg command later.

masc

Quote from: Danne on April 19, 2018, 12:03:01 PM
Great. a1ex pointed to a solution so let's fix it :).
So this is a bug in the file, or in MLVApp?

Quote from: Danne on April 19, 2018, 12:03:01 PM
Another thing. I tried exporting with native apple codec into prores444 and I notice audio isn't included. Correct? If an issue it's fast and easy to add audio to the finished file with ffmpeg lossles with acoded copy. Could this be added as a solution until audio gets added in av foundation?
I can give you the ffmpeg command later.
Yes, audio is not supported yet in our AVFoundation export. That's why we grey it out in the settings dialog. I tried it already to implement that some times but every time I failed. So I like your idea. That sounds a lot easier to realize! ;) If you have the command, that would help me! :) THX!
5D3.113 | EOSM.202

Danne

Not a bug in Mlv app but in cr2hdr/mlv_dump code itself when treating 12bit dualiso files.
https://www.magiclantern.fm/forum/index.php?topic=16040.msg196034#msg196034

Last I used this command it went like this:
ffmpeg -i INPUT.mov -i INPUT.wav -map 0:0 -map 1:0 -c copy OUTPUT.mov

masc

Quote from: Danne on April 19, 2018, 12:48:40 PM
Not a bug in Mlv app but in cr2hdr/mlv_dump code itself when treating 12bit dualiso files.
https://www.magiclantern.fm/forum/index.php?topic=16040.msg196034#msg196034
So bouncyball will fix it in the same way as in mlv_dump then...

Quote from: Danne on April 19, 2018, 12:48:40 PM
Last I used this command it went like this:
ffmpeg -i INPUT.mov -i INPUT.wav -map 0:0 -map 1:0 -c copy OUTPUT.mov
Great! Thx! Will add that as long as our AVFoundation does not export audio! ;)
5D3.113 | EOSM.202

Danne

Quote from: masc on April 19, 2018, 01:09:56 PM
Great! Thx! Will add that as long as our AVFoundation does not export audio! ;)
Cool!

Quote from: masc on April 19, 2018, 01:09:56 PM
So bouncyball will fix it in the same way as in mlv_dump then...
Fingers crossed.


bouncyball

Quote from: masc on April 19, 2018, 01:09:56 PM
So bouncyball will fix it in the same way as in mlv_dump then...
There is nothing like this ever been implemented in mlv_dump. Data needs to be scaled from existing 14bit black to real 14bit white by the method proposed by a1ex before feeding into existing unmodified dual iso processor. Now MLV App supports this. Danne will test all kind of imaginary bit depths and reports back.

Edit:

cr2hdr can be modified to scale if needed and convert to 20bit simultaneously. But I think this will be done by a1ex himself.

mlv_dump can be modified like this: if --dual-iso (already existing switch) specified, checks should be done to reveal whether source is restricted bit depth lossless raw or not and, scale data accordingly (also update white point) before saving dual iso DNG.

masc

Yeha! Thx @Danne again! AVFoundation export WITH AUDIO is working! Check out latest revision. I like this trick! ;)

And thx @bouncyball for the fast fix!
5D3.113 | EOSM.202

Danne

Great masc :)! I used that trick when hacking some export through command line and apple compressor and could never get audio right but ffmpeg to the rescue.
@bouncyball. I would love to get that --dual-iso switch into mlv_dump so we are being able to differ all them bits also in dualiso. Tell me if you work on something and I put it through some tests.
Now, let´s see if I can remember how to compile the latest Mlv app achievements...


Danne

@masc
Tried adding audio with av foundation coded and in my case the mov file gets erased after conversion. Not sure what is going on.
Also suggestion to have Export audio already ticked as default and user untick when not wanting audio.

bouncyball

@Danne

Code updated a bit to lower scaling and white level for 11/12 bit dualiso clips.

masc

Quote from: Danne on April 20, 2018, 08:24:27 AM
@masc
Tried adding audio with av foundation coded and in my case the mov file gets erased after conversion. Not sure what is going on.
Also suggestion to have Export audio already ticked as default and user untick when not wanting audio.
It seems your ffmpeg does not work right. Normally the workflow is this:

  • Export video "with chosen name" using AVFoundation
  • Rename it to "*_temp.mov"
  • Copy audio file and *_temp.mov to final video+audio file "with chosen name" using ffmpeg
  • Delete audio and temp file
If you have no file, ffmpeg did not export anything. I tried your uploaded version and my version: yours does what you wrote and my version works... no idea why, I can't see an error in your package.

Export audio is enabled by default and the last setting chosen by the user will always be saved. So if it is off, you switched it off, or one time you have chosen a codec where audio export is impossible (this was AVFoundation in past only, but this setting is still saved from one version to another on your computer).
5D3.113 | EOSM.202

Danne

@masc
Ok, I will check some more. Thanks for clarifying about audio switch.


@bouncyball
Tried some more with your latest update. Just to make sure. Differences between bits seems higher than should be. Is dynamic range white level affected(cut) as bits are changing? Seems there´s information missing but I could be wrong. Tested a 11bit dng in adobe camera raw and dynamic range was preserved better. Here are examples from Mlv app when opened without grading:

11bit lossless


12bit lossless


14bit lossless


11bit darkened(check pinks)


masc

11bit darkened: did you enable highlight reconstruction? I downloaded your file and I can reconstruct correct highlights without pink.
5D3.113 | EOSM.202