Author Topic: MLV App 1.14 - All in one MLV Video Post Processing App [Windows, Mac and Linux]  (Read 1206918 times)

Kanakori

  • Freshman
  • **
  • Posts: 51
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1525 on: June 27, 2018, 06:05:14 PM »
I guess he did not put mlvapp and ffmpeg binaries into same folder.
It's just a quick and temporary hackish patch to force is_dual_iso (always) = 1.

Edit: I can export that clip to whatever I want (btw it is ~60fps dual iso MLV).

It seems to work now! You guys are the best. Thanks for the help. If anything else comes up I'll let you know.

@masc I export to prores 444

masc

  • Contributor
  • Hero Member
  • *****
  • Posts: 2069
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1526 on: June 27, 2018, 08:32:58 PM »
@Danne: is it bad to do it this way:
Code: [Select]
ffmpeg -i M05-0608.mov -filter_complex "[0:v] boxblur=1 [tmp]; [0:v][tmp] blend=all_mode='overlay':all_opacity=0.5" -f matroska - | \
ffmpeg -i - -vf minterpolate=50,tblend=all_mode=average,framestep=2 -f matroska - | \
ffmpeg -i - -vf minterpolate=50,tblend=all_mode=average,framestep=2 -f matroska - | \
ffmpeg -i - -c:a copy -c:v prores_ks -profile:v 2 -pix_fmt yuv422p10 -color_primaries bt709 -color_trc bt709 -colorspace bt709 -vf minterpolate=50,tblend=all_mode=average,framestep=2,unsharp=7:7:0.8:7:7:0 out.mov
For me that works. Looks slightly more blurred than without the blur box (so for me as expected), but a lot brighter... is it because I use the wrong stream, or is it the same in your tests?
Edit: tested again your command with ...[1]... and it looks the same for me as the above command. So the blending seems to be not right.
Edit2: color looks right, when changing overlay mode to this, but it looks very blurred, and there is a boarder:
Code: [Select]
ffmpeg -i M05-0608.mov -filter_complex "[0:v] boxblur=1 [tmp]; [0:v][tmp] overlay=50:50" -f matroska - | \
ffmpeg -i - -vf minterpolate=50,tblend=all_mode=average,framestep=2 -f matroska - | \
ffmpeg -i - -vf minterpolate=50,tblend=all_mode=average,framestep=2 -f matroska - | \
ffmpeg -i - -c:a copy -c:v prores_ks -profile:v 2 -pix_fmt yuv422p10 -color_primaries bt709 -color_trc bt709 -colorspace bt709 -vf minterpolate=50,tblend=all_mode=average,framestep=2,unsharp=7:7:0.8:7:7:0 out.mov

@Kanakori: good to know it works! Have fun! ;)
5D3.113 | EOSM.202

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7659
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1527 on: June 27, 2018, 08:59:32 PM »
Will test later. Yes, also getting brighter results. Maybe not optimal but ideas could lead to more ideas :).

masc

  • Contributor
  • Hero Member
  • *****
  • Posts: 2069
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1528 on: June 27, 2018, 09:03:14 PM »
@Danne: Look this: slightly more blurred and correct color:
Code: [Select]
ffmpeg -i M05-0608.mov -filter_complex "[0:v] boxblur=1 [tmp]; [0:v][tmp] blend=all_mode='normal':all_opacity=0.5" -f matroska - | \
ffmpeg -i - -vf minterpolate=50,tblend=all_mode=average,framestep=2 -f matroska - | \
ffmpeg -i - -vf minterpolate=50,tblend=all_mode=average,framestep=2 -f matroska - | \
ffmpeg -i - -c:a copy -c:v prores_ks -profile:v 2 -pix_fmt yuv422p10 -color_primaries bt709 -color_trc bt709 -colorspace bt709 -vf minterpolate=50,tblend=all_mode=average,framestep=2,unsharp=7:7:0.8:7:7:0 out.mov
The higher the opactiy value, the sharper the result.

