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 19th March 2019, 18:07   #1  |  Link
domator
Registered User
 
Join Date: Mar 2019
Posts: 14
Deinterlace PAL DVD with "Sliders" tv show

Hello,
I have a European PAL DVD with TV show Sliders. I tried deinterlacing in AviSynth and VirtualDub but I can't get decent results. I tried removing every Odd or Even field but it doesn't solve issue. It seems that from time to time there is 1 whole frame which has 2 bad fields. I tried removing 1 frame in every 25 frames but the remaining 24 frames are not fully deinterlaced. I don't really know how to approach this. I tried some out of the box deinterlacing filters but with no luck.
I want to resample the DVD so first I want to get best possible progressive video from it.

Here I uploaded a small sample, M2V:
http://5.196.74.194/domek/VTS_02_3.demuxed.m2v
The whole #459 frame looks bad like it should be removed entirely. Frame #679 looks interlaced.

Here's how the frame #459 looks like:

Last edited by domator; 19th March 2019 at 20:42. Reason: Uploaded M2V
domator is offline   Reply With Quote
Old 19th March 2019, 19:47   #2  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
The Guys would more likely prefer a cut direct from the VOB file, not avi.

In DGIndex, mark a 10->30 second section with both movement and bad frames, using the '[' and ']' keys to mark start and end.

And "Save Project & Demux video", post the m2v file only.
__________________
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 19th March 2019, 20:42   #3  |  Link
domator
Registered User
 
Join Date: Mar 2019
Posts: 14
Thank you. I uploaded M2V file.
domator is offline   Reply With Quote
Old 19th March 2019, 21:09   #4  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
It's probably not interlaced, but the fields are out of alignment, making it appear to be interlaced.

The simple test for most PAL sources is to add Yadif(Mode=1) to a script and step through the frames. If every second frame is a repeat of the preceding one (or very close to being an exact copy), the source isn't interlaced. If every frame is unique where there's movement, it is interlaced.

You can probably fix it using TFM() to put the fields back together.

Quote:
TFM() # from the TIVTC plugin
AssumeFPS(24000,1001) # optionally undo the PAL speedup.
I say "probably" because I haven't seen the source and there was almost no motion in your sample. For de-interlacing issues, it pays to upload a clip containing a fair bit of motion, if you can.

Last edited by hello_hello; 19th March 2019 at 21:15.
hello_hello is offline   Reply With Quote
Old 19th March 2019, 21:33   #5  |  Link
domator
Registered User
 
Join Date: Mar 2019
Posts: 14
Thank you, hello_hello. Your scripts gives a really nice output.
Does it mean it was 24fps converted to 24fps by duplicating fields?
Also does TFM() keep all the fields or does it delete Even (or Odd) fields like many deinterlacers?
domator is offline   Reply With Quote
Old 19th March 2019, 21:49   #6  |  Link
mbcd
Registered User
 
Join Date: Dec 2008
Location: Germany
Posts: 173
Forget it !

I tried that a long time ago, they are encoded by total idiots.

Try to find the scene of episode 5. Der keimfreie Planet (Fever)
Staffel 1, Folge 5 (45 Min.) at about minutes 3,30 where they walk along the street, going downstairs through that scanner entering the foodplace.

This shows how crappy it will be !
Try to solve that scene !
You cant remove fields, because then you get jitter and jumps, because of missing movement.

I gave up on it.

Last edited by mbcd; 19th March 2019 at 21:51.
mbcd is offline   Reply With Quote
Old 19th March 2019, 22:06   #7  |  Link
domator
Registered User
 
Join Date: Mar 2019
Posts: 14
Thanks, mbcd, I will try episode 5. My DVD is a British release, not German one so there is a possibility my is different.
For now I am uploading a longer M2V piece do everybody can give it a try. I have terribly slow upload speed so that will take a moment.
domator is offline   Reply With Quote
Old 19th March 2019, 22:14   #8  |  Link
domator
Registered User
 
Join Date: Mar 2019
Posts: 14
Here's a short clip after deinterlacing, upscaling and fixing colors. I think it doesn't look bad:
http://5.196.74.194/domek/Upscaled.mkv

What I used, Avisynth:
LoadPlugin("DGDecode.dll")
LoadPlugin("TIVTC.dll")
MPEG2Source("2.d2v")
TFM()
AssumeFPS(24000,1001)
nnedi3_rpow2(rfactor=2)

