Log in

View Full Version : UpConvert DV NTSC old Japanese Anime to HD upscaled


Tantei
6th May 2018, 03:13
Hello everyone,
I'm new but I have read this forum for many years. My first language is Spanish, so, could be some mistakes.

My question is actually a request for advises to find the best way to convert a SD video to a 1080i or 720p upscaled.

The source video is a Japanese anime produced in 1977, I have the digital video files in:
DV (DV25) NTSC 720x480
interlaced bottom field first, 29.97 (59.94 fields), color 4:1:1

I know there is several tools, I just want advises and opinions about it, the best way to convert the video without losing color or frames.

Deinterlace is an option, but I really don't know the best deinterlacer for old anime.
Without deinterlace for example, direct to 1080i 59.94 would be other option, I don't know if both fields upscale separately or the change from bottom to top fields first would destroy *the entire galaxy* (dejará la cagada) :confused:

Thanks for watching :D

manono
6th May 2018, 22:11
Hello, and welcome to the forums.

The best AviSynth upscaler is Nnedi3_rpow2 (http://avisynth.nl/index.php/Nnedi3/nnedi3_rpow2). An example for a script might go:

nnedi3_rpow2(rfactor=2,cshift="Spline16resize",fwidth=1920,fheight=1080)

I usually follow upscaling with some sharpening. Others might do it differently.
Deinterlace is an option, but I really don't know the best deinterlacer for old anime.
Most likely it shouldn't be deinterlaced but IVTC'd. Please provide a 10 second sample from the source DVD so we can have a look and confirm.

...the best way to convert the video without losing color or frames.
When upscaling DVD to hi-def, you should also convert the colorimetry to Rec.709 from the source Rec.601.

Tantei
6th May 2018, 23:04
Hello, and welcome to the forums.
...
Most likely it shouldn't be deinterlaced but IVTC'd. Please provide a 10 second sample from the source DVD so we can have a look and confirm.


Thanks!

I must begin this work the next week, so for now I am testing the direct convert using adobe media encoder without deinterlacing neither IVTC, because I already tried avisynth and I failed, some people send me their scripts suggestions and I also failed because I don't have the scripts or plugins they used. If I learn a better way from yours, I have one week to learn.

This is my video sample, one minute:
https://drive.google.com/open?id=1TJJDrSWkZD447v43zICdLd74JK4HXmcU
please download it, because the visualization is low resolution "youtube" like.

When I tried some avisynth scripts, the result was ugly like this:
http://i66.tinypic.com/1zb6kgm.png
from the original interlaced source:
http://i68.tinypic.com/2dbtic9.png


I read somewhere that there is a software called "Shotcut", it says:
you will see many predefined (upscaling) resolutions under “Stock” from which you can choose any resolution you want to upscale your video
http://cdn.ilovefreesoftware.com/wp-content/uploads/2017/07/upscale-video.png
I don't know if it is good or not.


I know this forum is mostly Avisynth, though it is very complicated for me but if there is the best option for quality, I would try again. That brings me another question:

My MeGUI only allows me to convert to mp4/x264 and I need hi resolution (50 Mbps or up, .mov or .mxf ) ¿it is possible using avisynth and Megui??

I'm sorry, I'm newbie :o

SeeMoreDigital
7th May 2018, 11:18
This is my video sample, one minute:
https://drive.google.com/open?id=1TJJDrSWkZD447v43zICdLd74JK4HXmcU
please download it, because the visualization is low resolution "youtube" like.It would appear that your DV sample isn't 'pure' interlaced. It contains progressive frames with regular 3:2 pull-down...

Tantei
7th May 2018, 19:29
It would appear that your DV sample isn't 'pure' interlaced. It contains progressive frames with regular 3:2 pull-down...

I didn't think about it... I just thought that deinterlacing would make progressive frames but actually, I read about inverse telecine before, I'm confused right now.

In fact I do need some inverse telecine 3:2 pull-down, in my tests I used
TIVTC.dll
tfm(order=0,mode=5,pp=0).tdecimate()

and the result was awful as the picture posted before.

Thanks again.

SeeMoreDigital
7th May 2018, 19:56
@Tantei,

I ran your DV sample through VirtualDub2 (https://forum.doom9.org/showthread.php?t=172021) with the 'IVTC' filter and 'Reduce Frame Rate' enabled. It played perfectly :)

Tantei
8th May 2018, 00:51
@Tantei,

I ran your DV sample through VirtualDub2 (https://forum.doom9.org/showthread.php?t=172021) with the 'IVTC' filter and 'Reduce Frame Rate' enabled. It played perfectly :)


Thanks, I downloaded this new version of Virtualdub. I'm always having problems with this kind of interlaced frames/fields:

https://thumb.ibb.co/gPS7Jn/Remi_IVTC.png (https://ibb.co/gPS7Jn)

I'm doing test with this one minute video, but in several 23min episodes I worry there would be a lot of this kind of ugly deinterlaced frames...

Well well... I should reinstall Avisynth after all because there is no magic solution

:thanks:

Revan654
9th May 2018, 02:57
Hello everyone,
I'm new but I have read this forum for many years. My first language is Spanish, so, could be some mistakes.

My question is actually a request for advises to find the best way to convert a SD video to a 1080i or 720p upscaled.

The source video is a Japanese anime produced in 1977, I have the digital video files in:
DV (DV25) NTSC 720x480
interlaced bottom field first, 29.97 (59.94 fields), color 4:1:1

I know there is several tools, I just want advises and opinions about it, the best way to convert the video without losing color or frames.

Deinterlace is an option, but I really don't know the best deinterlacer for old anime.
Without deinterlace for example, direct to 1080i 59.94 would be other option, I don't know if both fields upscale separately or the change from bottom to top fields first would destroy *the entire galaxy* (dejará la cagada) :confused:

Thanks for watching :D

This is what I came up with using the supplied sample. Used Avs script to create the picture posted below.

Plugins()
FFVideoSource("Path to Video", colorspace = "YV12", \
cachefile = "Path to Index.ffindex")
ConvertToYV12()
KNLMeansCL(D = 1, A = 1, h = 2)# Alter the h value until you arrive at the desired picture(denoise).
hqdn3d(ls = 4.0, cs=3.0, lt=6.0, ct=4.5, restart=7) (Secondary denoiser if needed)
QTGMC( Preset = "slower", InputType=3, ProgSADMask=0.0, SourceMatch=3, Sharpness=0.0, TR2=2, EdiThreads=8 )#deinterlace the picture
xaa()#only if some Anti-Alising is needed
SmoothD2(quant=3, num_shift=3, Matrix=3, Qtype=1, ZW=1, ZWce=1, ZWlmDark=0, ZWlmBright=255, ncpu=2) #apply if artifacts appear in the picture.
Spline64ResizeMT(1920, 1408, prefetch = 4)#The AR remains intact but also upscales & sharpens the picture.

https://i.imgur.com/OtvSzAvl.png
https://i.imgur.com/CZs1svKl.png

manono
9th May 2018, 09:19
...so for now I am testing the direct convert using adobe media encoder without deinterlacing neither IVTC, because I already tried avisynth and I failed...
If you work with anime, you learn AviSynth. Period. Forget Adobe or Shotcut or anything else. As already mentioned by SeeMoreDigital, it IVTC's easily and perfectly. I used a simple:

FFVideoSource("REMI CAP 25 DV TROZO.avi").ConvertToYV12(Interlaced=True)
TFM().TDecimate(Mode=1)

You don't want or need to bob it when you can IVTC it back to its original 23.976fps. Yes, it can use some denoising and upscaling. For the upscaling I think you're just wasting your time but I already mentioned I'd use Nnedi3_rpow2. Different people do things differently.

Revan654
9th May 2018, 19:31
If you work with anime, you learn AviSynth. Period. Forget Adobe or Shotcut or anything else. As already mentioned by SeeMoreDigital, it IVTC's easily and perfectly. I used a simple:

FFVideoSource("REMI CAP 25 DV TROZO.avi").ConvertToYV12(Interlaced=True)
TFM().TDecimate(Mode=1)

You don't want or need to bob it when you can IVTC it back to its original 23.976fps. Yes, it can use some denoising and upscaling. For the upscaling I think you're just wasting your time but I already mentioned I'd use Nnedi3_rpow2. Different people do things differently.

For majority of the time Upscaling is a bad idea. Specially for the analogue era. Since you will be introducing other issues into the picture like artifacts and such.

Not sure how Nnedi3_rpow2 stacks against other upscaling filters/plugins like SuperRes.

to OP: you can try Blackmagic's davinci 15 (Current in Beta 2). Which has a built in Upscaler (can do up to x4). Make sure you have a powerful enough GPU before trying, since the program uses GPU for most operations.

Taurus
12th May 2018, 17:40
@Revan654:
QTGMC( Preset = "slower", InputType=3, ProgSADMask=0.0, SourceMatch=3, Sharpness=0.0, TR2=2, EdiThreads=8 )#deinterlace the picture
This does not deinterlace.
InputType=1,2,3 are for progressive content. Mainly stabilizing, degraining/denoising, sharpening, etc......

SeeMoreDigital
12th May 2018, 18:38
@Revan654:

This does not deinterlace.
InputType=1,2,3 are for progressive content. Mainly stabilizing, degraining/denoising, sharpening, etc......The original posters source contains progressive frames with 3:2 pull-down

Taurus
12th May 2018, 18:54
The original posters source contains progressive frames with 3:2 pull-down
Yes , I know :D.
Just wanted to help some noobs to not be trapped by the various QTGMC settings.
You know, not everybody is reading the doc's and faq's coming
with the plugins or srcipts....:mad::p

manono
12th May 2018, 19:10
This does not deinterlace.
InputType=1,2,3 are for progressive content. Mainly stabilizing, degraining/denoising, sharpening, etc......

You're absolutely right and I didn't even notice that earlier - that it doesn't even bob it with that script he used.

Revan654
12th May 2018, 19:13
@Revan654:

This does not deinterlace.
InputType=1,2,3 are for progressive content. Mainly stabilizing, degraining/denoising, sharpening, etc......

Mode 2 & 3 does both Progressive with deinterlace. It seems there are some progressive Frames in the source material. It's why I used 1,2 or 3 is used over mode 0 which is for pure interlaced source.

manono
13th May 2018, 19:46
Mode 2 & 3 does both Progressive with deinterlace.
While they might deinterlace as a side benefit, their main function isn't to deinterlace. That is done by the 'normal' use of QTGMC and the deinterlacing Modes 2 and 3 do is very different and inferior. They are for use with very damaged sources, something you don't have here. From the doc:

InputType=2,3 are designed for badly deinterlaced material with considerable horizontal artefacts. These modes drop half the fields and recreate an interlaced stream from the others, which is then treated in the normal way. Mode 3 differs from mode 2 only in that it complements field parity of the input.

It seems there are some progressive Frames in the source material.
Yes, it's been hard telecined (3 progressive and 2 interlaced in every 5 frames). The way you 'fix' that is with an Inverse Telecine - an IVTC - not by deinterlacing.

Tantei
29th May 2018, 00:02
Thanks to all of you :D

The "new" Virtualdub works great and I think I will use the IVTC filter to make progressive 23.976 (24p) episodes and then upscale to HD.

I won't use "YV12" avisynth filters because I don't want to reduce the color space even more: it's already 4:1:1 (DV) and I need 4:2:2 upscaled to HD.

The TV station is asking for HD so we need to upscale anyway, otherwise the TV station would have to convert themselves the SD videos to HD broadcast (all channels are broadcasting HD nowadays) and I think the quality of that upscaling will be worse than sending an upscaled video using these techniques (IVTC and avisynth filters that I don't know how to use yet).

My problem right now is still these weird inverse telecined frames:
https://thumb.ibb.co/gPS7Jn/Remi_IVTC.png (https://ibb.co/gPS7Jn)


But it's just one frame in one minute video, maybe 24 ugly frames in a 24minutes episode?? not so much :)


I need to check the End Credits because it appears to be interlaced and not telecined

foxyshadis
29th May 2018, 06:28
Once deinterlaced, 4:1:1->4:2:0->4:2:2 isn't an important transition as long as some chroma fidelity remains. Try it and see how little difference there is. 4:1:1 is already the lowest quality, so mixing in neighbor pixels usually doesn't change much.

Mild residual combs in your screenshot can be tackled with Vinverse, or better yet, whatever general denoiser you plan to use (fft3d? tbilateral? mctd?). Residual combs are the least of your problem in a noisy frame like that.

Tantei
2nd June 2018, 23:41
Once deinterlaced, 4:1:1->4:2:0->4:2:2

I was wrongly thinking YV12 was 4:1:0 but it is 4:2:0 like DVD NTSC, you are right.


The procedure is clear now:
IVTC and denoise combs, obtain a better image and then upscale.

If I can't denoise combs then rather do nothing and only upscale the interlaced video. The final video would be 1080i for broadcast.


I have no more questions about my initial request, I only need to learn to apply denoise filters and this forum has a lot of info I must study.


Regarding other subject, if I have another videos of anime that are PAL (25 frames not speeded-up) and I want to convert to 24 frames progressive (or 23.976) ¿how it is called the procedure so I can look for the pluggin? I know IVTC is only for NTSC and I know for PAL it is called " 2:2 pulldown " but I don't know the name of the plugin or filter to do it.

:confused:

foxyshadis
3rd June 2018, 11:10
Regarding other subject, if I have another videos of anime that are PAL (25 frames not speeded-up) and I want to convert to 24 frames progressive (or 23.976) ¿how it is called the procedure so I can look for the pluggin? I know IVTC is only for NTSC and I know for PAL it is called " 2:2 pulldown " but I don't know the name of the plugin or filter to do it.

:confused:

All of the IVTC plugins support that, such as tfm().tdecimate(cycle=25) or telecide().decimate(cycle=25).

manono
3rd June 2018, 19:14
All of the IVTC plugins support that, such as tfm().tdecimate(cycle=25) or telecide().decimate(cycle=25).
Field-blending from 24->25fps is also common (perhaps more common than 'telecining'), in which case you bob it followed by using an unblender such as Srestore. A sample might prove useful.