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 24th March 2024, 19:16   #1  |  Link
puppeteer
Registered User
 
Join Date: Aug 2021
Posts: 6
Avisynth QTGMC please help me!

This is an interlaced video that is not a DVD. I get this result with Avisynth QTGMC, what is the reason? and is there a solution? Thanks in advance.



Sample: https://mega.nz/file/lUdQUJYS#Eg0gY8...B8LFvidKgjvw8Y

Last edited by puppeteer; 24th March 2024 at 20:50.
puppeteer is offline   Reply With Quote
Old 24th March 2024, 19:53   #2  |  Link
lollo2
Registered User
 
lollo2's Avatar
 
Join Date: Aug 2017
Location: Italy
Posts: 113
Post the source
__________________
A channel on S-VHS / VHS capture and AviSynth restoration https://www.youtube.com/channel/UCMs...h1MmNAs7I8nu4g
lollo2 is offline   Reply With Quote
Old 24th March 2024, 19:54   #3  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
I can see that the video is 640x480, this means that whoever encoded it took the original 720x480 anamorphic file and brutally resized it before deinterlacing it!
That's... bad.
Your best bet is to resize to 720x480 first and then try to deinterlace to see if the fields magically match.
If they don't, we will have to take more drastic approaches.

Quote:
Originally Posted by lollo2 View Post
Post the source
+1

As lollo said, please upload a sample and we're gonna try to help you.
FranceBB is offline   Reply With Quote
Old 24th March 2024, 20:30   #4  |  Link
lvqcl
Registered User
 
Join Date: Aug 2015
Posts: 293
Quote:
Originally Posted by FranceBB View Post
I can see that the video is 640x480, this means that whoever encoded it took the original 720x480
You mean 720x576?
lvqcl is offline   Reply With Quote
Old 24th March 2024, 20:37   #5  |  Link
puppeteer
Registered User
 
Join Date: Aug 2021
Posts: 6
This is an adult video, I don't know if I can share it here. Maybe I can share non adult part of video.
puppeteer is offline   Reply With Quote
Old 24th March 2024, 20:40   #6  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
Your problem is the result of resizing an interlaced video without first deinterlacing it. I don't think the script you posted is responsible for the problem.
johnmeyer is offline   Reply With Quote
Old 24th March 2024, 20:49   #7  |  Link
puppeteer
Registered User
 
Join Date: Aug 2021
Posts: 6
this is sample Is there a way to fix this.

https://mega.nz/file/lUdQUJYS#Eg0gY8...B8LFvidKgjvw8Y
puppeteer is offline   Reply With Quote
Old 25th March 2024, 06:23   #8  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Quote:
Originally Posted by lvqcl View Post
You mean 720x576?
Oh crap, I completely missed the framerate, 25i!
Whoever encoded it the first time severely screwed up then as he downscaled a 720x576 25i to 640x480 while still interlaced... No wonder we're left with a field mess...

Quote:
Originally Posted by puppeteer View Post
This is an adult video.
Hahahaha I was gonna say it when I read "Die unschuld von lande" (aka the innocence of the countryside) but I wasn't sure, thanks for pointing it out. By the way, I've seen far kinkier titles at work when I had to encode those kinds of stuff from dorcel and creaways and I'm not gonna lie I still laugh today when I read some of the titles lmao. Why people still watch those contents on linear is very much a mystery to me, though. Older generations I guess? XD
FranceBB is offline   Reply With Quote
Old 25th March 2024, 19:46   #9  |  Link
puppeteer
Registered User
 
Join Date: Aug 2021
Posts: 6
Quote:
Originally Posted by lollo2 View Post
Post the source
I shared the source, is there a way to fix it?
puppeteer is offline   Reply With Quote
Old 25th March 2024, 20:02   #10  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
resizing to 640x352 and upscaling to original resolution should remove some of the artifacts
adding some deflickering and spotless will help to remove some of the residual artifacts, but some will still be there
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 25th March 2024, 20:53   #11  |  Link
lollo2
Registered User
 
lollo2's Avatar
 
Join Date: Aug 2017
Location: Italy
Posts: 113
Quote:
Originally Posted by puppeteer View Post
I shared the source, is there a way to fix it?
The problem is in the source, not in QTGMC nor in your script (which is not optimal anyhow); in addition, the source is NOT interlaced, there is no de-interlacing to apply anyhow!

The solution proposed by Selur (Y downsize, resize) may mitigate some of the jagged edges introduced by the wrong processing in the source. Many threads on videohelp forum have attempt to fix this (common) problem, have a look at them.
__________________
A channel on S-VHS / VHS capture and AviSynth restoration https://www.youtube.com/channel/UCMs...h1MmNAs7I8nu4g
lollo2 is offline   Reply With Quote
Old 25th March 2024, 22:20   #12  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Unfortunately the source is severely compromised by being resized while still interlaced.
What you can do, however, is a linear blending deinterlacing and blur vertically the lines to get rid of the interlacing artifacts.

This is gonna work:

Quote:
#Indexing
video=LWLibavVideoSource("test.mp4")
audio=LWLibavAudioSource("test.mp4")
AudioDub(video, audio)

#Linear Blending Deinterlacing
mt_convolution("1","1 2 1",chroma="process")

#Vertical Blur
Blur(0.0, 1.0)

#Soft highlights rollback
Levels(0, 1.0, 255, 0, 235, false)

#Limited Tv Range
Limiter(min_luma=16, max_luma=235, min_chroma=16, max_chroma=240)
Left (Before) - Right (After)






This also takes care of the levels given that the original source is overshooting significantly way over 0.7V (i.e 235) and it's reaching almost 255, waaaaaay out of range.

Before (first picture) after (second picture):





This way you can then encode in Limited TV Range as always.


Cheers,
Frank
FranceBB is offline   Reply With Quote
Old 26th March 2024, 11:02   #13  |  Link
puppeteer
Registered User
 
Join Date: Aug 2021
Posts: 6
Quote:
Originally Posted by FranceBB View Post
Unfortunately the source is severely compromised by being resized while still interlaced.
What you can do, however, is a linear blending deinterlacing and blur vertically the lines to get rid of the interlacing artifacts.

This is gonna work:



Left (Before) - Right (After)






This also takes care of the levels given that the original source is overshooting significantly way over 0.7V (i.e 235) and it's reaching almost 255, waaaaaay out of range.

Before (first picture) after (second picture):





This way you can then encode in Limited TV Range as always.


Cheers,
Frank
Thanks man, this works for me. I really appreciate your effort.
puppeteer is offline   Reply With Quote
Old 26th March 2024, 12:58   #14  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
side note: using a combing mask (i.e. MTCombMask) with the convolution could save some additional details
using "santiag(strh=3)" also works for removing the combing artifacts.
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 26th March 2024 at 13:38.
Selur is offline   Reply With Quote
Reply

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 09:34.


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