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 28th March 2015, 18:00   #1  |  Link
Taizenshū
Registered User
 
Join Date: Jul 2013
Posts: 17
Deinterlacing Blu-ray (Anime)

I'm having a really hard time deinterlacing this anime, I tried using things from ITVC to QTGMC but the lines would sometimes look weird.

Here are some samples (I used tsmuxer to split them):
https://www.dropbox.com/sh/8qal0ylsz...rYZ-9dMba?dl=0
Taizenshū is offline   Reply With Quote
Old 28th March 2015, 21:02   #2  |  Link
ndjamena
Registered User
 
Join Date: Sep 2012
Posts: 366
Code:
FFVideoSource("EP1.split.1.m2ts").assumefps("ntsc_video")
separatefields() #QTGMC()
Dup(Threshold=6.0, blend=true)
tdecimate(mode=2)
NNEDI3_Resize16(1920, 1080) #or not

Last edited by ndjamena; 29th March 2015 at 05:03.
ndjamena is offline   Reply With Quote
Old 29th March 2015, 06:55   #3  |  Link
bxyhxyh
Registered User
 
Join Date: Dec 2011
Posts: 354
TFM().TDecimate(mode=1) should work on this

How lines look weird? Please provide some examples.
bxyhxyh is offline   Reply With Quote
Old 29th March 2015, 10:58   #4  |  Link
ndjamena
Registered User
 
Join Date: Sep 2012
Posts: 366


The fields are slightly different. I think at least some of the fields were upscaled from SD to HD without being deinterlaced. I can't really tell, maybe it all has.

I've being testing out Jagabo's scripts from this VideoHelp Thread:

http://forum.videohelp.com/threads/3...cing-and-edges

but it gives terrible aliasing and generally looks like crap.

The frame rate in this one is even further off, there's fields lost in editing and I'm pretty sure some of it is full NTSC frame rate.

-edit- there's no setting in Dup that will merge the fields without destroying frames it shouldn't, I tried fiddling with QTGMC and ReDup to see if I could get something working but after being deinterlaced some of the derived top/bottom field frames have more differences to each other than they do against some of their original frame neighbours.
Attached Images
 

Last edited by ndjamena; 29th March 2015 at 11:03.
ndjamena is offline   Reply With Quote
Old 3rd April 2015, 09:32   #5  |  Link
Taizenshū
Registered User
 
Join Date: Jul 2013
Posts: 17
Quote:
Originally Posted by bxyhxyh View Post
TFM().TDecimate(mode=1) should work on this

How lines look weird? Please provide some examples.
Look at the characters right hand here:
https://www.dropbox.com/s/2y571y7yknkp396/Try1.mkv?dl=1

Also the subtitles:
https://www.dropbox.com/s/zz83l7nw5ojo4r0/Try2.mkv?dl=1

Quote:
Originally Posted by ndjamena View Post
Code:
FFVideoSource("EP1.split.1.m2ts").assumefps("ntsc_video")
separatefields() #QTGMC()
Dup(Threshold=6.0, blend=true)
tdecimate(mode=2)
NNEDI3_Resize16(1920, 1080) #or not
Your script probably gave me the worst result, the lines just looked terrible.
Taizenshū is offline   Reply With Quote
Old 3rd April 2015, 11:29   #6  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
maybe this will help http://forum.doom9.org/showthread.php?t=158696
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 3rd April 2015, 13:27   #7  |  Link
DeathAngelBR
Registered User
 
Join Date: Nov 2006
Posts: 83
I'm not sure if this will work:

Code:
orig = last
_deint = tdeint(emask=orig.TMM(),slow=2)
#also try without the emask parameter
tfm(slow=2,clip2=_deint).tdecimate(mode=1)
or a 2-pass encode

Code:
#1st pass

tfm(slow=2,pp=1,output="tfm_file.txt")
Code:
#2nd pass

orig = last
tfm(slow=2,pp=1,input="tfm_file.txt")
tdeint(hints=true,clip2=orig,slow=2)
tdecimate(exPP=1,mode=1,tfmin="tfm_file.txt")
DeathAngelBR is offline   Reply With Quote
Old 3rd April 2015, 14:55   #8  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 673
My attempt:

Code:
LoadPlugin("C:\Portables\MeGUI\tools\lsmash\LSMASHSource.dll")
LWLibavVideoSource("C:\Users\Isra\Desktop\EP1.split.15.m2ts")

complementparity()
separatefields()
supaa2()
assumefieldbased.weave()
qtgmc(preset="fast", fpsdivisor=2, lossless=2, sourcematch=2)
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite
Overdrive80 is offline   Reply With Quote
Old 3rd April 2015, 17:52   #9  |  Link
Taizenshū
Registered User
 
Join Date: Jul 2013
Posts: 17
@DeathAngelBR your script was sped up at the end.

@Overdrive80 Your video would keep playing and pausing.

All scripts seem to have that subtitle line issue I mentioned earlier. Why is this source such a pain to work with?
Taizenshū is offline   Reply With Quote
Old 3rd April 2015, 20:20   #10  |  Link
kuchikirukia
Registered User
 
Join Date: Oct 2014
Posts: 476
Some idea of what file you're working on would be useful. "Try2" tells me nothing.

Moon runes can be a problem because it detects them as combed. Try turning off postprocessing.

tfm(pp=0).tdecimate(mode=1,hybrid=0)

You can play around with santiag for the residual combing.
A deinterlacer is the wrong tool here. This is just telecined.

Last edited by kuchikirukia; 4th April 2015 at 02:49.
kuchikirukia is offline   Reply With Quote
Old 3rd April 2015, 23:03   #11  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
Quote:
Originally Posted by Taizenshū View Post
@DeathAngelBR your script was sped up at the end.

