Deinterlacing
Deinterlacing
Hi guys,
I am new to all this, and recently I started using avisynth. I did some basic stuff with it and now I am at the stage where I would like to deinterlace my videos.
My sources are DVDs and Blu-Rays. In the meantime, I am working on a 25 fps 1080i video (as reported by media info), what shall I do in order to investigate the video and deinterlace it properly?
Thnx
I am new to all this, and recently I started using avisynth. I did some basic stuff with it and now I am at the stage where I would like to deinterlace my videos.
My sources are DVDs and Blu-Rays. In the meantime, I am working on a 25 fps 1080i video (as reported by media info), what shall I do in order to investigate the video and deinterlace it properly?
Thnx
Re: Deinterlacing
The first thing to understand is that just because MediaInfo reports something as interlaced, it may not really be interlaced. It is a question of flagging versus the actual content. You have to identify the true nature of the video before deciding how to process it. That processing may be deinterlacing, IVTC, field shifting, or nothing at all. So how do you identify the nature of the video? See here:
http://rationalqm.us/faq.html
Then when you have decided what needs to be done you can:
Interlaced: Use DGSource() with deinterlace=1 or deinterlace = 2, or the DGBob() built in to DGDecodeNV.dll.
Telecined: Use fieldop=1 for soft telecine, or use DGTelecide() and DGDecimate() for hard telecine.
Field shift: Avisynth+ script.
For specific help, post about a specific video, rather than asking in general terms.
http://rationalqm.us/faq.html
Then when you have decided what needs to be done you can:
Interlaced: Use DGSource() with deinterlace=1 or deinterlace = 2, or the DGBob() built in to DGDecodeNV.dll.
Telecined: Use fieldop=1 for soft telecine, or use DGTelecide() and DGDecimate() for hard telecine.
Field shift: Avisynth+ script.
For specific help, post about a specific video, rather than asking in general terms.
Re: Deinterlacing
Thanks for the reply. I'll check the link and post back if I needed further help with more details about my source... ![grateful :salute:](./images/smilies/icon_salute.gif)
![grateful :salute:](./images/smilies/icon_salute.gif)
Re: Deinterlacing
Hey, Thnx for the link. I am currently working on a DVD, the frame rate is 29.970, and according to the link you provided -AssumeTFF(), SeparateFields()- it is showing aaa bb ccc dd pattern -i.e. 3:2 pulled-down- Does this make any sense at all? Shall I bring the frame rate down to 23.976? if so, how?
Thnx
*edit*
It seems my case is Telecined, so you did say "Telecined: Use DGTelecide() and DGDecimate()", so how can I use those? Are there alternatives?!
*edit2*
This "DGTelecide().DGDecimate()" crashed AvsPmod, and this "TFM().TDecimate()" did not crash it...what is the difference between the two? And which one is best?
again thnx
Re: Deinterlacing
Let's address the crashing then talk about undoing telecine afterwards. Please anser these questions:
1. What version of DGDecNV are you using (version and slipstream number, get from Help/About). You should be using 2053.0.0.147.
2. What is your nVidia card and driver version?
3. Please show your complete script.
4. What happens if you drop the script on VirtualDub?
5. Avspmod works fine for me with DGSource().DGTelecide().DGDecimate(). What version of Avspmod are you using and what error message are you seeing?
1. What version of DGDecNV are you using (version and slipstream number, get from Help/About). You should be using 2053.0.0.147.
2. What is your nVidia card and driver version?
3. Please show your complete script.
4. What happens if you drop the script on VirtualDub?
5. Avspmod works fine for me with DGSource().DGTelecide().DGDecimate(). What version of Avspmod are you using and what error message are you seeing?
Re: Deinterlacing
1. What version of DGDecNV are you using (version and slipstream number, get from Help/About). You should be using 2053.0.0.147.
I am still on 132. It does not crash any more...
2. What is your nVidia card and driver version?
1080Ti
3. Please show your complete script.
4. What happens if you drop the script on VirtualDub?
Works!
5. Avspmod works fine for me with DGSource().DGTelecide().DGDecimate(). What error message are you seeing?
I don't have any errors any more. I was doing something like this
Which did not work. Then I did this
and now it works...
I am still on 132. It does not crash any more...
2. What is your nVidia card and driver version?
1080Ti
3. Please show your complete script.
Code: Select all
LoadPlugin("Q:\dgdecnv2053\DGDecodeNV.dll")
DGSource("MyDVD.dgi").DGTelecide().DGDecimate()
Crop(8, 4, -2, -10)
Works!
5. Avspmod works fine for me with DGSource().DGTelecide().DGDecimate(). What error message are you seeing?
I don't have any errors any more. I was doing something like this
Code: Select all
DGSource("MyDVD.dgi")
DGTelecide().DGDecimate()
Code: Select all
DGSource("MyDVD.dgi").DGTelecide().DGDecimate()
Re: Deinterlacing
What are the disadvantages of using "TFM().TDecimate()" ?
And now there is another issue which is entirely not related to your awesome work, but I will ask you might give me a hint why this is happening...
In the past x264 Launcher worked w/o issues, and today it is reporting error x264 couldn't read input file '0'! Any clues why am I getting this? My input file is the one I showed you in my previous post...
And now there is another issue which is entirely not related to your awesome work, but I will ask you might give me a hint why this is happening...
In the past x264 Launcher worked w/o issues, and today it is reporting error x264 couldn't read input file '0'! Any clues why am I getting this? My input file is the one I showed you in my previous post...
Re: Deinterlacing
One thing at a time!
First, you did not give your nVidia driver version. I need that.
Second, you should update to the latest DGDecNV slipstream 147. I'm reluctant to support older versions.
DGSource("MyDVD.dgi")
DGTelecide().DGDecimate()
This should not crash and does not for me. Do you want to try again and follow up on it, or do you want to move on to your other questions?
First, you did not give your nVidia driver version. I need that.
Second, you should update to the latest DGDecNV slipstream 147. I'm reluctant to support older versions.
DGSource("MyDVD.dgi")
DGTelecide().DGDecimate()
This should not crash and does not for me. Do you want to try again and follow up on it, or do you want to move on to your other questions?
Re: Deinterlacing
Take your time to do things carefully.
Re: Deinterlacing
I just updated to the latest 147 version, and like you said nothing fails now, having the commands on separate lines also works...Regarding the NVIDIA driver number, now I am updating to the latest one 397.31....
Re: Deinterlacing
OK, cool. Does that also mean x264 launcher is not failing now too?
About undoing telecine. First we need to know if it is soft or hard telecine. Load the source in DGIndexNV and then save project. What is the film percentage reported at the bottom of the DGI file?
About undoing telecine. First we need to know if it is soft or hard telecine. Load the source in DGIndexNV and then save project. What is the film percentage reported at the bottom of the DGI file?
Re: Deinterlacing
No X264 launcher does not work!admin wrote: ↑Sun May 06, 2018 10:09 amOK, cool. Does that also mean x264 launcher is not failing now too?
About undoing telecine. First we need to know if it is soft or hard telecine. Load the source in DGIndexNV and then save project. What is the film percentage reported at the bottom of the DGI file?
Code: Select all
Simple x264 Launcher (Build #1124), built 2018-02-27
....
....
x264 [error]: could not open input file `0'
What are the expected values here?!
Thnx
Re: Deinterlacing
Please give the exact steps you do to get this error in SimpleLauncher. Also give the full log from SimpleLauncher. It works fine for me without error.
Telecining stuff comes after we resolve this error.
Telecining stuff comes after we resolve this error.
Re: Deinterlacing
The issue is in the new custom preset that I just made
![facepalm :facepalm:](./images/smilies/icon_facepalm.gif)
Thnx
Re: Deinterlacing
OK, on to inverse telecining.
Because you have 0% film, that is hard telecining and you will need to use IVTC filters rather than just fieldop=1 in DGSource(). If this is not making any sense to you, you'll have to do some research on it on your own. Other video forums can be very helpful in this regard. This forum is for support of my tools and related matters.
DGTelecide().DGDecimate():
The advantage here is that it is CUDA-accelerated and so it will be faster and leave more CPU for encoding.
TFM()/TDecimate():
The advantage here is that it is more flexible with additional parameters for tweaking.
If DGTelecide().DGDecimate() is not meeting your needs, I'd love to hear more about it with a view to enhancing it as needed.
Because you have 0% film, that is hard telecining and you will need to use IVTC filters rather than just fieldop=1 in DGSource(). If this is not making any sense to you, you'll have to do some research on it on your own. Other video forums can be very helpful in this regard. This forum is for support of my tools and related matters.
DGTelecide().DGDecimate():
The advantage here is that it is CUDA-accelerated and so it will be faster and leave more CPU for encoding.
TFM()/TDecimate():
The advantage here is that it is more flexible with additional parameters for tweaking.
If DGTelecide().DGDecimate() is not meeting your needs, I'd love to hear more about it with a view to enhancing it as needed.
Re: Deinterlacing
Of course not.
DGTelecide().DGDecimate()
DGTelecide().DGDecimate()
Re: Deinterlacing
After finding out the field order, do we still need AssumeTFF() in our code ?
Also, what if some interlacing artifacts were detected at the edges after our previous step, do you think something like this is needed?
Thnx
Code: Select all
AssumeTFF()
DGTelecide().DGDecimate()
Code: Select all
QTGMC(preset="fast").SelectEven()
Re: Deinterlacing
You should not need an AssumeFPS() call, as DGSource() sets it for Avisynth+. It is harmless to include, however, as long as it is set correctly.
You have telecined material (unless you are now talking about a different source). You can't sensibly use QTGMC on it.
If you have artifacts with DGTelecide/DGDecimate, please link to an unprocessed sample video and give your script.
You have telecined material (unless you are now talking about a different source). You can't sensibly use QTGMC on it.
If you have artifacts with DGTelecide/DGDecimate, please link to an unprocessed sample video and give your script.
Re: Deinterlacing
How can I extract a sample w/o processing that is reasonable in size for you? What method is best?
Thnx
*edit*
I also would like to PM you some screens, I prefer not to put them in public...is that okay?!
Thnx
Thnx
*edit*
I also would like to PM you some screens, I prefer not to put them in public...is that okay?!
Thnx
Re: Deinterlacing
Open the stream in DGIndexNV. Set a range around the desired sample area with the [ and ] buttons. Go into Demux and enable video demuxing. Save project. You will get an M2V file (assuming your source is still VOB).
A possible host is tinyupload.com (50MB max).
Yes, go ahead and PM me the screens.
A possible host is tinyupload.com (50MB max).
Yes, go ahead and PM me the screens.
Re: Deinterlacing
Next time please give a much larger sample, 25-50 MB.
You have two problems. First your cropping is invoking the Chroma Upsampling Error (CUE). You have to crop in multiples of 4. So do this:
Crop (8, 8, -24, -4)
You can use the DGIndexNV cropping filter if you like, instead of the Avisynth internal Crop(). It will enforce multiples.
Second, you have noisy fields, which can look like interlacing. Suppose the pattern is:
a a a b b c c c d d ...
The three a fields should be identical (after vertical alignment), but when stepping through by fields you can see that they differ by noise and other distortions. If the residual combing caused by this bothers you (to me it looks too small to be visible when viewed at normal size and speed) then you can tweak the postprocessing.
I will tell you again that this 3:2 telecined stream is not suitable for QTGMC and won't comment any further on that. Also, it won't return your frame rate to 23.976.
You have two problems. First your cropping is invoking the Chroma Upsampling Error (CUE). You have to crop in multiples of 4. So do this:
Crop (8, 8, -24, -4)
You can use the DGIndexNV cropping filter if you like, instead of the Avisynth internal Crop(). It will enforce multiples.
Second, you have noisy fields, which can look like interlacing. Suppose the pattern is:
a a a b b c c c d d ...
The three a fields should be identical (after vertical alignment), but when stepping through by fields you can see that they differ by noise and other distortions. If the residual combing caused by this bothers you (to me it looks too small to be visible when viewed at normal size and speed) then you can tweak the postprocessing.
I will tell you again that this 3:2 telecined stream is not suitable for QTGMC and won't comment any further on that. Also, it won't return your frame rate to 23.976.