Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th May 2019, 14:53   #1  |  Link
stormy1777
Registered User
 
Join Date: Jul 2002
Posts: 241
Filter suggestion for avisynth/VirtualDub2 of source with "fata morgana"

Got a sample clip:

https://anonfile.com/C7Ffyar1n7/Filter_Movement_mp4

of landscape in "movement" that appears from hot air I think.. sort of "Fata Morgana".. (above is not the source, it is encoded in x264 8bit, which is also my target encode)

would love to get some ideas on what kind of builtin filter (VirtualDub2), or avisynth script can be used to "process" this and reduce file size a bit yet maintain quality.

Thanks for any possible tips.

Source material is:

Code:
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (mp42/avc1/CAEP)
File size                                : 2.34 GiB
Duration                                 : 5 min 40 s
Overall bit rate                         : 59.0 Mb/s

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L5.1
Format settings                          : CABAC / 2 Ref Frames
Format settings, CABAC                   : Yes
Format settings, RefFrames               : 2 frames
Format settings, GOP                     : M=3, N=24
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 5 min 40 s
Bit rate                                 : 58.9 Mb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 50.000 FPS
Standard                                 : Component
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.568
Stream size                              : 2.33 GiB (100%)
Language                                 : English
Color range                              : Full
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709
Codec configuration box                  : avcC
stormy1777 is offline   Reply With Quote
Old 14th May 2019, 18:14   #2  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Getting warning about a deceptive site from your link, I aint gonna download it.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 14th May 2019, 18:30   #3  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by StainlessS View Post
Getting warning about a deceptive site from your link, I aint gonna download it.
I just dl'd it, no problem, no complaints.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 14th May 2019, 19:16   #4  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Warning from fireFox 66.xx, Settings : Security : Deceptive Content and Dangerous Software Protection
(via some Google service about deceptive content). Might just have been because of the AnonFile.com name.

Although I was a little sceptical myself about a 1920x1080@50.0FPS of duration 5:xx minutes (which is what source file seemed to be) and with output file size of about 3.5 MB.

EDIT: Firefox "Learn About" page on the Deceptive content stuff:- https://support.mozilla.org/en-US/kb...urce=inproduct
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 14th May 2019 at 19:22.
StainlessS is offline   Reply With Quote
Old 14th May 2019, 19:31   #5  |  Link
stormy1777
Registered User
 
Join Date: Jul 2002
Posts: 241
*Stainless*, original source is:

File size : 2.34 GiB

I clipped just a short segment and encoded it down to 3.5MB, just to give you an idea of the "movement" or "flickers" that appear in the sky/wires..

any idea on which filter/avisynth script would handle it best?
stormy1777 is offline   Reply With Quote
Old 14th May 2019, 20:00   #6  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
I went back to have another go, downloaded the named file (which turned out to be an html file, could not find real file name embeded in the html),
went back again for yet another go, and the constant refreshing of page made me shy off from download.
I guess that I'm just not as courageous as the brave yet grouchy one.



Stormy, suggest that you use another file host in future, that one is just a little too scarey.

[I tend to get alarmed whenever anything unusual happens, eg when you try leave site and it will not let you until you
click "Are you sure ?", "Leave Page" button, I tend to pull plug on connection and force kill the browser just to avoid pressing the button that it seems desperate
for me to press. Paranoia rules OK].
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 14th May 2019 at 20:21.
StainlessS is offline   Reply With Quote
Old 14th May 2019, 21:19   #7  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
I am under WinXP and using good old Opera 12 with a custom hosts file from winhelp2002.mvps.org/hosts.htm.

The only annoyance with this site is that after the first click on the file I get redirected (opening a new tab) to some advertising site. Clicking on the file for a second time downloads it without any issues. So I believe this is a little too much paranoia...
manolito is offline   Reply With Quote
Old 14th May 2019, 21:39   #8  |  Link
mariush
Registered User
 
Join Date: Dec 2008
Posts: 589
I made a copy of the video here, for those reluctant: http://savedonthe.net/download/2427/..._Movement.html
mariush is offline   Reply With Quote
Old 15th May 2019, 05:09   #9  |  Link
stormy1777
Registered User
 
Join Date: Jul 2002
Posts: 241
Thanks Mariush

