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

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th July 2024, 08:51   #21  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 4,026
You may also want to give RETINEX (for Avisynth) a try.
https://github.com/Asd-g/AviSynth-Re...ases/tag/1.0.3

Below links to demos of files which I "fixed" some time ago for other users
https://mega.nz/file/6QMQiYTK#oOI_R6...meM95MdrsEnb2E
https://mega.nz/file/2EcTkDCQ#6CsCeg...m61h1SoqewV_cY
Sharc is offline   Reply With Quote
Old 12th July 2024, 12:12   #22  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 501
Quote:
Originally Posted by t_2 View Post
...
Avisynth open failure
MP_Pipeline: Unable to create slave process. Message:
(C:\Users\password\Desktop\HDR\HDRx64.avs, line 18

Here is my avs script:

##################################################

A=FFAudioSource("ivp2.mp4")
V=FFVideoSource("ivp2.mp4")
A=AudioDub(V,A).Trim(43549,50398).KillVideo()

MP_Pipeline("""
SetMemoryMax(3072)


FFVideoSource("ivp2.mp4")
ShowFrameNumber()
Trim(43549,50398)

HDRAGC()

### prefetch: 16, 0

### ###
""")

Final=AudioDub(A)
Return Final

######################################################
1. You need to have installed both AviSynth+ x64 and AviSynth x86. (in case you don't have already)
2. You need HDRAGC plugin to be in the plugins/plugins+ folder.
3. You need ffms2 plugin to be in the plugins64/plugins64+ folder.

Try:
Code:
SetMemoryMax(3072)

A=FFAudioSource("ivp2.mp4")

MP_Pipeline("""
### platform: win64

FFVideoSource("ivp2.mp4")
ShowFrameNumber()
Trim(43549,50398)

### ###
### platform: win32

HDRAGC()

### prefetch: 16, 0
### ###
""")

Final=AudioDub(A)
Return Final
StvG is offline   Reply With Quote
Old 12th July 2024, 20:38   #23  |  Link
t_2
Registered User
 
Join Date: Apr 2003
Location: USA
Posts: 107
Thanks to both of you! Retinex works great and the script also worked. I was able to run MP_Pipeline without further ado! Thanks again!
t_2 is offline   Reply With Quote
Old 20th July 2024, 06:39   #24  |  Link
t_2
Registered User
 
Join Date: Apr 2003
Location: USA
Posts: 107
https://drive.google.com/file/d/1jtX...ew?usp=sharing


Please find above a Google Drive link to a 2 min video from our 25-year-old movie. It’s AVC (x264) with YUY2 color space because I’m working with MJPEG originals. Below you will find a script that opens the video and applies one or another of two separate luminance adjusting plugins. The scenes were all shot on a bus against the backdrop of a window. So the window is overexposed and the actors are underexposed. That, of course, is what I want to fix. I really like the appearance of Retinex plugin but sometimes the artifacts or a strobing of the background luminance caused me to opt for HDRAGC. I especially noticed this strobing in the close ups as indicated in the script notes. Does anyone know what might be causing this strobing or if there is some way to eliminate it?

I am very much indebted to Sharc for coming up with a workaround for opening my corrupted archive file of the movie. That was a life-saver! Also thanks for telling me about QTGMC. My original footage was 50i and now the file above is a pristine 50p – really amazing stuff! Also, thanks for telling me about Retinex. Thanks also, to Emulgator for the 32 bit version of VirtualDub2 and to StvG for telling me about MP_Pipeline ( V.0.23) which the script below utilizes. If someone knows how to tweak Retinex to solve the strobing problem, I would be much obliged. I have been experimenting with both plugins for weeks now but am at somewhat of a crossroads. I also, understand, if nobody has the time. We live in a busy world!

Here is a link to the AVS file, in case my copy and paste below doesn’t work:
https://drive.google.com/file/d/1kVc...ew?usp=sharing

##################################################

# This script will only work if you have the MP_pipeline plugin up and running on your system (and the other two plugins) First, I open the audio, upstream of the pipeline
# Then I open the video only within the 64 bit portion of the pipeline. Then I separate the 2 min video into 6 sceens. I do this three
# seperate times in the script. First the 64 bit Retinex (version 1.0.3) plugin either adjusts the luminance or it doesn't depending on whether it is turned
# on or off (by toggling "#") Downstream, in the 32 bit portion of the pipeline, the 32 bit HDRAGC (High Dynamic Range Automatic Gain Control) (version 1.8.7)
# plugin, either adjusts the luminance or it doesn't depending on whether this commend is turned on or off in the script. Every scene in this
# series of sceens was poorly illuminated, so I apply one or the other plugins to every sceen. However, the two plugins could both be disabled "#" in both
# the 64 and 32 bit portion of the script respectively, in which case the script would pass the unaltered sceen downstream, where it could be returned as
# Sceen001c, for example. Therefore, for example, Sceen002a, Sceen002b, and Sceen002c each contain the very same frames of the original luma.avi file. Normally,
# you would only want to return the "c" set of sceens. It's the only one with the audio, anyway. In this original version of the script, I have only opted for HDRAGC over Retinex at Sceen003 because Retinex
# was bright, but the resulting artifacts in Reka's hair were too much. So I preferred to live with the darkness rather than the hovering cloud like artifact. I prefer
# the visual appearance of the Retinex plugin, but the strobbing-background problem, especially in the close up sceens caused be to opt instead for HDRAGC. I have, however, left
# the Retinex on in this script, so that you can see for yourself the strobbing.

SetMemoryMax(3072)

AudioX=FFAudioSource("Luma.avi")

MP_Pipeline("""
### platform: win64

Video1=FFVideoSource("Luma.avi")

# Audio has been removed as MP_pipeline doesn't like it. This is where
# we apply 64 bit filters/plugins like Retinex, i.e. MSCCP(). I didn't get good results
# using just one plugin alond, so use the MP_pipeline so I can use both the 64 bit Retinex and the 32 bit HDRAGC plugins in the
# same script.

Sceen001a=Video1.Trim(0, 01801).ConvertToYUV444.MSRCP(sigma=150, fulls=true, fulld=true).ConvertToYUV422() # Two girls - Bogi and Reka are common Hungarian girl's names.
Sceen002a=Video1.Trim(01802, 02093).ConvertToYUV444.MSRCP(sigma=250, fulls=true, fulld=true).ConvertToYUV422() # Bogi - First close up
Sceen003a=Video1.Trim(02094, 02515)#.ConvertToYUV444.MSRCP(sigma=150, fulls=true, fulld=true).ConvertToYUV422() # Reka - First close up
Sceen004a=Video1.Trim(02516, 04705).ConvertToYUV444.MSRCP(sigma=150, fulls=true, fulld=true).ConvertToYUV422() # Two girls together.
Sceen005a=Video1.Trim(04706, 05855).ConvertToYUV444.MSRCP(sigma=150, fulls=true, fulld=true).ConvertToYUV422() # Reka - 2nd close up
Sceen006a=Video1.Trim(05856, 0).ConvertToYUV444.MSRCP(sigma=300, fulls=true, fulld=true).ConvertToYUV422() # Bogi - 2nd close up

UnalignedSplice(\
Sceen001a,\
Sceen002a,\
Sceen003a,\
Sceen004a,\
Sceen005a,\
Sceen006a)



### ###
### platform: win32

# Still no audio here. This is where we apply 32 bit filters
# like HDRAGC The video is repartitioned into the same 6 sceens
# so that different filters can be applied to each sceen as needed.
# I set max_sat=1.0, which causes the plugin to only adjust the Y channel
# When I tried to adjust the Color channels too, I was getting an line
# on the face of one of the girls. It seemed like the top half of the frame
# showed increased chroma but the bottom half didn't. This error, however,
# has proved intermittant on my system. Go figure!

Video2=Trim(0, 0)


Sceen001b=Video2.Trim(0, 01801) # Two girls together
Sceen002b=Video2.Trim(01802, 02093)#.HDRAGC(min_gain = 3.75, coef_sat = 0.75, max_sat=1.0).Levels(0, 0.8, 255, 0, 225) # Bogi - First close up
Sceen003b=Video2.Trim(02094, 02515).HDRAGC(min_gain = 3.25, coef_sat = 0.75, max_sat=1.0).Levels(0, 0.8, 255, 0, 255) # Reka - First close up
Sceen004b=Video2.Trim(02516, 04705) # Two girls together
Sceen005b=Video2.Trim(04706, 05855)#.HDRAGC(min_gain = 3.25, coef_sat = 0.75, max_sat=1.0).Levels(0, 0.8, 255, 0, 225) # Reka - 2nd close up
Sceen006b=Video2.Trim(05856, 0)#.HDRAGC(min_gain = 3.75, coef_sat = 0.75, max_sat=1.0)#.Levels(0, 0.8, 255, 0, 225) # Bogi - 2nd close up

UnalignedSplice(\
Sceen001b,\
Sceen002b,\
Sceen003b,\
Sceen004b,\
Sceen005b,\
Sceen006b)


### prefetch: 16, 0
### ###
""")

# Here the audio is added and the vide0/audio is cut up into the same
# scenes as above for individual evaluation. "Total" splices the scenes together.

VideoX=Trim(0,0)

Video4=AudioDub(VideoX, AudioX)#.ShowFrameNumber()

Sceen001c=Video4.Trim(0, 01801) # Two girls together
Sceen002c=Video4.Trim(01802, 02093) # Bogi - First close up
Sceen003c=Video4.Trim(02094, 02515) # Reka - First close up
Sceen004c=Video4.Trim(02516, 04705) # Two girls together
Sceen005c=Video4.Trim(04706, 05855) # Reka - 2nd close up
Sceen006c=Video4.Trim(05856, 0) # Bogi - 2nd close up

Total=UnalignedSplice(\
Sceen001c,\
Sceen002c,\
Sceen003c,\
Sceen004c,\
Sceen005c,\
Sceen006c)


#Return Sceen001b
#Return Sceen002b
#Return Sceen003b
#Return Sceen004b
#Return Sceen005b
#Return Sceen006b

Return Total

#################################################################

Edit: Sorry, I just noticed that I misspelled scene throughout. Won't worry about that now...

Last edited by t_2; 20th July 2024 at 07:04.
t_2 is offline   Reply With Quote
Old 20th July 2024, 09:59   #25  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,495
Small suggestion: maybe use 'code'-tags to make your posts more readable to others.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 20th July 2024, 18:17   #26  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,731
Jó estét ! I would welcome a sample of the source MJPG file.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."
Emulgator is offline   Reply With Quote
Old 20th July 2024, 18:59   #27  |  Link
t_2
Registered User
 
Join Date: Apr 2003
Location: USA
Posts: 107
Köszönöm érdeklődését!


https://drive.google.com/file/d/1zFG...ew?usp=sharing


If you’re interested in knowing what the actors are saying, please find below a link to the entire 61 min drama with English subtitles. The young ladies’ conversation starts at 14 min 30 sec and lasts for 2 min 17 sec. The conversation stands on its own. SPOILER ALERT! The film is religious content on steroids!

https://drive.google.com/file/d/1Hhj...ew?usp=sharing
t_2 is offline   Reply With Quote
Old 23rd July 2024, 03:27   #28  |  Link
t_2
Registered User
 
Join Date: Apr 2003
Location: USA
Posts: 107
Tweaking the input for better results from Retinex plugin

@ Emulgator

Thanks again for your interest in my problem! That was so kind of you! In the meantime, I have been working further on the problem. I took your cue and started working with the raw archive footage before passing it through the de-interlacer. Alas, the strobing problem – lightening and darkening of the background – wasn’t fixed. Then, I decided to put white borders around the clips (settled on 200 pixels all around) before passing them to the Retinex filter and cropping them off afterwards. That seems to have done the trick.

Please find here a Google Drive link to the video output of the script which I have cut and pasted below.

https://drive.google.com/file/d/1Hs5...ew?usp=sharing

I was even able to use much stronger settings (lowered “sigma” from 120 to 60) for the effect. This did produce another distortion effect, a sort of halo that surrounds the two girls in scenes 2 and 4. I think I can live with that. Do you think there is any way to improve on these results? I must admit that I am pleasantly pleased. Really interested in your feedback.

##############################################
AudioX=FFAudioSource("LumaMJPEG.avi")
Video1=FFVideoSource("LumaMJPEG.avi")

y=200


Scene001a=Video1.Trim(0, 900).SeparateFields().AddBorders(y, y, y, y, $FFFFFF).ConvertToYUV444.MSRCP(sigma=80, fulls=true, fulld=true).ConvertToYUV422().Crop(y, y, -y, -y). Weave() # Two girls - Bogi and Reka are common Hungarian girl's names.
Scene002a=Video1.Trim(901, 1046).SeparateFields().AddBorders(y, y, y, y, $FFFFFF).ConvertToYUV444.MSRCP(sigma=80, fulls=true, fulld=true).ConvertToYUV422().Crop(y, y, -y, -y). Weave() # Bogi - First close up
Scene003a=Video1.Trim(1047, 1257).SeparateFields().AddBorders(y, y, y, y, $FFFFFF).ConvertToYUV444.MSRCP(sigma=80, fulls=true, fulld=true).ConvertToYUV422().Crop(y, y, -y, -y). Weave() # Reka - First close up
Scene004a=Video1.Trim(1258, 2352).SeparateFields().AddBorders(y, y, y, y, $FFFFFF).ConvertToYUV444.MSRCP(sigma=120, fulls=true, fulld=true).ConvertToYUV422().Crop(y, y, -y, -y). Weave() # Two girls together.
Scene005a=Video1.Trim(2353, 2927).SeparateFields().AddBorders(y, y, y, y, $FFFFFF).ConvertToYUV444.MSRCP(sigma=80, fulls=true, fulld=true).ConvertToYUV422().Crop(y, y, -y, -y). Weave() # Reka - 2nd close up
Scene006a=Video1.Trim(2928, 0).SeparateFields().AddBorders(y, y, y, y, $FFFFFF).ConvertToYUV444.MSRCP(sigma=80, fulls=true, fulld=true).ConvertToYUV422().Crop(y, y, -y, -y). Weave() # Bogi - 2nd close up

Video2=UnalignedSplice(\
Scene001a,\
Scene002a,\
Scene003a,\
Scene004a,\
Scene005a,\
Scene006a)

Video2=AudioDub(Video2, AudioX).AssumeTFF()

Scene001b=Video2.Trim(0, 900)
Scene002b=Video2.Trim(901, 1046)
Scene003b=Video2.Trim(1047, 1257)
Scene004b=Video2.Trim(1258, 2352)
Scene005b=Video2.Trim(2353, 2927)
Scene006b=Video2.Trim(2928, 0)

Luma=UnalignedSplice(\
Scene001b,\
Scene002b,\
Scene003b,\
Scene004b,\
Scene005b,\
Scene006b)

#Return Scene001b
#Return Scene002b
#Return Scene003b
#Return Scene004b
#Return Scene005b
#Return Scene006b

Return Luma

#################################################
t_2 is offline   Reply With Quote
Old 23rd July 2024, 10:37   #29  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,731
Downloading now. Ah, I get better shadow details fom the source MJPEG. Expected that. Stay tuned.

Code:
# +++++ Start of AutoPath 1 Videostream + 0 or 1 Audiostream  +++++
SetFilterMTMode("DEFAULT_MT_MODE", 2)
SetFilterMTMode("LWLibavVideoSource", 3)
SetFilterMTMode("LWLibavAudioSource", 3)
SetFilterMTMode("FFVideoSource", 3)
SetFilterMTMode("FFAudioSource", 3)
SetFilterMTMode("DGSource", 3)
SetFilterMTMode("InpaintDelogo", 3)
scriptextlen=FindStr(RevStr(ScriptFile()),".")
avextlen=FindStr(RevStr(LeftStr(ScriptFile(),StrLen(ScriptFile())-scriptextlen)),".")
avfolder=ScriptDir()
audfolder=avfolder
avfile0=LeftStr(ScriptFile(),(StrLen(ScriptFile())-scriptextlen-avextlen))
avext0=LeftStr(RightStr(ScriptFile(),scriptextlen+avextlen),avextlen)
vidsrc= avext0==".d2v" ? "MPEG2Source" : avext0==".dga" ? "AVCSource" : avext0==".dgi" ? "DGSource" : avext0=="mpg" ? "FFVideoSource" : "LWLibavVideoSource"
#vidsrc="LWLibavVideoSource"
#vidsrc="FFVideoSource"
vidformatLWLibav="YUV444P8"
vidformatFF="YV24"
vidargDG158="idct=5, ipp=true, cpu=6, cpu2=String(xxxxxx), moderate_h=40, moderate_v=80"
audfile=avfile0
audext=avext0==".d2v" ? ".ac3" : avext0==".dgi" ? ".ac3" : avext0
#audext=avext0==".d2v" ? ".dts" : avext0==".dgi" ? ".dts" : avext0
#audext=avext0==".d2v" ? ".wav" : avext0==".dgi" ? ".wav" : avext0
#audext=".mpg"
audpid= avext0==".d2v" ? " T80 2_0ch 224Kbps DELAY 0ms" : avext0==".dgi" ? " PID 1100 2.0ch 48KHz 192Kbps DELAY 0ms" : avext0==".mpg" ? " Tc0 L2 2ch 44.1 224 DELAY 0ms" : ""
#audpid= avext0==".d2v" ? " T81 3_2ch 448Kbps DELAY 0ms" : avext0==".dgi" ? " T81 3_2ch 48KHz 448Kbps DELAY 0ms" :""
audpid=""
audsrc= audext==".ac3" ? "NicAC3Source" : audext==".mp2" ? "FFAudioSource" : "LWLibavAudioSource"
#audsrc="BestAudioSource"
#audsrc="FFAudioSource"
ffaudtrk=1
audsrc="LWLibavAudioSource" #Asd-g versions only, here 1194
Libavaudtrk=-1 #int stream_index = -1 #-1: default stream
Libavaudcache=true #bool cache = true
Libavaudcachefile=String(audfolder)+String(audfile)+String(audpid)+String(audext)+".lwi"#string cachefile = source +".lwi"
Libavaudavsync=false #bool av_sync = false
Libavaudlayout="FL+FR"#"0x3f"#"FL+FR+FC+LFE+SL+SR" #string layout = ""  | CN ? No Audio |  5.1 -> "5.1" or "FL+FR+FC+LFE+SL+SR" or "0x3f"
Libavaudrate=0 #int rate = 0
Libavauddecoder="" #string decoder = ""
Libavaudffloglevel=0 #int ff_loglevel = 0
Libavaudcachedir="" #string cachedir = ""
Libavindexingpr=true #bool indexingpr = true
Libavauddrcscale=0.0 #float drc_scale = 1.0 #0.0 deactivates DRC, -values invert the DRC processing
Libavaudffopts="" #string ff_options = ""
Exist(String(avfolder)+String(avfile0)+String(avext0)) ? Apply(vidsrc,String(avfolder)+String(avfile0)+String(avext0))\
: Assert(false, "! NO SUCH AV FILE -> " + String(avfolder)+String(avfile0)+String(avext0) + "<- NO SUCH AV FILE !")
#try {AudioDub(last,Apply(audsrc,String(audfolder)+String(audfile)+String(audpid)+String(audext)))}
try {AudioDub(last,Apply(audsrc,String(audfolder)+String(audfile)+String(audpid)+String(audext),Libavaudtrk,Libavaudcache,Libavaudcachefile,Libavaudavsync,Libavaudlayout,Libavaudrate,Libavauddecoder,Libavaudffloglevel,Libavaudcachedir,Libavindexingpr,Libavauddrcscale,Libavaudffopts))}
#Blankclip(last).Subtitle(String(audfolder)+String(audfile)+String(audpid)+String(audext))
catch (err) {last}
# -----   End of AutoPath 1 Videostream + 0 or 1 Audiostream   -----
# source is 720x544 TFF
ConvertToYUV444()
smoothdebug=0
SmoothCurve16(ConvertTo16bit().ConvertToStacked(),\
Ycurve="0-1023;12000-14000;38000-35000;55000-42000;60000-48000;65535-61000",\
Ucurve="0-0;16383-16383;32767-32767;49151-49151;65535-65535",\
Vcurve="0-0;16383-16383;32767-32767;49151-49151;65535-65535",\
limiter=false, HQ=true, interp=100, debug=smoothdebug==0 ? false : true, screenW=1920, screenH=1080).ConvertFromStacked()#.Convertbits(8)
propSet("_FieldBased",2) #QTGMCp needs propSet from a certain version on. 0=frame based (progressive), 1=bottom field first, 2=top field first 
QTGMCp()
ConvertBits(32).ConvertToPlanarRGB().MSRCR(sigma=[300,400,500], lower_thr=0.001, upper_thr=0.001, fulls=false, fulld=false, restore=125.0).ConvertToYUV444().ConvertBits(16)
#return(last)
SmoothCurve16(ConvertTo16bit().ConvertToStacked(),\
Ycurve="0-0;12000-13000;32767-32767;55000-48000;65535-65535",\
Ucurve="0-0;16383-18000;32767-32767;49151-47000;65535-65535",\
Vcurve="0-0;16383-16383;32767-32767;49151-46000;65535-65535",\
limiter=false, HQ=true, interp=100, debug=smoothdebug==0 ? false : true, screenW=1920, screenH=1080).ConvertFromStacked().ConvertBits(10)
SMDegrain(tr=6, thSAD=400, RefineMotion=true, contrasharp=true, interlaced=false, plane=4, prefilter=8, chroma=true, Show=false) #5: DFTTest, 6: KNLMeansCL, 7: DGDenoise, 8: BM3D
GrainFactory3(2*Round(Pow(2,BitsPerComponent-8)),2*Round(Pow(2,BitsPerComponent-8)),1*Round(Pow(2,BitsPerComponent-8)),100,100,100,0.9*sqrt(width()/720),0.7*sqrt(width()/720),0.5*sqrt(width()/720),0,0,0,0,0,24*Round(Pow(2,BitsPerComponent-8)),56*Round(Pow(2,BitsPerComponent-8)),128*Round(Pow(2,BitsPerComponent-8)),160*Round(Pow(2,BitsPerComponent-8)))
#portalscope()
This gives 720x544x50p YUV444P10 with lots of detail.
It still needs colour matching to sunlight per shot, your turn (MSRCR amplifies sky casts: sometimes pinkish tint, sometimes cyan tint).

P.S. SMDegrain to your liking, ReGrain...well, there they are. Couldn't resist.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."

Last edited by Emulgator; 23rd July 2024 at 11:54.
Emulgator is offline   Reply With Quote
Old 23rd July 2024, 11:56   #30  |  Link
t_2
Registered User
 
Join Date: Apr 2003
Location: USA
Posts: 107
@ Emulgator

Wow! Very impressive script. I can't make heads nor tails of it. I am getting the following error: "No such video file" at line 47, but can't figure out what file it is looking for. Also, I noticed in your script that you call QTGMCp(). I only have QTGMC() installed. Will that give me problems? I can't wait to see your results, but I will have to since I am out of town the next 4 days without Internet!
t_2 is offline   Reply With Quote
Old 23rd July 2024, 12:20   #31  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,731
Ah, forgot to mention: Name the script after your file and put it side by side like that: "LumaMJPEG.avi.avs"
Or just cut off all the intro including # ----- End of AutoPath 1 Videostream + 0 or 1 Audiostream -----
and start with LWLibavVideoSource(), LWLibavAudioSource() as usual.

Why QTGMCp() ? It seems to be the gold standard for me now, gets so much details out of interlaced sources, be it VHS or any other.
For trying your script QTGMC is fine too.

Rendering 6850frames @ 2,4fps now into a H.264 4:2:0 10bit .mkv
BTW, just as I saw the scene in the completed movie:
My result is not that much different from what you already achieved in the final movie. Maybe less strobing..
I just prefiltered before Retinex to make it less hard for it, and postfiltered again.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."

Last edited by Emulgator; 23rd July 2024 at 12:39.
Emulgator is offline   Reply With Quote
Old 23rd July 2024, 16:36   #32  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 4,026
A luma mask may help to prevent the clipped bright sky from just turning occasionally into grey by the filtering (file fx.mp4 of post#28).
Something like
Code:
lmask=clip.mt_binarize(threshold=58,upper=true).converttoYV12(interlaced=true).GaussianBlur(varY=2000.0).grayscale()    
overlay(<your filtering>,mask=lmask)
(I usually apply Retinex with a mask, for example)

Last edited by Sharc; 23rd July 2024 at 17:03.
Sharc is offline   Reply With Quote
Old 24th July 2024, 18:53   #33  |  Link
t_2
Registered User
 
Join Date: Apr 2003
Location: USA
Posts: 107
@ Emulgator

I do have Internet afterall, but am not at my usual workstation. I couldn't get your script to run on this machine, but will try again back at home. Thanks again!

@Sharc

I tried adding your code to my script but avisynth+ didn't recognize GaussianBlur(). Here is my modified script below: I inserted your code
at the bottom. Do I have the right idea?

#####################################
AudioX=FFAudioSource("LumaMJPEG.avi")
Video1=FFVideoSource("LumaMJPEG.avi")
clip=AudioDub(Video1, AudioX)
y=200


Scene001a=Video1.Trim(0, 900).SeparateFields().AddBorders(y, y, y, y, $FFFFFF).ConvertToYUV444.MSRCP(sigma=60, fulls=true, fulld=true).ConvertToYUV422().Crop(y, y, -y, -y). Weave() # Two girls - Bogi and Reka are common Hungarian girl's names.
Scene002a=Video1.Trim(901, 1046).SeparateFields().AddBorders(y, y, y, y, $FFFFFF).ConvertToYUV444.MSRCP(sigma=60, fulls=true, fulld=true).ConvertToYUV422().Crop(y, y, -y, -y). Weave() # Bogi - First close up
Scene003a=Video1.Trim(1047, 1257).SeparateFields().AddBorders(y, y, y, y, $FFFFFF).ConvertToYUV444.MSRCP(sigma=60, fulls=true, fulld=true).ConvertToYUV422().Crop(y, y, -y, -y). Weave() # Reka - First close up
Scene004a=Video1.Trim(1258, 2352).SeparateFields().AddBorders(y, y, y, y, $FFFFFF).ConvertToYUV444.MSRCP(sigma=60, fulls=true, fulld=true).ConvertToYUV422().Crop(y, y, -y, -y). Weave() # Two girls together.
Scene005a=Video1.Trim(2353, 2927).SeparateFields().AddBorders(y, y, y, y, $FFFFFF).ConvertToYUV444.MSRCP(sigma=80, fulls=true, fulld=true).ConvertToYUV422().Crop(y, y, -y, -y). Weave() # Reka - 2nd close up
Scene006a=Video1.Trim(2928, 0).SeparateFields().AddBorders(y, y, y, y, $FFFFFF).ConvertToYUV444.MSRCP(sigma=60, fulls=true, fulld=true).ConvertToYUV422().Crop(y, y, -y, -y). Weave() # Bogi - 2nd close up

Video2=UnalignedSplice(\
Scene001a,\
Scene002a,\
Scene003a,\
Scene004a,\
Scene005a,\
Scene006a)

Video2=AudioDub(Video2, AudioX).AssumeTFF()

Scene001b=Video2.Trim(0, 900)
Scene002b=Video2.Trim(901, 1046)
Scene003b=Video2.Trim(1047, 1257)
Scene004b=Video2.Trim(1258, 2352)
Scene005b=Video2.Trim(2353, 2927)
Scene006b=Video2.Trim(2928, 0)

Luma=UnalignedSplice(\
Scene001b,\
Scene002b,\
Scene003b,\
Scene004b,\
Scene005b,\
Scene006b)

#Return Scene001b
#Return Scene002b
#Return Scene003b
#Return Scene004b
#Return Scene005b
#Return Scene006b

lmask=clip.mt_binarize(threshold=58,upper=true).converttoYV12(interlaced=true).GaussianBlur(varY=2000.0).grayscale()
overlay(Luma,mask=lmask)


Return Luma

#######################################
t_2 is offline   Reply With Quote
Old 24th July 2024, 21:55   #34  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 4,026
Quote:
Originally Posted by t_2 View Post
@Sharc

I tried adding your code to my script but avisynth+ didn't recognize GaussianBlur().
It is the Avisynth plugin variableblur.dll which includes GaussianBlur.
You find it here
http://avisynth.nl/index.php/VariableBlur

Prinipally you can replace it by any very strong blurrer. Very strong because one does not want to have sharp transitions between filtered and unfiltered areas in a picture.

Last edited by Sharc; 24th July 2024 at 21:58.
Sharc is offline   Reply With Quote
Reply

Tags
de-interlacing, ffms2

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 07:12.


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