Hi everyone,
First off, I want to explain how I got to this point. Maybe it can help other people to make their journey easier. You can skip it by reading after the line.
I wanted to learn avisynth because I am a fan of classic (and new) cartoons. Got my Digimon DVD's and found out the quality wasn't that great. Asked on the forum what to call the problem I was seeing, and Sharc was nice enough to explain it to me. It can be found here:
First Topic
After that, it was a rollercoaster ride of emotions. Saw a few topics about advanced settings and it was pretty scary. Had no idea where to start. I found a video tutorial online that showed me the basics a bit:
How to Use Avisynth Youtube Video
This especially helped me with what programs I needed.
Looked online for filters and plugins that helped with dot crawl and rainbowing. Honestly, it looked like a foreign language to me. Started by reading the avisynth website and learning the commands a bit. Also tried copying examples and using trial and error to get a grip on what it all meant. With the help of this great community, I started to understand it better.
My first plugin was yadifmod2 to de-interlace and CheckMate as a dot crawl remover. Copying the examples on the avisynth website worked like a charm. The difference was insane. Then I wanted to de-rainbow. No matter what I did, it wouldn't work. I kept getting error after error. A few kindhearted members made me realize that my scripts weren't saving properly from the website. Copied the scripts and put them in a .txt file, afterwards renaming them to .avsi, with the appropriate name. You guessed it, it worked like a charm.
Jagabo mentioned it would be better to use LSMASH, so I tried that, but I got errors if I added audio. Jagabo was so kind to explain it, and it worked! I was incredibly happy.
Jagabo also taught me that .avsi and plugins that are in the correct folder load automatically. Only avs need to be loaded manually. That was a great help.
-----------------------------------------------------------------------------------------------------------------------
So, I know some basic avisynth. When I look around the forum, I see a lot of settings that boggle my mind. I have no idea what many commands mean. I would love to learn what everything means properly, instead of copy and pasting the settings.
Achieved - How do you trim the black borders on a video?
Achieved - Should I de-interlace before using other filters or is it better to do it last?
- Any tips and tricks are very welcome
If someone is willing to teach me, I would greatly appreciate it. Thank you ❤️
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 30 of 47
Thread
-
Last edited by LighthouseonaCliff; 10th May 2021 at 20:04.
-
These common functions are built in, internal to Avisynth. Others are plugins/scripts you have to download.
For example, to trim the border you use crop. Here's the internal filters.
http://avisynth.nl/index.php/Category:Internal_filters
Some filters are progressive only, while others have a switch, so you would call them with "interlace=true" (or similar).
You have to read the doc on the particular filterLast edited by davexnet; 8th May 2021 at 16:59. Reason: type
-
Thank you, davexnet.
I'm testing it right now. Will let you know if it works.
Edit: I used this:
Crop
This code made the black border disappear:
Code:Crop(10, 0, -10, -0) #left, top, right, bottom
Thank you so much!Last edited by LighthouseonaCliff; 8th May 2021 at 17:02.
-
Even with filters that have an interlced switch, they often work better with progressive video. So deinterlacing first is often better.
And if you want really good deinterlacing use QTGMC(). It's slow, and one of the hardest filters to get set up because of all the other filters it uses. But it's worth the effort. -
Yes, it seems to have a lot of requirements I'll try it out, thank you
-
QTGMC is with no doubt very great and powerful (as it is slow, too).
Anyway.. on telecined material I often got better, sharper, more refined (but not faster ;_; ) result using TIVTC/TMF and a lot of custom stuff applied .. but it really depends on the source material... and there's a TON of customization to do to the scripts to obtain fine results. -
@ the OP: And don't just throw deinterlacers at your sources unless you are certain that the video is really interlaced.
So unless you know it already, familiarize yourself how to analyze the frame structure using avisynth, using separatefields and stepping through the fields of a scene with motion or panning, for example.
Also, AvsPmod is very handy to test and preview your scripts.Last edited by Sharc; 9th May 2021 at 05:50.
-
Apologies for the late reply. It's been a busy day
I got QTGMC working. The amount of settings is insane It's going to be a project to learn all settings and what it all does. Looking forward to learning everything
It's a real shame QTGMC is so much slower
I first use MediaInfo to see if the video is interlaced or progressive. I've read this can sometimes be false and to rely on your eyes to really know. What I do is looking at fast movements in a video and pausing and going through the frames one at a time. It's often immediately obvious.
An example:
[Attachment 58787 - Click to enlarge]
Hope I'm doing it correctly?
------------------------------------------------------------------------------------------------------
In the past days, I've learned to use 32bit avisynth instead of 64bit. I've ran into a few plugins that weren't supported in 64bit, notably the DeRainbow requirements.
This website has helped me to figure out what encoder level to use:
Advanced Video Coding - Levels
Maybe someone will find it useful.
The filters in VirtualDub2 have also been helpful. My Digimon remuxes from the DVD's weren't the correct aspect ratio after encoding. The resize option solved this problem. Do also like the smoother option, but that's personal preference.
Thank you to everyone who has shared their wisdom. It's truly greatly appreciated. -
Animes are usually telecined.. (see if you got a pattern like this in the original video: 3 full fields followed by 2 interlaced fields).
If that's the case.. the first thing to do is inverse-telecine them, then decimate them.. and finally remove residual combing artifacts..Last edited by krykmoon; 10th May 2021 at 08:10.
-
Yes, that video is almost certainly telecined film. You should use TFM() and TDecimate(). Also, you resized the video vertically, screwing up the two fields. You need to IVTC/deinterlace before a vertical resize.
-
I first use MediaInfo to see if the video is interlaced or progressive. I've read this can sometimes be false and to rely on your eyes to really know. What I do is looking at fast movements in a video and pausing and going through the frames one at a time. It's often immediately obvious.
An example:
[Attachment 58787 - Click to enlarge]
Hope I'm doing it correctly?
My preferred analysis method is inspecting the fields by stepping through the fields of a scene with motion.
Code:assumeTFF() separatefields()
(1) a a b b c c d d e e f f .... the video is progressive and should not be deinterlaced (even though some tools may report it as interlaced, e.g. for PAL DVD movies).
(2) a b c d e f ... with smooth motion progress between the pictures the video is interlaced with Top Field first; if the picture sequence is jumping backward/formward the field order is Bottom Field first.
(3) a a a b b c c c d d e e e f f ..... the video is 2:3 (aka 3:2) telecined film which is standard practice for 24 -> 30fps film to NTSC conversion. It should be inverse telecined (IVTC) rather than deinterlaced.
Anime are sometimes a bit more tricky to assess.
Telecined footage uses interlacing technology and contains combed frames but it is fundamentally different from interlaced video. You can find more about it here:
https://en.wikipedia.org/wiki/Telecine
https://www.animemusicvideos.org/guides/avtech31/theory-videointerlace.html
For Avisynth filters you may also find this tutorial useful:
https://www.animemusicvideos.org/guides/avtech31/post-qual.htmlLast edited by Sharc; 10th May 2021 at 03:12.
-
Thank you. I will research this tonight
That's good to know, thank you
Thank you very much for explaining this to me. To be honest, I didn't really understand what telecine was. Will do some research on it tonight
-------------------------------------------------------------------------------------------------------------------------------------------------------
I've used the QTGMC filter for the first time yesterday. The difference compared to yadifmod2 is incredible:
Here a basic test example:
yadifmod2
[Attachment 58801 - Click to enlarge]
QTGMC
[Attachment 58802 - Click to enlarge]
Thank you, jagabo, for recommending it to me -
-
TFM().TDecimate() will look more like the QTGMC() output. And it will be much faster.
A word of warning though -- anime/cartoons are often a mixture of underlying frame rates. They are basically drawn at 12p (sometimes 8p) with panning shots at 24p -- all on film as 24 fps (12p elements appear for two film frames, 8p elements for 3 film frames). The film is then telecined to 59.94 fields per second (store digitally as 29.97 interlaced frames per second). But they are often edited as telecined video with titles/effects added as 29.97p or 29.97i. And the title sequences (sometimes even parts of the main show) often have shots that were slowed down or sped up to match the music/action. So an inverse telecine to 23.97fp will often lead to jerky playback of those other elements. -
-
-
29.97fps.
I checked again. Think something went wrong the first time. I now get aaabbcccddeeeffggg.
I read about TFM().TDecimate(). It's incredibly daunting and complex. Should I use something like this to start with?:
Code:TDecimate(Mode=2, rate=23.976)
-
-
Apologies. The clip had no audio.
Last edited by LighthouseonaCliff; 10th May 2021 at 18:23.
-
Yes, that's simple telecined film.
It's quite simple in this case:
Code:TFM() TDecimate()
-
-
Thank you for taking a look. Yeah, the quality leaves much to be desired
I tried it, and the result is quite good. QTGMC stutters quite a bit when panning, while using your method makes it a lot smoother. QTGMC makes the lines look slightly better, but that's nitpicking and can hardly be seen at a normal viewing distance.
It took only 6 1/2 minutes, while QTGMC took 32 minutes
Thank you! -
That sample is not all 24p with pulldown. At least some shots have been slowed down. A simple IVTC will leave you with duplicate frames. After trimming the first 11 black frames (there's no way to tell which are dups) examining the video with DeDup() shows 281 unique frames out of 373. That puts the overall frame rate about 22.578 fps. The body of the video is most likely to be 23.976 fps. Assuming so, there are a few ways you can deal with this. You could just IVTC to 23.976 fps and live with a slightly jerky intro. You could QTGMC() (or other 2x deinterlace) to 59.94 fps. The result will look the same as watching the original DVD on a 59.94 fps TV. Or you could use variable frame rate encoding (pretty much a PITA).
-
It doesn't have to be perfect. The dot crawl and rainbowing did bother me a lot. I'm glad that is almost completely gone.
Checkmate seems to be the best of the dot crawl filters. I tested the following:
DeCrawl: Almost no difference at default settings. Upping the setting makes the video look bad.
DeDot: Almost no difference at default settings. Upping the settings doesn't do that much.
Checkmate removes almost all the dot crawl except for the really bad ones. Upping the settings makes the video look blended. Read that checkmate is not good with fast moving scenes, but it looks quite good compared to the others I've tried.
I did try:
Code:a = LWlibavAudioSource("H:\Avisynth\Digimon Digital Monsters S01E01.mkv") v = LWlibavVideoSource("H:\Avisynth\Digimon Digital Monsters S01E01.mkv") AudioDub(v,a) ConverttoYv12() TFM() TDecimate(Mode=2, rate=23.976) QTGMC( Preset="Slow", TR2=2 ) Crop(10, 0, -10, -0) #Left, top, right, bottom. Checkmate(thr=25, max=25, tthr2=10) ChubbyRain2(th=2, radius=2, show=false, sft=2, interlaced=false)
The result looks good, but it took an hour. The previous settings took 6 1/2 minutes. Side-by-side, I see little difference. -
There's also DotKill
http://avisynth.nl/index.php/DotKill
It's painfully slow (on my poor pc) .. but you can try this too.
Anyway.. since the source it's pure telecined NTSC material I think tdecimate with mode 1 is exactly the same, it will perfectly inverse telecine and keep the standard framerate (without the need to set the rate parameter)..
Mode 2 is useful if you want to achieve an arbitrary frame rate.. different from the standard (for telecined material).. but if you only want to return to the original frame rate.. mode 1 (the one I always use on these kind of sources) does the job fine. -
-
I really like your enthusiasm .. and exchanging infos and opinions is funny and useful since we always learn new things ..
-
A few things...
ConvertToYV12() should be ConvertToYV12(interlaced=true) -- since the video is interlaced at this point. Without the interlaced argument it will blend the chroma of the two fields together. Fortunately, video is already YV12 so the filter isn't doing anything here.
Checkmate() works best while the video is still interlaced. So it should be used before TFM().
The Checkmate() settings are too high. It is causing ghosting of previous/next frames. Weaker settings will reduce that ghosting.
There's no point in doubling the frame rate with QTGMC() after decimation. If you want to use it for its other cleanup properties use InputType=2, or FPSDivisor=2, or SelectEven() after.
I modified the script to:
Code:a = LWlibavAudioSource("H:\Avisynth\Digimon Digital Monsters S01E01.mkv") v = LWlibavVideoSource("H:\Avisynth\Digimon Digital Monsters S01E01.mkv") AudioDub(v,a) CheckMate(thr=10, max=20, tthr2=0) # tthr2 up to 10 might be ok, might produce more ghosting TFM() Santiag(strh=2, strv=2) # reduce the residual dot crawl TDecimate(mode=2, rate=23.96) #QTGMC( Preset="Slow", TR2=2 ).SelectEven() aWarpSharp2(depth=5) # resharpen after Santiag() Crop(10, 0, -10, -0) #Left, top, right, bottom. #ChubbyRain2(th=2, radius=2, show=false, sft=2, interlaced=false)
Similar Threads
-
Can't understand this frame rate
By ZetaStax in forum Video ConversionReplies: 5Last Post: 12th Aug 2020, 17:40 -
Trying to understand the details of a specific 3D File
By doctorm in forum Video ConversionReplies: 5Last Post: 3rd Jun 2020, 01:06 -
Help me to understand why I got noise in capturing
By thecode in forum CapturingReplies: 11Last Post: 14th Apr 2020, 17:57 -
Help me to understand the NTSC signal fields
By Videogamer555 in forum CapturingReplies: 26Last Post: 6th Aug 2019, 11:52 -
Help trying to understand VLC stream feature better
By xAlienxx in forum Newbie / General discussionsReplies: 0Last Post: 21st Dec 2018, 19:13