Edit: it is commited to the MLVApp repos, so you can try it out. To play with the values, look at line 1472 in MainWindow.cpp. I think we have to raise opacity in order to get a sharper image.
5D3.113 | EOSM.202

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7659
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1529 on: June 28, 2018, 01:25:21 AM »
I run it like following:
Code: [Select]
        QString pass3 = QString( "-filter_complex \"[0:v] boxblur=1:cr=4:ar=4 [tmp]; [0:v][tmp] blend=all_mode='normal':all_opacity=0.6\" Cleans out chroma and alpha channel and adds a slight blur. It slightly less sharper than 3 pass + unsharp mask. Might be useful for hard cases.

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7659
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1530 on: June 28, 2018, 02:32:58 AM »
Found this good old wheel again.

Original
https://bitbucket.org/Dannephoto/magic-lantern/downloads/Screen%20Shot%202018-06-28%20at%2002.25.18.png_scaled.jpg


ffmpeg cleaning
https://bitbucket.org/Dannephoto/magic-lantern/downloads/Screen%20Shot%202018-06-28%20at%2002.31.28.png_scaled.jpg







Following command:
Code: [Select]
        QString pass3 = QString( "-filter_complex \"[0:v] boxblur=2:cr=5:ar=5 [tmp]; [0:v][tmp] blend=all_mode='normal':all_opacity=0.6\" -f matroska - | %1 -i - -vf minterpolate=%2,tblend=all_mode=average,framestep=2 -f matroska - | %1 -i - -vf minterpolate=%2,tblend=all_mode=average,framestep=2 -f matroska -  | %1 -i - -vf minterpolate=%2,tblend=all_mode=average,framestep=2 -f matroska - | %1 -y -i - " ).arg( ffmpegCommand ).arg( locale.toString( getFramerate() * 2.0 ) );
        program.insert( program.indexOf( "-c:v" ), pass3 );

Kanakori

  • Freshman
  • **
  • Posts: 51
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1531 on: June 28, 2018, 05:38:33 AM »
Ok the dual iso problem seems solved but a new one came about...



How can I take that off?

olofen

  • New to the forum
  • *
  • Posts: 46
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1532 on: June 28, 2018, 08:17:34 AM »
Quote
If you work in Photoshop, chose cDNG, this is unprocessed (or at least lossless) and has full raw info availlable.

What is the difference between uncompressed and lossless cDNG and what would you recommend me to continue with into Photoshop where I will work with video as with my former art images?
EOS 5D Mark III 1.2.3
Mac OS High Sierra

50mm1200s

  • Member
  • ***
  • Posts: 177
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1533 on: June 28, 2018, 08:36:35 AM »
Ok the dual iso problem seems solved but a new one came about...
How can I take that off?

Try the "Highlight Reconstruction" feature. If it doesn't work, maybe someone here could point a solution, but I would say you'll need to blow the highlights until the artifacts are gone (using curves).

masc

  • Contributor
  • Hero Member
  • *****
  • Posts: 2069
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1534 on: June 28, 2018, 09:03:52 AM »
@Danne: really nice! Do you want me to add "boxblur=1:cr=4:ar=4" or better "boxblur=2:cr=5:ar=5"?

@Kanakori & 50mm1200s: Yes, this are very crushed highlights. Normally they get pink only (because the green channel clips only mostly)... here it seems all channels are clipped, so they have any color. Maybe also dualIso makes it more strange. Blown highlights are no problem in non-dual-iso, but are a huge problem in dual-iso-clips. Highlight reconstruction will work only slightly (if it works at all in this special case). So the only way is to raise light strengh. But I am not sure if that works, because the artifacts are very dark.

@olofen: from the quality side lossless and uncompressed cdng is the same, lossless is compressed without quality-loss (as the name tells). So uncompressed could be a little faster (don't needs to be uncompressed when used), lossless is smaller on your harddisk.
5D3.113 | EOSM.202

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7659
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1535 on: June 28, 2018, 09:14:33 AM »
Hi masc. I´d say add boxblur=2:cr=5:ar=5 since the 3xminterpolate + unsharp already does the heavy stuff. Last setting should be considered last resort so why not go "all in" here :). Let me check if  little extra unsharpen helps a bit stay tuned...

bouncyball

  • Contributor
  • Hero Member
  • *****
  • Posts: 850
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1536 on: June 28, 2018, 09:27:04 AM »
Ok the dual iso problem seems solved but a new one came about...
Try highlight reconstruction.

Actually I would never use dual iso for quality video, it sure adds dynamic range but also introduces lots of aliasing. It is very useful for stills but not very good for video.

bb

bouncyball

  • Contributor
  • Hero Member
  • *****
  • Posts: 850
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1537 on: June 28, 2018, 09:29:22 AM »
Found this good old wheel again.
This method does the trick for sure but unfortunately also wipes quite an amount of useful details.

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7659
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1538 on: June 28, 2018, 09:30:47 AM »
Yup, that´s the price to pay...

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7659
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1539 on: June 28, 2018, 09:47:23 AM »
@masc
Could the settings be following for this last resort thingy:

Code: [Select]
            moireeFilter.append( QString( "unsharp=5:5:0.6:5:5:0," ) );
Code: [Select]
        QString pass3 = QString( "-filter_complex \"[0:v] boxblur=2:cr=5:ar=5 [tmp]; [0:v][tmp] blend=all_mode='normal':all_opacity=0.6\" -f matroska - | %1 -i - -vf minterpolate=%2,tblend=all_mode=average,framestep=2 -f matroska - | %1 -i - -vf minterpolate=%2,tblend=all_mode=average,framestep=2 -f matroska - | %1 -i - -vf minterpolate=%2,tblend=all_mode=average,framestep=2 -f matroska - | %1 -i - -vf minterpolate=%2,tblend=all_mode=average,framestep=2 -f matroska - | %1 -y -i - " ).arg( ffmpegCommand ).arg( locale.toString( getFramerate() * 2.0 ) );
        program.insert( program.indexOf( "-c:v" ), pass3 );

By the way. I really dig your lut implementation....

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7659
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1540 on: June 28, 2018, 10:06:55 AM »
Another addition. Since matroska is set to x264 codec we can preserve detailt a lot by pipe to 0 compression:
-c:v libx264 -preset ultrafast -crf 0
Above line gives far better results. Tested like below on last resort setting. The ultrafast 0 setting should be added to all aliasing processing settings though...

Note my change to opacity setting here as well(last resort setting only)

test scenario:
Code: [Select]
        QString pass3 = QString( "-filter_complex \"[0:v] boxblur=2:cr=5:ar=5 [tmp]; [0:v][tmp] blend=all_mode='normal':all_opacity=0.5\" -c:v libx264 -preset ultrafast -crf 0 -f matroska - | %1 -i - -c:v libx264 -preset ultrafast -crf 0 -vf minterpolate=%2,tblend=all_mode=average,framestep=2 -f matroska - | %1 -i - -c:v libx264 -preset ultrafast -crf 0 -vf minterpolate=%2,tblend=all_mode=average,framestep=2 -f matroska - | %1 -i - -c:v libx264 -preset ultrafast -crf 0 -vf minterpolate=%2,tblend=all_mode=average,framestep=2 -f matroska - | %1 -i - -c:v libx264 -preset ultrafast -crf 0 -vf minterpolate=%2,tblend=all_mode=average,framestep=2 -f matroska - | %1 -y -i - " ).arg( ffmpegCommand ).arg( locale.toString( getFramerate() * 2.0 ) );
        program.insert( program.indexOf( "-c:v" ), pass3 );


EDIT: this setting should be optimal for speed and detail preservation:
-c:v libx264 -preset ultrafast -crf 10

masc

  • Contributor
  • Hero Member
  • *****
  • Posts: 2069
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1541 on: June 28, 2018, 12:05:17 PM »
@Danne: I added your changings to the repos. Where is the difference between -crf 0 and 10? Both looks way sharper than before! ;) The blurbox indeed is very blurry...
5D3.113 | EOSM.202

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7659
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1542 on: June 28, 2018, 12:30:56 PM »
Thanks. Well, last word on the blurbox hasn't been said yet.
Crf setting 0 is lossless then comes compression. Around 17-20 shows degradation around visually none imo. Crf 10 is also faster for some reason...

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7659
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1543 on: June 28, 2018, 12:55:58 PM »
@masc
Retested and refined/pushed the "last resort" setting to this instead:
Code: [Select]
        QString pass3 = QString( "-filter_complex \"[0:v] boxblur=1:cr=5:ar=5 [tmp]; [0:v][tmp] blend=all_mode='normal':all_opacity=0.7\" -c:v
Thanks again for fixing all quirks around ffmpeg in your code.

masc

  • Contributor
  • Hero Member
  • *****
  • Posts: 2069
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1544 on: June 28, 2018, 01:13:35 PM »
@masc
Retested and refined/pushed the "last resort" setting to this instead:
Code: [Select]
        QString pass3 = QString( "-filter_complex \"[0:v] boxblur=1:cr=5:ar=5 [tmp]; [0:v][tmp] blend=all_mode='normal':all_opacity=0.7\" -c:v
Thanks again for fixing all quirks around ffmpeg in your code.
Looks good! Thanks for your work and your tests!  ;D
5D3.113 | EOSM.202

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7659
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1545 on: June 28, 2018, 01:18:37 PM »
I´m sure more tests are to come  8)

Original


3x minterpolate + unsharp


Boxblur, blend + x5 minterpolate + unsharp



Kanakori

  • Freshman
  • **
  • Posts: 51
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1546 on: June 28, 2018, 05:29:06 PM »

@Kanakori & 50mm1200s: Yes, this are very crushed highlights. Normally they get pink only (because the green channel clips only mostly)... here it seems all channels are clipped, so they have any color. Maybe also dualIso makes it more strange. Blown highlights are no problem in non-dual-iso, but are a huge problem in dual-iso-clips. Highlight reconstruction will work only slightly (if it works at all in this special case). So the only way is to raise light strengh. But I am not sure if that works, because the artifacts are very dark.


I believe I used that option... on mlvproducer that doesnt happen even with dual iso option activated, but I don't like the workflow on there and I can't get the same results. However the fact that these spots don't show up in mlvproducer might mean the problem doesn't come from the clips?

masc

  • Contributor
  • Hero Member
  • *****
  • Posts: 2069
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1547 on: June 28, 2018, 07:04:17 PM »
I believe I used that option... on mlvproducer that doesnt happen even with dual iso option activated, but I don't like the workflow on there and I can't get the same results. However the fact that these spots don't show up in mlvproducer might mean the problem doesn't come from the clips?
I can't tell you if it comes from the clip - I don't have it ;) And I never saw such artifacts on highlights in any clip. MLVProducer has a different highlight reconstruction, maybe this one is more effective against such extremly crushed highlights. I can't tell how it works, because I never saw the source code, but I know from my tests it works different ;)
Please upload some frames (cut it and export as MLV), so I could have a look what happens...

@Danne! NICE! 5x??? :P
5D3.113 | EOSM.202

feureau

  • Hero Member
  • *****
  • Posts: 604
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1548 on: June 29, 2018, 07:15:56 AM »
MLV App keeps failing to complete batch export.

Exporting multiple clips using Export Selected Clips (Ctrl-e) when darkframe subtraction enabled will only export one file or two and will fail to load any other files.

Even selecting other vids in the session box after the warning box is closed will still fail to load vids. (giving out file not found error)

bouncyball

  • Contributor
  • Hero Member
  • *****
  • Posts: 850
Re: Making a New MLV Processing App! [Windows, Mac and Linux]
« Reply #1549 on: June 29, 2018, 08:29:56 AM »
Interesting...

@masc: can you reproduce this?