Log in

View Full Version : Best way to deinterlace DVD animation within ffmpeg?


mzso
27th November 2019, 13:58
Hi!

I want to encode an animated series form the originial format of the DVD, to AVC (maybe HEVC?).
What's the best way to deinterlace?

The video properties are like this:
Video
ID : 1
Format : MPEG Video
Format version : Version 2
Format profile : Main@Main
Format settings : CustomMatrix / BVOP
Format settings, BVOP : Yes
Format settings, Matrix : Custom
Format settings, GOP : M=3, N=15
Format settings, picture structure : Frame
Codec ID : V_MPEG2
Codec ID/Info : MPEG 1 or 2 Video
Duration : 22 min 2 s
Bit rate mode : Variable
Bit rate : 5 102 kb/s
Maximum bit rate : 7 500 kb/s
Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Frame rate mode : Variable
Frame rate : 29.970 FPS
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Bottom Field First
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.493
Time code of first frame : 00:00:05;00
Time code source : Group of pictures header
GOP, Open/Closed : Closed
Stream size : 804 MiB (93%)
Title : Original
Language : English
Default : Yes
Forced : No
Color primaries : BT.601 NTSC
Transfer characteristics : BT.601
Matrix coefficients : BT.601

huhn
27th November 2019, 14:34
rule 12.

is it even interlaced not telecine or a mix of both?

Ghitulescu
27th November 2019, 16:27
Half of this forum appears to be dedicated to anime and their deinterlacing.

I am sure the OP will find the right answer therein.

manono
28th November 2019, 08:47
huhn made the correct response.

Post a sample - 10 seconds or so direct from the source - so we can have a look and decide how it should be treated. If you don't know how already, DGIndex can cut an M2V from the DVD.

Balling
28th August 2021, 16:26
The very beggining of it can be interlaced but Mediainfo does not scan all the file. It can switch to progressive or some other form of cadence, even 8:7 cadence for anime. There is no simple way to deinterlace, detelecine and decadence it.

Katie Boundary
28th August 2021, 21:39
If you can't be bothered to look at the video stream and figure out what horrible things were done to it and the best way to fix them, and you're just looking for a one-size-fits-all solution that can convert even the most pathological kinds of content into something that looks like what you'd see on a TV screen, then try this:

mpeg2source("blahblah.d2v").tfm(mode=0,pp=0,micmatching=0).converttorgb(interlaced=true)


GeneralConvolution(0, "
0 1 0
0 2 0
0 1 0 ")

GeneralConvolution(0, "
0 -1 0
0 6 0
0 -1 0 ")

However, this assumes that the source was intended to be pathological (retrograde field behavior and such). If there are blended frames due to incorrect frame rate conversion, then you're in a whole other world of shit.

huhn made the correct response.

Post a sample - 10 seconds or so direct from the source - so we can have a look and decide how it should be treated. If you don't know how already, DGIndex can cut an M2V from the DVD.

Even 10 seconds isn't enough. Have you ever looked at the Captain Planet DVDs? Some of it is straight film with soft telecine, some of it is film with hard telecine, and some of it looks like it was captured from VHS tapes that had been left in a car's glove box for too long. It changes not just from one episode to another, but within each episode.

manono
30th August 2021, 04:25
Even 10 seconds isn't enough.
Sometimes it is; sometimes it isn't. While anime can be difficult, the majority follow the 'rules'.

The fellow asked a generic question using the incorrect term 'deinterlace'. A request for a generic untouched 10 second sample (never provided in a 2-year-old thread) was the right answer.

i990049
10th January 2023, 04:43
ffmpeg doesn't has the best filter. My suggest is qtgmc, which is available in hybrid.
https://www.selur.de/

richardpl
10th January 2023, 10:26
Not correct, the ffmpeg filter is best. QTGMC modifies by default both fields and thus is wrong.

kolak
10th January 2023, 12:27
Which ffmpeg filter is 'best' for it ?

Sharc
10th January 2023, 12:51
Not correct, the ffmpeg filter is best. QTGMC modifies by default both fields and thus is wrong.
Use QTGMC(lossless=1) to keep the fields intact.