and then VirtualDub to fix colors, because I don't how to fix colors in Avisynth yet:
VirtualDub.audio.SetSource(1);
VirtualDub.audio.SetMode(0);
VirtualDub.audio.SetInterleave(1,500,1,0,0);
VirtualDub.audio.SetClipMode(1,1);
VirtualDub.audio.SetEditMode(1);
VirtualDub.audio.SetConversion(0,0,0,0,0);
VirtualDub.audio.SetVolume();
VirtualDub.audio.SetCompression();
VirtualDub.audio.EnableFilterGraph(0);
VirtualDub.video.SetInputFormat(0);
VirtualDub.video.SetOutputFormat(7);
VirtualDub.video.SetMode(3);
VirtualDub.video.SetSmartRendering(0);
VirtualDub.video.SetPreserveEmptyFrames(0);
VirtualDub.video.SetFrameRate2(0,0,1);
VirtualDub.video.SetIVTC(0, 0, 0, 0);
VirtualDub.video.SetCompression();
VirtualDub.video.filters.BeginUpdate();
VirtualDub.video.filters.Clear();
VirtualDub.video.filters.Add("2d cleaner optimized (0.9)");
VirtualDub.video.filters.instance[0].Config(0, 10, 2, 2);
VirtualDub.video.filters.Add("MSUColorEnhancement 1.0b");
VirtualDub.video.filters.Add("Brightness & Contrast");
VirtualDub.video.filters.instance[2].Config(53, 690, 0);
VirtualDub.video.filters.EndUpdate();
VirtualDub.audio.filters.Clear();
domator is offline   Reply With Quote
Old 19th March 2019, 22:41   #9  |  Link
domator
Registered User
 
Join Date: Mar 2019
Posts: 14
Longer clip: http://5.196.74.194/domek/2.demuxed.m2v
domator is offline   Reply With Quote
Old 19th March 2019, 22:51   #10  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by domator View Post
Thank you, hello_hello. Your scripts gives a really nice output.
Does it mean it was 24fps converted to 24fps by duplicating fields?
Also does TFM() keep all the fields or does it delete Even (or Odd) fields like many deinterlacers?
I assume it was 24fps originally and simply sped up to 25fps for PAL, if that's what you're asking. AssumeFPS(24000,1001) just slows it down again, but you'll have to apply a slowdown to the audio too. Generally without correcting the pitch, so the sound drops back to it's original pitch when it's slowed down.

TFM is a field matcher. It looks at the fields and tries to match them up for whole frames. It can de-interlace when it detects combing after the field matching, or if the source is really interlaced, but you can field match without any de-interlacing enabled if you want to.

TFM(pp=0)

TFM keeps all the fields for a film source (or 25fps progressive). For your sample I don't think there's any field duplication to speed it up to PAL. For some reason the fields can end up out of alignment though.

Instead of this (top and bottom fields)

A B C D E F
A B C D E F

progressive PAL is often encoded as interlaced and ends up something like this

A B C D E F
B C D E F G

So it looks interlaced but it's not, and TFM simply matches the fields again to output progressive frames. If you de-interlaced with Yadif(mode=1) instead, each frame of the 50fps output would be duplicated. That's why it can be used to check if it's really interlaced, or just foolin'.

When it de-interlaces, TFM de-interlaces to the original frame rate, so yes, for interlaced PAL it'd only output 25fps rather than 50fps.

Last edited by hello_hello; 19th March 2019 at 23:12.
hello_hello is offline   Reply With Quote
Old 19th March 2019, 23:06   #11  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by domator View Post
Here's a short clip after deinterlacing, upscaling and fixing colors. I think it doesn't look bad:
http://5.196.74.194/domek/Upscaled.mkv

What I used, Avisynth:
LoadPlugin("DGDecode.dll")
LoadPlugin("TIVTC.dll")
MPEG2Source("2.d2v")
TFM()
AssumeFPS(24000,1001)
nnedi3_rpow2(rfactor=2)

and then VirtualDub to fix colors, because I don't how to fix colors in Avisynth yet
This converts standard definition colorimetry to HD colorimetry.

ColorMatrix(mode="Rec.601->Rec.709", clamp=0)

Then you can add
--colormatrix bt709
to the x264 command line and with any luck, the colors of the encoded video will be the same as the DVD colors on playback Assuming no other color/brightness adjustments when encoding, but that sort of thing is personal preference.
hello_hello is offline   Reply With Quote
Old 19th March 2019, 23:46   #12  |  Link
domator
Registered User
 
Join Date: Mar 2019
Posts: 14
Quote:
Originally Posted by hello_hello View Post
This converts standard definition colorimetry to HD colorimetry.