so sorry, I run no-script (firefox addon), and so all these noisy things do not really appear, anyways, I can also upload the original SOURCE, not the encoded, but it's pretty much the same video, just much much larger.. the question is there any "encoding" scheme that can "cope" with such almost "watery" or "vapory" movement in the sky
Thanks...
stormy1777 is offline   Reply With Quote
Old 15th May 2019, 09:33   #10  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 775
Just saw Neat Video post and they claim to deal with "heat haze". https://blog.neatvideo.com/post/nv5-overview
No idea if this is available from plugin.
__________________
VirtualDub2
shekh is offline   Reply With Quote
Old 15th May 2019, 09:36   #11  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
I overcame my cowardice and bravely downloaded, thanx Mariush.

So basically 'Heat Haze'. [I'de never heard the term Fata Morgana, looked Heat Haze up and it got me to Wikipedia Mirage:- https://en.wikipedia.org/wiki/Mirage].
I would not have any idea how to simulate heat haze.

Regarding the wikipedia Mirage link, Fata Morgana paragraph, "atmospheric duct" hilited popup, I think I once experienced that myself.
Back in 1981, I was stayng at a guest house in Bedfordshire countryside, about 5 of us were watching an Italian movie on analogue TV.
Due to weird atmosperic conditions, we could not pick up UK TV, only a single Italian TV station (maybe due to 'atmospheric ducting' which
probably acts similar to microwave WaveGuide used in Radar and microwave communications). the Italian movie of course had no subtitles
(as it was broadcast for Italians, not Brits), so we asked the Swiss girl with us to translate (she spoke Swiss German, Italian, French and English),
and we all sat there transfixed as she translated for a good 10 minutes, at which point she realised that nobody was watching the movie,
we were all fixed upon her. I said something like, "Enough of the French, how about giving it to us in English".
Some additional quite strange linguistic ducting had occurred.

EDIT:
Maybe some kind of +/- random number generation per pixel (vertical I think), and then run some kind of 'centered moving average' (to keep results
coherent), would also need some kind of 'centered moving average' horizontally and temporally too.
When all numbers crunched, then get pixel from Y coord +/- random sourced result.
Not really sure, but something like above (maybe).

EDIT from later post: Oh crap, I thought you wanted to synthesize Heat Haze, my bad.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 15th May 2019 at 10:41.
StainlessS is offline   Reply With Quote
Old 15th May 2019, 10:27   #12  |  Link
stormy1777
Registered User
 
Join Date: Jul 2002
Posts: 241
Oh, wait a sec.. Is that "shekh"? the developer of VD2 telling us to purchase a software package to encode.. hmm.. should we be worried ??
Thanks for the link, it mentioned "in-camera noise reduction", not sure I can find anything on that, it really appears to move, even to naked eye, so not sure camera is at fault here..

The term "Heat haze" is exactly right.. hopefully someone has some experience with encoding such content; almost looks like water/movement fuzzy shifting

Stainless, I think you posted sober this time around (at least BEFORE the EDIT), nice story, and with a happy "ending", did anyone end up marrying the girl
stormy1777 is offline   Reply With Quote
Old 15th May 2019, 10:37   #13  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
did anyone end up marrying the girl
Alas, yep, but not any of us watching TV. [I did keep in touch for a decade or so, and visited her in CH several times, and she re-visited here too].

I think I may try play with daft edit idea, but might take some time before I get around to it.

Tracking particals in meteorology, or as water goes over a waterfall (or even out of a tap/faucet) is an incredibly intractable problem, this is no easier probably (hence daft random number thing).

EDIT: Oh crap, I thought you wanted to synthesize Heat Haze, my bad.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 15th May 2019 at 10:40.
StainlessS is offline   Reply With Quote
Old 15th May 2019, 10:37   #14  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
I wouldn't do anything apart from some light de-noising. Just tried with "KNLMeansCL(d = 1, a = 2, h = 2.0, s = 2)" and the bitrate went from 5500 to 3000 @CRF18. At 1080p, this is already a very low bitrate.

If you want more comprehensive advice, upload a piece cut directly from the source.
__________________
Groucho's Avisynth Stuff

Last edited by Groucho2004; 15th May 2019 at 10:41.
Groucho2004 is offline   Reply With Quote
Old 15th May 2019, 14:20   #15  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 775
Quote:
Originally Posted by stormy1777 View Post
Oh, wait a sec.. Is that "shekh"? the developer of VD2 telling us to purchase a software package to encode.. hmm.. should we be worried ??
It was funny to see the term "heat haze" in 2 unrelated places in one day, I thought it won't hurt to link
__________________
VirtualDub2
shekh is offline   Reply With Quote
Old 15th May 2019, 14:41   #16  |  Link
stormy1777
Registered User
 
Join Date: Jul 2002
Posts: 241
Groucho,

Sorry, wasn't thinking, naively thought answer is easy

here is part of original clip: https://anonfile.com/G30bHardn8/Heat_Haze_Original_mp4

roughly 46MB, not too bad... The idea is that the reencode would not be apparent to human eye, or add artifacts that are not in the original already...

Stainless, here's your second chance no worries, your company is enough sometimes

Stormy.
stormy1777 is offline   Reply With Quote
Old 15th May 2019, 14:43   #17  |  Link
stormy1777
Registered User
 
Join Date: Jul 2002
Posts: 241
Quote:
Originally Posted by shekh View Post
It was funny to see the term "heat haze" in 2 unrelated places in one day, I thought it won't hurt to link
some say, there is a REASON (for everything), and that we're all really "connected" somehow.. Matrix??

yeah, certainly funny chance to see such a rare phrase appear in two places
stormy1777 is offline   Reply With Quote
Old 15th May 2019, 15:04   #18  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by stormy1777 View Post
The idea is that the reencode would not be apparent to human eye, or add artifacts that are not in the original already...
The original is 59 Mbps. I encoded your chunk with x264 (CRF 16, tune film) and the resulting bitrate is 9 Mbps. That's 15%. I you use some light de-noising you can reduce it even further.
At CRF 16 I highly doubt that you will see a difference between the original and the re-encoded file.

At CRF 18, the encoded file has 5.5 Mbps (9.3% of the original).

So, how much reduction do you have in mind?
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 15th May 2019, 15:14   #19  |  Link
stormy1777
Registered User
 
Join Date: Jul 2002
Posts: 241
thanks so much, i went up to CRF17, but fear to go higher, yeah, 10% is great, was wondering which filter/syntax to use for 'denoising' for this particular clip given the "movement", did not find anything in the provided filters for VirtualDub2 (with noise in the name).. do u still recommend: "KNLMeansCL(d = 1, a = 2, h = 2.0, s = 2)" for this clip? I can give it a try on the full source and see...
stormy1777 is offline   Reply With Quote
Old 15th May 2019, 15:50   #20  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by stormy1777 View Post
was wondering which filter/syntax to use for 'denoising' for this particular clip given the "movement", did not find anything in the provided filters for VirtualDub2 (with noise in the name).. do u still recommend: "KNLMeansCL(d = 1, a = 2, h = 2.0, s = 2)" for this clip? I can give it a try on the full source and see...
Give KNLMeansCL a try, it's quite useful in many situations.

Another option:
Code:
function MCD(clip video, int "threshold")
{
  last = video
  threshold = default(threshold, 200)
           
  bs = (width() > 960) ? 16 : 8 
  sc = MSuper(pel = 2, sharp = 1, hpad = 16, vpad = 16)
  backward_vector = MAnalyse(sc, isb =  true, delta = 1, blksize = bs, overlap = bs / 2, sadx264 = 4)
  forward_vector =  MAnalyse(sc, isb = false, delta = 1, blksize = bs, overlap = bs / 2, sadx264 = 4)
  backward_vector = MRecalculate(sc, backward_vector, blksize = bs / 2, overlap = bs / 4, thSAD = 100)
  forward_vector =  MRecalculate(sc, forward_vector , blksize = bs / 2, overlap = bs / 4, thSAD = 100)
  MDegrain1(sc, backward_vector, forward_vector, thSAD = threshold)

  return last
}
This is basically a function that StainlessS posted some time ago, can't find it right now so I posted my modified version. Try 'threshold' 200 ~ 300.

Also, watch out for banding if you use a de-noiser.

I usually stick with 'less is more' and use filters (particularly de-noisers) as little as possible.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:52.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.