View Full Version : VFR Hard-Telecined DVD?
phazer11
26th February 2018, 09:19
So. I've decided to take some of my old anime DVDs encode them, and put them in a server. If it were an option, I'd just use MadVR which deinterlaced it very, very nicely on my friend's computer.
Now since it's an anime it's kinda hard to tell what kind of telecine (hard, double hard, etc.) I'm dealing with, it's hybrid as far as I can tell but I haven't had to deal with interlaced content in years (it's also heavily combed). Thought I almost had it but frames were removed and not even taking the timecodes files and adding them into the mkv could fix the audio desync (obviously), so I'm a bit stuck.
Once I get it fixed it'll be child's play to separate the episodes. I used MakeMKV so it's all one file to help eliminate any variables. Here's the MediaInfo file, not sure what else I can give to help you get an idea.
The only information I know from my GUI is that it analyzed it (with Mencoder I think) and it came back as telecined.
General
Unique ID : 71996586028147523077668086866174195418 (0x362A09C06E89D26A5D581A698E5EB6DA)
Complete name : D:\Hellsing (2001) - Disc 1.mkv
Format : Matroska
Format version : Version 2
File size : 2.98 GiB
Duration : 1 h 8 min
Overall bit rate mode : Variable
Overall bit rate : 6 194 kb/s
Movie name : Hellsing Vol1
Encoded date : UTC 2018-02-26 08:04:21
Writing application : MakeMKV v1.12.0 win(x64-release)
Writing library : libmakemkv v1.12.0 (1.3.5/1.4.7) win(x64-release)
Video
ID : 1
ID in the original source medium : 224 (0xE0)
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=2, N=14
Codec ID : V_MPEG2
Codec ID/Info : MPEG 1 or 2 Video
Duration : 1 h 8 min
Bit rate mode : Variable
Bit rate : 5 737 kb/s
Maximum bit rate : 8 000 kb/s
Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Frame rate mode : Variable
Frame rate : 27.928 FPS
Original frame rate : 29.970 (30000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.594
Time code of first frame : 01:00:30;00
Time code source : Group of pictures header
GOP, Open/Closed : Closed
Stream size : 2.76 GiB (93%)
Language : English
Default : No
Forced : No
Original source medium : DVD-Video
Audio #1
ID : 2
ID in the original source medium : 189 (0xBD)128 (0x80)
Format : AC-3
Format/Info : Audio Coding 3
Codec ID : A_AC3
Duration : 1 h 8 min
Bit rate mode : Constant
Bit rate : 224 kb/s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 110 MiB (4%)
Title : Stereo
Language : English
Service kind : Complete Main
Default : Yes
Forced : No
Original source medium : DVD-Video
Audio #2
ID : 3
ID in the original source medium : 189 (0xBD)129 (0x81)
Format : AC-3
Format/Info : Audio Coding 3
Codec ID : A_AC3
Duration : 1 h 8 min
Bit rate mode : Constant
Bit rate : 224 kb/s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 110 MiB (4%)
Title : Stereo
Language : Japanese
Service kind : Complete Main
Default : No
Forced : No
Original source medium : DVD-Video
Text
ID : 4
ID in the original source medium : 189 (0xBD)32 (0x20)
Format : VobSub
Codec ID : S_VOBSUB
Codec ID/Info : Picture based subtitle format used on DVDs
Duration : 1 h 7 min
Bit rate : 3 415 b/s
Count of elements : 600
Stream size : 1.64 MiB (0%)
Language : English
Default : Yes
Forced : No
Original source medium : DVD-Video
Menu
00:00:00.033 : en:1 Ep1 Opening
00:01:19.045 : en:2 Part A
00:11:21.714 : en:3 Part B
00:21:16.642 : en:4 Ending
00:22:36.655 : en:5 Preview
00:22:53.505 : en:6 Ep2 Opening
00:24:11.366 : en:7 Part A
00:33:58.469 : en:8 Part B
00:44:07.428 : en:9 Ending
00:45:27.491 : en:10 Preview
00:45:44.475 : en:11 Ep3 Opening
00:47:02.419 : en:12 Part A
00:57:43.960 : en:13 Part B
01:07:01.984 : en:14 Ending
01:08:22.098 : en:15 Preview
01:08:50.659 : en:end
Asmodian
26th February 2018, 09:31
not sure what else I can give to help you get an idea.
A short sample of the original video file will be necessary to get help. :)
jpsdr
26th February 2018, 09:45
You're dealing with a pain in the ass telecine from a lot of digital/numerical production of this time. I know, because i've also personnaly worked on hellsing TV. Basicaly, you have the telecine pattern changing on each change scene, most of the time. But sometime pattern can also change during the same scene, and sometimes you can even have totaly screwed interlaced, following no specific pattern.
And, something else i've until now encounter only on hellsing, it's probably what you call "combo". Event if you manage to reverse the telecine using some kind of adaptative method, you still have some "ghost" effect. I've dealed with series with that kind of telecine (Kiddy Grade, Full Metal Panic...), but encounter this "ghost" effect only on Hellsing. This is not specific to the US DVDs, japanese DVDs also have the same issue.
But it exist even more pain in the ass telecine. The worst is the "V" and reverse "V" shaped. The pattern is one progressive, 4 interlaced. The 2 first interlaced frame have line progressively shifted following a "V" shape, the 2 other the same following a reverse "V" shape, with also blendig withing frame. Often see this on old anime on Laserdisc. With this, nothing can realy be done. But it's on old anime, meaning master is a film, meaning when a BR is done, you have a nice 24(or 23.976)fps progressive video. It was the case for the "Five Star Story" movie for exemple. Laserdisc was this horrible telecine, but BR is progressive 23.976.
phazer11
26th February 2018, 12:24
@all More info.
If it helps when we used MadVR on my friend's computer we tried disable auto source type detection in madvr and film mode did not do a good job, video mode looked nigh on perfect, not much difference in the look at pixels in center option either. So these settings (below) seem to work on a software level, just need to translate it to encode level.
https://i.imgur.com/h06DvFs.png
Here are a few samples. I've included the full opening and a scene from episode 1.
Opening - https://mega.nz/#!0JoBWLzS!4SmBPBexwL-2F8M0fBwQWa8Lmiua73dAaLS-j_2FBLs This seems to be one of the biggest offenders for combing.
Episode 1 Church Scene - https://mega.nz/#!ZAxgxaqK!H7x9s7p8JmhKUs8FPwtDZ__knT8UO5VKj41VdngBwFA
You're dealing with a pain in the ass telecine from a lot of digital/numerical production of this time. I know, because i've also personnaly worked on hellsing TV. Basicaly, you have the telecine pattern changing on each change scene, most of the time. But sometime pattern can also change during the same scene, and sometimes you can even have totaly screwed interlaced, following no specific pattern.
And, something else i've until now encounter only on hellsing, it's probably what you call "combo". Event if you manage to reverse the telecine using some kind of adaptative method, you still have some "ghost" effect. I've dealed with series with that kind of telecine (Kiddy Grade, Full Metal Panic...), but encounter this "ghost" effect only on Hellsing. This is not specific to the US DVDs, japanese DVDs also have the same issue.
But it exist even more pain in the ass telecine. The worst is the "V" and reverse "V" shaped. The pattern is one progressive, 4 interlaced. The 2 first interlaced frame have line progressively shifted following a "V" shape, the 2 other the same following a reverse "V" shape, with also blendig withing frame. Often see this on old anime on Laserdisc. With this, nothing can realy be done. But it's on old anime, meaning master is a film, meaning when a BR is done, you have a nice 24(or 23.976)fps progressive video. It was the case for the "Five Star Story" movie for exemple. Laserdisc was this horrible telecine, but BR is progressive 23.976.
Any suggestions then? I used to deal with interlaced such as this anime all the time but it's been many OS formats and codecs since then and I don't remember how I dealt with it especially since I've been out of the game for a while and when I have done stuff it's all been progressive. I also seriously doubt they'll be doing a BD for Hellsing (2001) since they did Hellsing Ultimate in 2006 (which does have a BD) which was for Hellsing what FMA Brotherhood was for Fullmetal Alchemist.
jpsdr
26th February 2018, 14:29
Sorry, i don't realy have a good suggestion. I personnaly used a custom VDub filter i designed a long time ago to make inverse telecine, but the process is long (between 40mn to 2 hours / epsiode) and complex.
Try if you can find automatic IVTC filter, or... a good deinterlacer.
Motenai Yoda
27th February 2018, 03:40
there is a parameter in tdecimate,
vidDetect -
This sets what is required for single cycle video detection when hybrid > 0. Whether
a single cycle alone is enough or whether two consecutive cycles or more must be
detected as video is controlled via the "conCycle" and "conCycleTP" parameters.
Video detection via frame matches: (Labeled Type A)
i.) The matches that were used by TFM do not indicate that there are duplicates
in the cycle
Video detection via metrics: (Labeled Type B)
i.) All frames in the cycle have metrics above vidThresh.
Video detection via absence of local minima: (Labeled Type C)
i.) All frames in the cycle have metrics that are within 150% of each other (1.5x)
and within 2.0 (abs value difference) of each other. The maximum metric value
within the cycle must greater than or equal to 0.3.
How these types of information are used as a whole to determine video sections
is determined by vidDetect. Each vidDetect setting has a condition that if met will
result in the current cycle being detected as video. (refer above for the A and B
labels). Please note that ovr (overrides) overrules vidDetect!
0 - A (if matches indicate video then consider it video)
1 - B (if metrics indicate video then consider it video)
2 - A or B (if either matches or metrics indicate video then consider it video)
3 - A and B (if both matches and metrics indicate video then consider it video)
4 - A and (B or C) (if matches indicate video and metrics indicate video or
matches indicate video and there are no local minima consider
it video)
Default: 3 (int)
which can solve some video/film cycles being undetected
phazer11
27th February 2018, 09:26
So... having a brainfart. I need to use something other than d2v since KNLMeansCL (which I'm using because it needs the denoising bad) is having an issue with the D2v source it keeps throwing a fit when avs2pipemod is called (decided to try it out because I had a feeling there'd be issues). Remove KNLMeans and it works. I'm doing a test encode now to see if the decimate settings are working but will eventually need a fix.
And... the video looks great, thanks Yoda, completely forgot to check the page about the tdecimate options in TIVTC when trawling through all the wiki pages.
So now the problem is audio sync and denoising. Ideas anyone?
real.finder
27th February 2018, 23:59
So... having a brainfart. I need to use something other than d2v since KNLMeansCL (which I'm using because it needs the denoising bad) is having an issue with the D2v source it keeps throwing a fit when avs2pipemod is called (decided to try it out because I had a feeling there'd be issues). Remove KNLMeans and it works. I'm doing a test encode now to see if the decimate settings are working but will eventually need a fix.
And... the video looks great, thanks Yoda, completely forgot to check the page about the tdecimate options in TIVTC when trawling through all the wiki pages.
So now the problem is audio sync and denoising. Ideas anyone?
the problem of audio sync likely happen if you encode it as VFR, so you need the timecode file to be merge in the video container, or in the encoder (like x264)
aside from that, I just added vidDetect parameter in animeivtc (https://forum.doom9.org/showthread.php?t=170364) if anyone use it
phazer11
28th February 2018, 07:27
Well I tried all kinds of timecodes files before posting last night (and tried each one in every track even the ones they shouldn't go in). I tried the ones extracted from the original tracks, as well as the one generated when I put it in the script. My script was basically.
6.) NTSC Hybrid, using vfr via mkv, anime or cartoon source. One pass.
mpeg2source("c:\oursource.d2v")
tfm(d2v="c:\oursource.d2v")
tdecimate(mode=3,hybrid=2,vfrDec=1,mkvOut="mkv-timecodesfile.txt")
VS_Fan
1st March 2018, 00:08
Your video samples are not really VFR. They are plain 29.97 (30000/1001) fps video containing: (reported by the original DGindex v1.5.8, not the one with CL support)
Opening: 88.61% hard-telecined (mixed with many small chunks of soft-telecined) 24 fps film
Episode1: 94.59% hard-telecined (mixed with many small chunks of soft-telecined) 24 fps film
Because of the many soft telecined chunks, when using mediainfo on the matroska (MKV) container they are incorrectly reported as VFR. But after extracting the raw m2v streams you can use DGindex to generate the d2v indexes, taking care to select the option to “Honor Pull Down Flags”, you can obtain a 29.97 fps input to your avisynth script so you can successfully apply IVTC.
Unfortunately, these videos have evidently suffered lots of bad edits while being “interlaced”. Those edits caused the problems you see: some blend deinterlaced sections, many incomplete telecined cycles spliced, many color and bright “corrections” and effects applied differently to the fields of the same frame, etc
My suggestions:
Use the old DGIndex v1.5.8 (so you can use denoise filters supporting CL) with the option “video->Field operation->Honor Pulldown flags”; and
IVTC with an avisynth script like this:
source = "Hellsing_EP1_HonorPDF.d2v"
MPEG2Source(d2v=source)
deinterlaced = nnedi3()
TFM(d2v=source, clip2=deinterlaced, mode=5, PP=4, ubsco=False, mmsco=False, MI=150) #, display=True, micout=2, output="TFM_output.txt")
return tdecimate(mode=1) #, display=True) #, output="TDec_output.txt")
Some explanations of the TFM prameters used:
d2v: allow TFM to use the info (field order, pulldown flags, etc) from the d2v file
clip2: specify an externally deinterlaced clip from which TFM will take frames instead of doing the deinterlacing itself, when a frame is detected as combed after trying every match possible
mode=5: 3-way matching + trying the 4th/5th matches if all 3 of the original matches are detected as combed (option 5) is the riskiest in terms of creating jerkiness, but will almost always find a good frame if there is one
PP=4: frames will be taken as is from clip2 when a frame is detected as combed after trying every match possible
mmsco=False: allow micmatching everywhere, not only on scenechanges
ubsco=False: Allow u/b matches everywhere, not only on scenechanges
MI=150: The default MI=80 is perfectly fine but increasing it will post-process less frames: It allow some little interlaced frames without post-processing. You can try and see for yourself and choose to your liking. That’s a matter of taste. From the clip of episode 1, I obtained 83 combed (post-processed) frames with the default MI=80, compared to 62 with MI=150. (TFM output parameter will help you count frames)
The “Opening” clip has more problems because it has been more severely edited. The episodes should have less problems and will result in very decent CFR 23.976 (24000/1001) fps clips after IVTC. Without audio sync problems!
phazer11
1st March 2018, 10:49
Ok so... first, thanks for the explanation, and secondly where am I supposed to get the file for the clip2 parameter? Just any old progressive source that's been indexed with dgindex or some kind of patterned sample, etc.? Also when I used DGIndex in my previous post I was using DGIndex 1.5.8 with Honor Pulldown Flags enabled.
VS_Fan
1st March 2018, 15:41
It's already there. The "deinterlaced" clip resulting from nnedi.
Remember to use dgindex on the original transport streams on your DVD or on the raw m2v streams extracted from the Mkv
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.