@Overdrive80 Your video would keep playing and pausing.

All scripts seem to have that subtitle line issue I mentioned earlier. Why is this source such a pain to work with?
Because it's crap source which should never end up on Blu-ray.
Resize it to half resolution vertically and upscale back with nnedi3.
kolak is offline   Reply With Quote
Old 4th April 2015, 06:28   #12  |  Link
bxyhxyh
Registered User
 
Join Date: Dec 2011
Posts: 354
Quote:
Originally Posted by Taizenshū View Post
Look at the characters right hand here:
https://www.dropbox.com/s/2y571y7yknkp396/Try1.mkv?dl=1
Which part is it, in your samples?
bxyhxyh is offline   Reply With Quote
Old 4th April 2015, 06:37   #13  |  Link
Taizenshū
Registered User
 
Join Date: Jul 2013
Posts: 17
Quote:
Originally Posted by bxyhxyh View Post
Which part is it, in your samples?
I'll upload it now. It's from another episode, I just wanted to test out to see if it works with other episodes.

Not sure if this info would be useful:
Code:
General
ID                                       : 0 (0x0)
Complete name                            : D:\Videos\Gintama\FullDisc\GINTAMA_BD_BOX1_1\BDMV\STREAM\00001.m2ts
Format                                   : BDAV
Format/Info                              : Blu-ray Video
File size                                : 5.29 GiB
Duration                                 : 24mn 55s
Overall bit rate mode                    : Variable
Overall bit rate                         : 30.4 Mbps
Maximum Overall bit rate                 : 48.0 Mbps

Video
ID                                       : 4113 (0x1011)
Menu ID                                  : 1 (0x1)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.1
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Codec ID                                 : 27
Duration                                 : 24mn 56s
Bit rate mode                            : Variable
Bit rate                                 : 27.7 Mbps
Maximum bit rate                         : 40.0 Mbps
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 29.970 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : MBAFF
Bits/(Pixel*Frame)                       : 0.445
Stream size                              : 4.82 GiB (91%)

Audio
ID                                       : 4352 (0x1100)
Menu ID                                  : 1 (0x1)
Format                                   : PCM
Format settings, Endianness              : Big
Format settings, Sign                    : Signed
Muxing mode                              : Blu-ray
Codec ID                                 : 128
Duration                                 : 24mn 56s
Bit rate mode                            : Constant
Bit rate                                 : 1 536 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Stream size                              : 274 MiB (5%)

Text
ID                                       : 4608 (0x1200)
Menu ID                                  : 1 (0x1)
Format                                   : PGS
Codec ID                                 : 144
Duration                                 : 24mn 53s
Delay relative to video                  : 1s 502ms

Last edited by Taizenshū; 4th April 2015 at 08:25.
Taizenshū is offline   Reply With Quote
Old 4th April 2015, 11:54   #14  |  Link
ndjamena
Registered User
 
Join Date: Sep 2012
Posts: 366
No, it's not. None of us are miracle workers and your source is borked. Anyone assuming it's simply telecined or hybrid isn't paying attention and any script that doesn't involve either blending or downsizing is wasting your time.

If I could finish ReDup blending may be an option, but since that's not happening you have no choice but to downsize or live with the messed up lines.
ndjamena is offline   Reply With Quote
Old 4th April 2015, 16:06   #15  |  Link
bxyhxyh
Registered User
 
Join Date: Dec 2011
Posts: 354
@Taizenshu
Please upload the source of try1.mkv, anyway.
Maybe other people would help.

Last edited by bxyhxyh; 4th April 2015 at 16:16.
bxyhxyh is offline   Reply With Quote
Old 4th April 2015, 17:43   #16  |  Link
Taizenshū
Registered User
 
Join Date: Jul 2013
Posts: 17
Quote:
Originally Posted by ndjamena View Post
No, it's not. None of us are miracle workers and your source is borked. Anyone assuming it's simply telecined or hybrid isn't paying attention and any script that doesn't involve either blending or downsizing is wasting your time.

If I could finish ReDup blending may be an option, but since that's not happening you have no choice but to downsize or live with the messed up lines.
Damn, really disappointed in this release. Oh well, thanks for trying.

Quote:
Originally Posted by bxyhxyh View Post
@Taizenshu
Please upload the source of try1.mkv, anyway.
Maybe other people would help.
https://www.dropbox.com/s/asdzlicjj1...it.9.m2ts?dl=0
Taizenshū is offline   Reply With Quote
Old 5th April 2015, 07:20   #17  |  Link
kuchikirukia
Registered User
 
Join Date: Oct 2014
Posts: 476
tfm(order=1, pp=0).tdecimate(mode=1,hybrid=0)

It's not perfect, but I'm not finding antialiasing that's working to clean up the rest and that seems to be the core of what you need so it's good enough for me.
kuchikirukia is offline   Reply With Quote
Old 6th April 2015, 08:24   #18  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 712
These are typical artefacts from an Interlaced SD master → Imperfect IVTC/Deinterlacing → Upscaling → Interlacing/Pulldown process. The problem is that a “smart” deinterlacer is used, trying to detect which parts of the picture should be field-matched and which parts should be deinterlaced. Sometimes the detection fails and the wrong processing is applied.

The best thing to do is to IVTC without caring about the residual combing (just TFM/TDecimate with basic parameters) then reduce the resolution to something close to the original so the combing is removed, leaving just slight ghosting, or run DAA3 on the result if you want too keep the upscaled resolution.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding
cretindesalpes is offline   Reply With Quote
Old 18th April 2015, 03:58   #19  |  Link
Taizenshū
Registered User
 
Join Date: Jul 2013
Posts: 17
I should've mentioned that I actually wanted to downsize the resolution to 768x576. Would that make it easier?
Taizenshū 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 08:38.


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