View Full Version : What is the best way to encode a cartoon?
Logan9778
23rd April 2018, 00:38
Hey guys!
I'm asking this, because I have an old Donald Duck cartoon on DVD that I want to encode to x264/MKV, and put on my home movie server.
The problem is, I realize that while the majority of it seems to be soft telecine, it has two spots that I think are interlaced.
This is the code I have come up with so far.
LoadPlugin("C:\DGDecNV2053\DGDecodeNV.dll")
SetWorkingDir("C:\Program Files (x86)\AviSynth\plugins")
SetMTMode(5,6)
clip=DGSource("F:\Test Space\Donald Duck 1\title06.dgi",fieldop=1)
SetMTMode(2)
clip1=Trim(clip,0,71).QTGMC(FPSDivisor=1,Preset="Placebo",Edithreads=4).ChangeFPS("ntsc_film")
clip2=Trim(clip,72,152)
clip3=Trim(clip,153,187).AssumeBFF().QTGMC(FPSDivisor=1,Preset="Placebo",Edithreads=4).ChangeFPS("ntsc_film")
clip4=Trim(clip,188,12763)
final_clip=clip1+clip2+clip3+clip4
Crop(final_clip,8,2,-8,-2)
Here is the .dgi file I am using generated by DGIndexNV. It seems to show two Frame Sections (0-71 and 153-187) that are interlaced. 153-187 seems to be BFF if I am reading it right.
https://mega.nz/#!OWwyxaoY!Ag1BQW-0Bi8iCGB3uz-E4W0RgFKoaUNLMWkT2NOOg_4
Please offer any corrections if i'm wrong. This is the first time I've ever tried to work with a cartoon.
It seems to work ok, but using the original sound track seems a split second off at the beginning.
Is there a better way to do this? Any suggestions?
Thanks!
EDIT: Here is a few seconds of the beginning of one of the DD cartoons that has what appears to be interlaced credits and a spot of BFF interlacing right after.
https://mega.nz/#!qbg1GAyI!QQHfUByHfG-HITGZ4e82i0L69Ke2awYOxJD941TLMzY
kuchikirukia
23rd April 2018, 04:12
Did you look at it?
Logan9778
23rd April 2018, 04:32
With all the stills, it's very hard to tell anything in the assumed interlaced sections (opening credits, donald's face). Only in one still, in the very first frame of the Donald Duck opening, where it shows Donald's face, can you see half the black frame before it being interlaced with the next frame which is Donald's face.
I"m really having to go by what the DGI says.
kuchikirukia
23rd April 2018, 07:00
If you can't see interlacing then you don't need to do anything. You can ignore what DGIndex puts out.
`Orum
23rd April 2018, 13:01
QTGMC() is meant for deinterlacing, not IVTC, correct? As this is definitely a TCed source, he should be using an IVTC filter instead, like TFM()/TDecimate()...
If there are left over fields that TFM can't match, then you can try and detect and deinterlace, or come up with alternative solutions, but I'd definitely go with something like TFM as a first pass.
burfadel
23rd April 2018, 16:34
What's the frame rate? Telecined is usually 29.97, progressive 23.976, native film is 24, PAL is 25 (or 30 in some regions). They're most likely originally native 24 fps, with frames changing at 24, 12, 6, or maybe 3 frames a second, the other frames being repeats. In such cases, 24 fps would be correct. Don't forget often this are copies of copies of original transfers with conversions in between, so that's how issues occur.
Katie Boundary
23rd April 2018, 19:09
Is there a particular reason why you don't think TFM(mode=0,pp=0,micmatching=0).tdecimate(mode=1) will work?
Logan9778
23rd April 2018, 19:50
What's the frame rate? Telecined is usually 29.97, progressive 23.976, native film is 24, PAL is 25 (or 30 in some regions). They're most likely originally native 24 fps, with frames changing at 24, 12, 6, or maybe 3 frames a second, the other frames being repeats. In such cases, 24 fps would be correct. Don't forget often this are copies of copies of original transfers with conversions in between, so that's how issues occur.
Frame rate according to DGIndexNV is 29.97, but that's if it is telecined on the fly.
Is there a particular reason why you don't think TFM(mode=0,pp=0,micmatching=0).tdecimate(mode=1) will work?
I'm not familiar with the IVTC filters yet, so I'll take a look at those. I just prefer QTGMC for deinterlacing as it does such a good job.
Well, according to DGIndexNV, the majority of the video is soft telecine, which means its film, with flags to tell the player to telecine it on the fly. So I set DGdecodeNV to fieldop=1, which tells the decoder to just ignore the flags, and output the frames unchanged.
The problem is, the opening credits, except for a small spot, seem to be interlaced. So, that's where I'm using QTGMC, to de-interlace them. Then I correct the fps with ChangeFPS.
If you look in the .dgi file I uploaded, you can see the pattern at the beginning of 3 1 0 0 (interlaced).
Quote from the DGIndexNV manual
DGI Format - Data Section Table of Contents
The data section consists of one-line specifiers identified with an upper-case keyword. For example:
SEQ 12321
SEQEXT 0
GOP 0 5
0:FRM B 3 1 0 0
1:FRM B 3 1 0 0
2:FRM I 3 1 0 0
3:FRM B 3 1 0 0
4:FRM B 3 1 0 0
5:FRM P 3 1 0 0
6:FRM B 3 1 0 0
7:FRM B 3 1 0 0
8:FRM P 3 1 0 0
9:FRM B 3 1 0 0
10:FRM B 3 1 0 0
11:FRM P 3 1 0 0
12:FRM B 3 1 0 0
13:FRM B 3 1 0 0
14:FRM P 3 1 0 0
...
SIZ 720 x 576
FPS 25000 / 1000
CODED 223
PLAYBACK 223
0.00% FILM
ORDER 1
The data section of a DGI file contains the indexing of the MPEG2 video stream. The syntax for each keyword line is as follows:
SEQ n: For elementary and transport streams, a sequence header is located at offset n (decimal) in the source file. For Matroska streams, a sequence header is located at timecode n (decimal) in the source file.
SEQEXT n: A sequence header extension is present for this sequence. If n is 1, then the sequence is a progressive sequence, otherwise it is not.
GOP n m: If n is -1 then this GOP does not contain a GOP header, otherwise a GOP header is present. If n is 1, the GOP is closed; if it is 0, the GOP is open. m is the colorimetry (matrix_coefficients) value.
n:FRM a b c d e: A frame of coding type a (I/P/B) is present in the source file. The remaining fields signal the following MPEG2 syntax elements: b is picture_structure, c is top_field_first, d is repeat_first_field, e is progressive_frame. Note that the FRM lines appear in display order. The number n preceding FRM is the frame number (without honoring pulldown).
SIZ W x H: The video frames have a coded width of W and a coded height of H.
FPS N / D: The frame rate of the video is N/D.
CODED n: The number of coded frames in the project.
PLAYBACK n: The number of playback frames in the project.
n% FILM: Specifies the percentage of flagged pure 3:2 content in the stream.
ORDER n: Specifies the field order of the project: 0 = progressive, 1 = TFF, 2 = BFF.
Here's what the start of the .dgi file is saying
DGMPGIndexFileNV17 X32
C:\Users\frito\Desktop\setup\
F:\Test Space\Donald Duck 1\title05.mkv 401988524
DEVICE 0
DECODE_MODES 0,0,0,0,0
STREAM 2
CLIP 0 0 0 0
RANGE 0 0 18446744073709551615 0
AUDIO
DEPTH 8
SEQ 0
SEQEXT 0
GOP 1 5
0:FRM I 3 1 0 0
1:FRM B 3 1 0 0
2:FRM B 3 1 0 0
3:FRM P 3 1 0 0
4:FRM B 3 1 0 0
5:FRM B 3 1 0 0
6:FRM P 3 1 0 0
7:FRM B 3 1 0 0
8:FRM B 3 1 0 0
9:FRM P 3 1 0 0
SEQ 400000000
SEQEXT 0
GOP 0 5
10:FRM B 3 1 0 0
11:FRM B 3 1 0 0
12:FRM I 3 1 0 0
13:FRM B 3 1 0 0
14:FRM B 3 1 0 0
15:FRM P 3 1 0 0
16:FRM B 3 1 0 0
17:FRM B 3 1 0 0
18:FRM P 3 1 0 0
19:FRM B 3 1 0 0
20:FRM B 3 1 0 0
21:FRM P 3 1 0 0
SEQ 801000000
SEQEXT 0
GOP 0 5
22:FRM B 3 1 0 0
23:FRM B 3 1 0 0
24:FRM I 3 1 0 0
25:FRM B 3 1 0 0
26:FRM B 3 1 0 0
27:FRM P 3 1 0 0
28:FRM B 3 1 0 0
29:FRM B 3 1 0 0
30:FRM P 3 1 0 0
31:FRM B 3 1 0 0
32:FRM B 3 1 0 0
33:FRM P 3 1 0 0
SEQ 1201000000
SEQEXT 0
GOP 0 5
34:FRM B 3 1 0 0
35:FRM B 3 1 0 0
36:FRM I 3 1 0 0
37:FRM B 3 1 0 0
38:FRM B 3 1 0 0
39:FRM P 3 1 0 0
40:FRM B 3 1 0 0
41:FRM B 3 1 0 0
42:FRM P 3 1 0 0
43:FRM B 3 1 0 0
44:FRM B 3 1 0 0
45:FRM P 3 1 0 0
SEQ 1602000000
SEQEXT 0
GOP 0 5
46:FRM B 3 1 0 0
47:FRM B 3 1 0 0
48:FRM I 3 1 0 0
49:FRM B 3 1 0 0
50:FRM B 3 1 0 0
51:FRM P 3 1 0 0
52:FRM B 3 1 0 0
53:FRM B 3 1 0 0
54:FRM P 3 1 0 0
SEQ 1902000000
SEQEXT 0
GOP 0 5
55:FRM B 3 1 0 0
56:FRM B 3 1 0 0
57:FRM I 3 1 0 0
58:FRM B 3 1 0 0
59:FRM B 3 1 0 0
60:FRM P 3 1 0 0
61:FRM B 3 1 1 1
62:FRM B 3 0 0 0
63:FRM P 3 0 1 1
64:FRM B 3 1 0 0
65:FRM B 3 1 1 1
66:FRM P 3 0 0 0
SEQ 2369000000
SEQEXT 0
GOP 0 5
67:FRM B 3 0 1 1
68:FRM B 3 1 0 0
69:FRM I 3 1 1 1
70:FRM B 3 0 0 0
You can see where it turns to soft telecine at about frame 61. Still not quite sure how to tell EXACTLY where the soft telecine begins as the starting numbers of the pattern appear to be able to change. So the first 3 1 0 0 could be the end of the interlacing, or the beginning of the soft telecine. There is also another small section from about 138 to 178 that is 3 0 0 0, which I interpret as interlace, BFF.
132:FRM P 3 1 0 0
133:FRM B 3 1 1 1
134:FRM B 3 0 0 0
135:FRM P 3 0 1 1
136:FRM B 3 1 0 0
137:FRM B 3 1 1 1
138:FRM P 3 0 0 0
SEQ 5355000000
SEQEXT 0
GOP 0 5
139:FRM B 3 0 0 0
140:FRM B 3 0 0 0
141:FRM I 3 0 0 0
142:FRM B 3 0 0 0
143:FRM B 3 0 0 0
144:FRM P 3 0 0 0
145:FRM B 3 0 0 0
146:FRM B 3 0 0 0
147:FRM P 3 0 0 0
148:FRM B 3 0 0 0
149:FRM B 3 0 0 0
150:FRM P 3 0 0 0
SEQ 5756000000
SEQEXT 0
GOP 0 5
151:FRM B 3 0 0 0
152:FRM B 3 0 0 0
153:FRM I 3 0 0 0
154:FRM B 3 0 0 0
155:FRM B 3 0 0 0
156:FRM P 3 0 0 0
157:FRM B 3 0 0 0
158:FRM B 3 0 0 0
159:FRM P 3 0 0 0
160:FRM B 3 0 0 0
161:FRM B 3 0 0 0
162:FRM P 3 0 0 0
SEQ 6156000000
SEQEXT 0
GOP 0 5
163:FRM B 3 0 0 0
164:FRM B 3 0 0 0
165:FRM I 3 0 0 0
166:FRM B 3 0 0 0
167:FRM B 3 0 0 0
168:FRM P 3 0 0 0
169:FRM B 3 0 0 0
170:FRM B 3 0 0 0
171:FRM P 3 0 0 0
172:FRM B 3 0 0 0
173:FRM B 3 0 0 0
174:FRM P 3 0 0 0
SEQ 6557000000
SEQEXT 0
GOP 0 5
175:FRM B 3 0 0 0
176:FRM B 3 0 0 0
177:FRM I 3 0 0 0
178:FRM B 3 0 0 0
179:FRM B 3 0 1 1
180:FRM P 3 1 0 0
181:FRM B 3 1 1 1
182:FRM B 3 0 0 0
183:FRM P 3 0 1 1
Katie Boundary
23rd April 2018, 21:22
You're making this a LOT more complicated than it needs to be.
Just run the VOB through DGIndex with "honor pulldown flags" like a normal person, then try this script:
mpeg2source("title06.d2v").TFM(mode=0,pp=0,micmatching=0).tdecimate(mode=1)
That's it. That's as complicated as your script needs to be. That's how simple this problem is to solve.
Logan9778
23rd April 2018, 22:13
Thanks. I will try that. Though how will that affect the interlacing on the credits?
Personally, I don't want to telecine and then detelecine if I don't have to.
As I said in post #11 two weeks ago, when I tried force film on interlaced content it dropped every fifth frame.
Hmm, I think that says something about what it will do to interlacing.
Soft telecining looks like this:
Frame 1: A1A2 (Top, Bottom, Repeat Top)
Frame 2: B2B1 (Bottom, Top)
Frame 3: C2C1 (Bottom, Top, Repeat Bottom)
Frame 4: D1D2 (Top, Bottom)
Ok, I think I have worked out the pattern in the .dgi for soft telecine frames, from the above information
It is:
3 1 1 1
3 0 0 0
3 0 1 1
3 1 0 0
For interlaced frames:
For TFF interlacing = 3 1 0 0 {Top field first, then bottom field, do not repeat the first field (i.e. its not telecine), not progressive ( i.e. intelaced)
For BFF interlacing = 3 0 0 0 {Bottom field first, then top field, do not repeat the first field (i.e. its not telecine), not progressive ( i.e. interlaced)
So, from this information, I will try to cut the video into seperate interlaced and soft-telecined sections, deinterlace the interlaced, and then put it back together again perfectly (hopefully!)
EDIT: Seems to work pretty well. But I have noticed that frame 0 is always an interlaced frame, even if the whole video is soft telecine film at 23.97. And if you don't de-interlace it, when playing it back, you get a starting frame, but then you get a black frame, and then it's normal frames after that. This causes a flash at the beginning playing at normal speeds. De-interlacing it with QTGMC and changefps() seems to fix it.
Katie Boundary
24th April 2018, 11:23
Thanks. I will try that. Though how will that affect the interlacing on the credits?
The same way it affects the interlacing in everything else... unless the credits were animated differently from the way everything else was animated. If the credits were originally animated at 24 fps and then hard-telecined, they'll be fine.
It would help to know exactly what we're dealing with. How old is this cartoon? Was it made for theaters or for TV?
Logan9778
24th April 2018, 19:36
Well, it's an old Donald Duck cartoon from 1937. So, for theater, of course. Aspect ratio appears to be 1.3775:1, intelaced and soft telecine at 23.97. Credits are interlaced, plus another spot right past them, which is BFF interlaced. Strange stuff. My method seems to work ok. I chop it up, deinterlace the credits, then just pass through the soft telecine. Then I merge it all back together again. Seems to work good so far. I've just found one strange thing. There seems to always be one strange interlaced frame at the very beginning. If I don't deinterlace both fields back to frames, you can see it flash at the very beginning. Going through it frame by frame, I can see the first credit's frame start, then a black frame, then credits continue normally. When I deinterlace that first frame and changefps(), everything goes to normal.
So, I think I'll stick with this for now. Whether sound is right or not is really hard to tell with a cartoon, but I've looked it over again and again with a couple of cartoons on the DVD, and they all seem to be in sync. The cartoon definitely looks better than with the on the fly telecining I was getting with the original. Also, as usual, they had the aspect ratio wrong on the DVD. They always just force it to 1.333.
Katie Boundary
25th April 2018, 00:53
Interlacing didn't even exist back in '37. The credits may be hard-telecined, but they're definitely NOT natively interlaced unless they were totally redone for DVD release (as was done for Star Trek: The Motion Picture), which seems ridiculously unlikely. So, like I said earlier...
mpeg2source("title06.d2v").TFM(mode=0,pp=0,micmatching=0).tdecimate(mode=1)
Problem solved.
Logan9778
25th April 2018, 05:05
Could it be, they were telecine'd some time after 1937? Is that a possibility?
:)....
burfadel
26th April 2018, 09:17
Telecining was for field matching of early analogue televisions. It was fractionally slowed to 23.97 then telecined to 29.97 for NTSC. For PAL they mostly sped it up from 24 to 25, unless they added in seemingly random repeat or blended FRAMES. Most imported NTSC stuff was converted from the NTSC transfers, which meant lower resolution and poorer colour.
Your DVDs are likely transfers and conversions of a conversion of a transfer. They did release remaster six some of them, realistically they should do the whole lot before the originals deteriorate, but money is a huge factor! You should be able to just inverse telecine it, but being a transfer of a conversion (likely) it's a pain regarding fields, sync, etc. If you inverse telecine it and go frame by frame, if every fifth frame is repeated you're good to go with a simple decimate, regardless of what the filters tell you!
StainlessS
26th April 2018, 15:19
It was fractionally slowed to 23.97 then telecined to 29.97 for NTSC.
Presumably, this only happened after the introduction of color and the 0.01% slowdown to accomodate the color burst,
prior to that I assume that there was no pre-slowdown, (yes ?).
Logan9778
26th April 2018, 22:17
Thanks! I'll try the inverse telecine too, but they all seem to be done differently, some all soft telecine ( except for the very first frame. ???), others with interlaced credits. It seems like the Doctor Who stuff I was working on, all kind of patched together from different sources. I hope they do them all, patched or not, before they all disintegrate and are lost to history. I really loved these when I was a kid, but they only ever showed a few over and over.
If the credits are interlaced, am I doing it the right way by chopping it up, deinterlacing the interlaced, ignoring the telecine flags, and then putting it back together? It "seems" to work so far.
I should have done this at the beginning of the post, but here is a link to the first few seconds of one of the DD cartoons that has what appears to be the first frames of the credits interlaced, and then a spot of BFF interlacing right after.
https://mega.nz/#!qbg1GAyI!QQHfUByHfG-HITGZ4e82i0L69Ke2awYOxJD941TLMzY.
Well, DGIndexNV seems to be showing things right so far. I just tried it on Batman: TAS, the first show, and DGIndexNV shows 3 1 0 1 on every frame which I take to mean either pure progressive ( no soft telecine ), or some type of hard telecine. No flags for interlaced or soft telecining. And going through the video frame by frame, it looks to be hard telecined.
manono
29th April 2018, 02:46
Out of curiosity, how did you cut out the M2V for the very first sample? I'm having trouble with it in DGIndex. It plays fine using a software player but when I try and run the Preview using DGindex, it says, "No data. Check your PIDS". And the D2V I get behaves screwy.
It opens easily using FFVideoSource and IVTC's perfectly.
Ordinarily, if it can be IVTC'd, you IVTC it. No deinterlacer, no matter how good, can beat the original progressive frames.
Also, as usual, they had the aspect ratio wrong on the DVD. They always just force it to 1.333.
Except this isn't 1.33:1. I see no black bars which makes it something like 1.3667:1. Or, put another way, it's close to Academy Ratio.
Katie Boundary
29th April 2018, 23:30
Out of curiosity, how did you cut out the M2V for the very first sample? I'm having trouble with it in DGIndex. It plays fine using a software player but when I try and run the Preview using DGindex, it says, "No data. Check your PIDS". And the D2V I get behaves screwy.
I got the OPPOSITE problem: it previews just fine in DGIndex, but when I played it in VLC, I got several seconds of silent inky blackness.
EDIT: and yes, the D2V file is all kinds of screwy...
D2V Fix Output
Field order transition: 2 -> 0
900 5 0 0 0 0 0 92 00 00 00 00 00 00 00 00 00 00
corrected...
900 5 0 0 0 0 0 93 00 00 00 00 00 00 00 00 00 00
Field order transition: 0 -> 2
900 5 0 0 0 0 0 93 00 00 00 00 00 00 00 00 00 00
900 5 0 124728 0 0 0 92 00 00 00 00 00 00 00 00 00 00 00 00
corrected...
900 5 0 0 0 0 0 93 00 00 00 00 00 00 00 00 00 01
900 5 0 124728 0 0 0 92 00 00 00 00 00 00 00 00 00 00 00 00
Field order transition: 2 -> 0
900 5 0 0 0 0 0 93 00 00 00 00 00 00 00 00 00 01
900 5 0 124728 0 0 0 92 00 00 00 00 00 00 00 00 00 00 00 00
corrected...
900 5 0 0 0 0 0 93 00 00 00 00 00 00 00 00 00 01
900 5 0 124728 0 0 0 93 00 00 00 00 00 00 00 00 00 00 00 00
Field order transition: 0 -> 2
900 5 0 124728 0 0 0 93 00 00 00 00 00 00 00 00 00 00 00 00
900 5 0 270298 0 0 0 92 00 00 00 00 00 00 00 00 00 00 00 00
corrected...
900 5 0 124728 0 0 0 93 00 00 00 00 00 00 00 00 00 00 00 01
900 5 0 270298 0 0 0 92 00 00 00 00 00 00 00 00 00 00 00 00
Field order transition: 2 -> 0
900 5 0 124728 0 0 0 93 00 00 00 00 00 00 00 00 00 00 00 01
900 5 0 270298 0 0 0 92 00 00 00 00 00 00 00 00 00 00 00 00
corrected...
900 5 0 124728 0 0 0 93 00 00 00 00 00 00 00 00 00 00 00 01
900 5 0 270298 0 0 0 93 00 00 00 00 00 00 00 00 00 00 00 00
Field order transition: 0 -> 2
900 5 0 270298 0 0 0 93 00 00 00 00 00 00 00 00 00 00 00 00
900 5 0 419868 0 0 0 92 00 00 00 00 00 00 00 00 00 00 00 00
corrected...
900 5 0 270298 0 0 0 93 00 00 00 00 00 00 00 00 00 00 00 01
900 5 0 419868 0 0 0 92 00 00 00 00 00 00 00 00 00 00 00 00
Field order transition: 2 -> 0
900 5 0 270298 0 0 0 93 00 00 00 00 00 00 00 00 00 00 00 01
900 5 0 419868 0 0 0 92 00 00 00 00 00 00 00 00 00 00 00 00
corrected...
900 5 0 270298 0 0 0 93 00 00 00 00 00 00 00 00 00 00 00 01
900 5 0 419868 0 0 0 93 00 00 00 00 00 00 00 00 00 00 00 00
Field order transition: 0 -> 2
900 5 0 419868 0 0 0 93 00 00 00 00 00 00 00 00 00 00 00 00
900 5 0 565438 0 0 0 92 00 00 00 00 00 00 00 00 00 00 00 00
corrected...
900 5 0 419868 0 0 0 93 00 00 00 00 00 00 00 00 00 00 00 01
900 5 0 565438 0 0 0 92 00 00 00 00 00 00 00 00 00 00 00 00
Field order transition: 2 -> 0
900 5 0 419868 0 0 0 93 00 00 00 00 00 00 00 00 00 00 00 01
900 5 0 565438 0 0 0 92 00 00 00 00 00 00 00 00 00 00 00 00
corrected...
900 5 0 419868 0 0 0 93 00 00 00 00 00 00 00 00 00 00 00 01
900 5 0 565438 0 0 0 93 00 00 00 00 00 00 00 00 00 00 00 00
Field order transition: 0 -> 2
900 5 0 565438 0 0 0 93 00 00 00 00 00 00 00 00 00 00 00 00
900 5 0 715008 0 0 0 92 00 00 00 00 00 00
corrected...
900 5 0 565438 0 0 0 93 00 00 00 00 00 00 00 00 00 00 00 01
900 5 0 715008 0 0 0 92 00 00 00 00 00 00
(and so on)
Logan9778
30th April 2018, 06:43
Hey guys,
Well, its not really a d2v. It's an .m2v. DGIndex outputs a .d2v. DGIndexNV outputs an .m2v. Probably some different code.
Thanks for looking at the IVTC. I'll try that again on it. I'll try to see if my eye's can detect the pattern. But everytime I run DGIndexNV it says the credits and one little spot inwards is interlaced. Everything else comes up as soft telecine.
And yeah, the first two seconds of the video are black nothingness.
EDIT: AHH! I see what is happening. When I muxed the video with DGIndexNV into the .m2v, and play it with DGIndexNV, it now shows the video to be hard telecined 29.973! So, I guess it pulled it out telecined. Hmm, when I used DGIndexNV to play the MKV I ripped from the DVD ( I used MakeMKV that rips the DVD straight to MKV, and seperates the shows), it keeps saying the credits are interlaced. Playing the mkv, I get a weird sequence of what looks like full normal frame, then 2 frames slightly blurry with what looks like either combing or dot crawl at the bottom edges of the credits, then back to normal full frame, and repeat over and over. Maybe something is wrong with MakeMKV. I'll have to try ripping it with something else like eac3to and see what DGIndexNV thinks of it.
Except this isn't 1.33:1. I see no black bars which makes it something like 1.3667:1. Or, put another way, it's close to Academy Ratio.
How do you get the 1.3667:1? When playing it with VLC, I measured the DAR with a pixel ruler, and it confirms it's showing it at 4:3 or 1.333 ratio. You can tell the O in Donald looks a little squeezed, and the circle enclosing RCA looks a little off as well. I used Zoom Player to show me what the DAR was as it played, as I don't know how to get that info on VLC, and then forced it to 1.375:1 DAR. Using a pixel ruler, I measured the circles, and they seemed correct at this ratio.
Am I doing something wrong?
TFM(mode=0,pp=0,micmatching=0).tdecimate(mode=1)
And thanks for the TIVTC code, Katie! It worked well on Batman: TAS.
manono
30th April 2018, 08:12
Out of curiosity, how did you cut out the M2V for the very first sample?
Well, its not really a d2v. It's an .m2v
I'm not sure what question you were answering or to whom that answer was addressed. Both Katie and I know the differences between M2Vs and D2Vs. Are you saying that M2V for your sample was cut using DGIndexNV? If so, it was quite odd and not the same as the M2Vs produced by DGIndex.
DGIndex outputs a .d2v.
I cut M2Vs using DGIndex all the time.
I run DGIndexNV it says the credits and one little spot inwards is interlaced.
It shows how it was encoded, not what the content is like. For example, virtually all PAL DVDs of progressive movies are encoded as interlaced.
I used MakeMKV that rips the DVD straight to MKV
A very bad idea, in my opinion. Use a proper decrypter to decrypt as IFO, BUP, and VOB. You opened that MKV in DGIndexNV to create that funky M2V sample? That explains it then.
Am I doing something wrong?
No, not at all, unless you're resizing that DVD to something like 640x480 when you should be resizing to 656x480. It's time for you to enter the murky world of the ITU-R BT.601 Standard.
jagabo over at videohelp.com sums it up neatly here:
https://forum.videohelp.com/threads/384936-Video-Size#post2495661
Square pixel (1:1, 1.0) is for when DAR = FAR (frame width / frame height). 0.9091 is the aforementioned ITU pixel aspect ratio where the 4:3 image is in a 704x480 frame, or portion thereof.
So, for example, an NTSC 720x480 4:3 DVD with bars on left and right totaling 16 columns of pixels (the'704x480 frame' mentioned above) would resize to some 1.33:1 ratio such as 640x480. I usually figure 4:3 DVDs follow ITU resizing and 16:9 DVDs the MPEG standard. Not everyone follows that or agrees with that, least of all the studios and media companies. hello_hello might see this and chime in as he's our resident resizing expert. Or one of them.
Logan9778
30th April 2018, 08:32
Thanks! Just confirmed it was MakeMKV that was the problem. I stuck a VOB into DGIndexNV, and wahlahh!, it shows its telecined from the beginning!
I'll have to experiment with the rest of the stuff later. Hitting 3 AM here. :P Thank you! Thank you! That sure solves one HUGE problem!
MakeMKV was nice, but obviously it doesn't work.
Katie Boundary
30th April 2018, 21:10
Well, its not really a d2v. It's an .m2v. DGIndex outputs a .d2v. DGIndexNV outputs an .m2v. Probably some different code.
DGIndex can also output an .m2v file if you use the "save project file and demux video" option.
Why are you dicking around with DGindexNV to begin with?
And yeah, the first two seconds of the video are black nothingness..
The blackness lasted all the way to the end of the clip. It was a lot more than two seconds.
Logan9778
1st May 2018, 00:46
Well, in the end, it turns out it WAS the .VOB. I tried another DVD ripper that StainlessS suggested, and I get the same results. I made a mistake last night in the early AM when I thought it was finally showing telecined. I tossed in the .VOB, not the .m2v, and the .VOB starts with episode 1, not 6, which is the problem one. Episode 1 is complete soft telecine.
So it appears that that .VOB actually IS interlaced at the beginning. I've done every experiment I can think of on it now. I even tossed the whole .VOB into both DGIndex and DGIndexNV. I started it a little before the end of episode 5, and then watched that episode end and then episode 6 start. Episode 5 starts off showing everything telecined, and keeps on going, until it hits the start of ep.6, and then you see DGIndexNVstart flagging everything as interlaced, until right after a few frames of the credits, then it starts showing telecined again for a while, and then for about 2 seconds of play, again shows interlaced, and then everything goes back to telecine for the rest of the episode.
Here is video of what's happening in DGIndex with the original .VOB ripped from the DVD
https://mega.nz/#!fHBj2ArY!61bQ0u0znBKFcIfZ47TjuoOuF8pnLMMMUZIxX_Yu7II
About half way through the video, you'll see it finish episode 5 and start episode 6. That is where the two spots of interlacing are, and you can clearly see it in the data field alongside the video.
ANY MORE THOUGHTS YOU MAY HAVE ON THIS ARE TOTALLY WELCOME!
@Katy. - I like DGIndexNV because I have an NVidea card, and it adds quite a few FPS to my compiling speed.
THANKS FOR ALL YOUR HELP GUYS! I guess I'll just stick with what I'm doing for now. If you guys want anything else on it uploaded, just yell! It appears after all experiments to just be a strange Frankenstein video that they tossed together out of different parts. But then again, it is a film from 1937!
manono
1st May 2018, 06:12
Separate your episodes while decrypting or, after putting the entire DVD onto your hard drive, separate them then.
When you have a mix of hard and soft telecine, one good way to handle it is like this:
TFM(D2V="Episode1.d2v")
TDecimate()
Make the D2V (or whatever the equivalent is when using DGIndexNV) with the field operation set to "Honor Pulldown Flags".
That'll treat the soft telecined portions as if they had been 'Forced Film' and only IVTC the hard telecined parts. The D2V option is thoroughly explained in the docs accompanying TIVTC.
Logan9778
1st May 2018, 07:52
Thanks! Honor Pulldown flags means the video will be completely output as telecined, right ( I guess except for the two spots it see's as interlaced)? Then we just de-telecine the whole thing?
I know you say -
That'll treat the soft telecined portions as if they had been 'Forced Film' and only IVTC the hard telecined parts. The D2V option is thoroughly explained in the docs accompanying TIVTC.
but wouldn't that actually hard telecine the whole thing? I mean, the frame served output to the encoder will be repeated sections of 3 progressive and 2 interlaced frames, right?
This is what I read in the DGIndex Manual
The Field Operation setting allows the user to specify how the pulldown (RFF) flags are to be handled.
Honor Pulldown Flags - The pulldown flags (if any) are obeyed and the fields are repeated. This means that the frame-served video will appear exactly as it is intended to appear on the final display device. Therefore, if you have a 3:2 pulled-down clip, you'll get the standard repeating pattern of 3 progressive frames followed by 2 interlaced frames. If you have PAL or MPEG1, you'll just get the encoded pictures with no repeated fields (because PAL and MPEG1 have no RFF flags to honor). The frame rate will always be the same as the display frame rate of the source.
Ignore Pulldown Flags - The pulldown flags are ignored. This allows one to obtain the raw encoded MPEG pictures, with no repeated fields. However, because repeated fields intended for display are ignored and not displayed, the resulting frame rate may differ from the source frame rate. It may even vary throughout the clip, due to irregular patterns of pulldown flags. If the pulldown is irregular, use of this option will cause the audio-video sync to change at different parts of the clip, and most likely sync will not be acceptable. This option is mostly intended for power users, who would use it as a diagnostic aid for inspecting the encoded MPEG pictures. Although this option ignores the flags, they are still stored in the D2V file although DGDecode will also ignore them.
Force Film - This option is intended for the special case of film content encoded at 23.976 fps but pulled down for display at 29.97 fps, i.e., 3:2 pulldown. This option will restore the 23.976 fps film rate while keeping audio and video in sync throughout the clip. This option works by ignoring pulldown flags and inserting/removing frames to maintain a constant and sync'ed output stream. Do not use this option on non-3:2 pulled-down material, and, therefore, never use it on PAL or MPEG1. Also do not use this option on streams containing frame repeats.
I'm using DGIndex right now, because DGIndexNV doesn't have a "honor pulldown flags" or "force film" option. It has to be remote controlled from Avisynth with the "fieldops" parameter, which gets strange. I'll use DGIndex for now, since that's what you guys are using.
EDIT: Well, I used DGIndex and did the de-telecining with this code.
LoadPlugin("C:\DGDecNV2053\DGDecodeNV.dll")
SetWorkingDir("C:\Program Files (x86)\AviSynth\plugins")
SetMTMode(5,6)
MPEG2Source("F:\Test Space\Donald Duck Volume 1\DGIndex Honor Flags M2V\VTS_06_1.d2v")
SetMTMode(2)
tfm()
TDecimate(mode=1)
Crop(8,2,-8,-2)
Seems to have come out right, I just can't tell what the 2 "interlaced" parts ( if that's what they are) are like, because they're almost all the in the black screen parts. I'm guessing from what I read in TFM's description, it would try to put them together, and then seeing they are still combed, try to post process them as best it could? I will test later with other episodes as I work with them, as I'm sure I'm going to get some more strangeness, and maybe this time, the "interlacing" will be in the non-black parts of the video.
manono
1st May 2018, 19:33
Thanks! Honor Pulldown flags means the video will be completely output as telecined, right?
If you were to encode the video using the results of Honor Pulldown Flags, yes. But that's not what you'll be doing. All NTSC DVDs output interlaced 29.97fps anyway.
Then we just de-telecine the whole thing?
Not exactly. The parts that are soft telecined use the TFF/RFF flags to restore the progressive 23.976fps parts without a full IVTC (it ignores the pulldown flags). All that gets "de-telecined" (aka IVTC'd) are the hard telecine parts. That's what the D2V setting is for. In your script below, everything gets the full IVTC treatment and there are more likely to be some mistakes made. Perhaps not, but using the D2V setting is still better when you have a mix of hard and soft telecine. Faster, too.
I already mentioned this is explained in the TFM doc:
...use the trf flags for field matching in film sections (sections where the trf flags follow the 012301... pattern)
One way of thinking of it is that the soft telecine parts get "Force Film" while the hard telecine parts get IVTC'd. Open up a D2V file. The 01230123 parts are the soft telecine. The 0000 or 2222 parts are the hard telecine (or perhaps true video). It also has an additional interlace check to make sure nothing gets by.
Logan9778
2nd May 2018, 04:16
Thanks for the info. Mulling over it. I've changed back to DGIndex for now, to keep in stride with what everyone else is using. I also see that d2v option for TFM() now.
It shows how it was encoded, not what the content is like. For example, virtually all PAL DVDs of progressive movies are encoded as interlaced.
Thanks! I think I understand what you and Katie are saying now.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.