ColorMatrix(mode="Rec.601->Rec.709", clamp=0)
Thank you, this gives nice colors!


Quote:
Originally Posted by mbcd View Post
Forget it !

I tried that a long time ago, they are encoded by total idiots.

Try to find the scene of episode 5. Der keimfreie Planet (Fever)
Staffel 1, Folge 5 (45 Min.) at about minutes 3,30 where they walk along the street, going downstairs through that scanner entering the foodplace.
I got the scene you mentioned:
http://5.196.74.194/domek/VTS_02_1.demuxed.m2v
It works quite OK with the script from hello_hello. It seems this scene has a lot of motion blur and not interlace. Even when I just kept Odd (or Even) fields it was blurry. But with hello_hello's script the motion is not jittery.
domator is offline   Reply With Quote
Old 20th March 2019, 08:36   #13  |  Link
mbcd
Registered User
 
Join Date: Dec 2008
Location: Germany
Posts: 173
Quote:
Originally Posted by domator View Post
Thanks, mbcd, I will try episode 5. My DVD is a British release, not German one so there is a possibility my is different.
For now I am uploading a longer M2V piece do everybody can give it a try. I have terribly slow upload speed so that will take a moment.
I checked it, seems like they are a little different, but have same mastertape. Only in scaling there is a little difference. Your version is a little bit sharper at framecorners and has brighter colors.
But content seems basically exactly the same s*it:



Left side is German version, right side is UK version. Both used TFM().
So there are still lots of blendings left.

Last edited by mbcd; 20th March 2019 at 09:32.
mbcd is offline   Reply With Quote
Old 20th March 2019, 09:34   #14  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
There is also Sliders Blu ray on amazon, 4 discs(?) with all seasons. DVD resolution. Maybe it has better quality.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is online now   Reply With Quote
Old 20th March 2019, 09:47   #15  |  Link
mbcd
Registered User
 
Join Date: Dec 2008
Location: Germany
Posts: 173
This source is from that Bluray, I hoped it is a new transfer, but it is the same as on those old dvds. So no better quality on that.

The only chance to get a better quality is to buy the NTSC version, but there are 2 sets of it, a 26 disk set and a 15 disc set. The 15 disc set has a bad quality, because bitrate is way too low, and 26 box-set is way too expensive (for me).

Last edited by mbcd; 20th March 2019 at 09:51.
mbcd is offline   Reply With Quote
Old 20th March 2019, 10:04   #16  |  Link
Frank62
Registered User
 
Join Date: Mar 2017
Location: Germany
Posts: 234
Try SRestore with frate=25.
Except for the car the scenes look quite ok.
We often had this ugly type of old PAL-1''-copies. Single fields are blended and field dominance changes steplessly.

Is this John Rhys-Davies? The series is British? Then chances are high that the NTSC-DVDs are even worse, if they converted from the PAL source.

Last edited by Frank62; 20th March 2019 at 10:55.
Frank62 is offline   Reply With Quote
Old 20th March 2019, 10:41   #17  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Sliders is a US series.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is online now   Reply With Quote
Old 20th March 2019, 10:57   #18  |  Link
Frank62
Registered User
 
Join Date: Mar 2017
Location: Germany
Posts: 234
Then: Buy the NTSC-DVDs...
Frank62 is offline   Reply With Quote
Old 20th March 2019, 13:00   #19  |  Link
domator
Registered User
 
Join Date: Mar 2019
Posts: 14
Ha, look at this:


This really makes me upset. I also bought US version of Sliders. And with this simple .AVS:
LoadPlugin("DGDecode.dll")
LoadPlugin("Decomb.dll")
MPEG2Source("1.d2v")
Telecide()
it gives great quality. Seems the PAL version was made by some idiot who didn't care, didn't know enough.

And here's the NTSC clip:
http://5.196.74.194/domek/1.demuxed.m2v
It's from a 6-disc season 1&2 combined release:
https://www.amazon.com/Sliders-Secon.../dp/B00022FWEU

Last edited by domator; 20th March 2019 at 13:09. Reason: Added a file
domator is offline   Reply With Quote
Old 20th March 2019, 13:10   #20  |  Link
mbcd
Registered User
 
Join Date: Dec 2008
Location: Germany
Posts: 173
damn ..... I wished I had some way to get those too, but 200€ is far too expensive, just bought the bluray-version.

Just what I said, damn idiots made that transfer for european market. Nice for you, you got a great quality version, now you can continue!
You shouldnt get any problems with interlacing anymore.
mbcd is offline   Reply With Quote
Reply

Tags
deinterlace, dvd

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


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