View Full Version : DVD decimate matching bluray source
bxyhxyh
27th August 2014, 11:34
I need to overlay bluray video on dvd video. But a bluray is progressive and a dvd is telecined.
If i just call tfm().tdecimate() some frames don't match bluray video.
How can I decimate dvd to match bluray?
LemMotlow
29th August 2014, 13:39
I need to overlay bluray video on dvd video.What do you mean by "overlay"?
But a bluray is progressive and a dvd is telecined.That's not correct.
DVD is almost always interlaced or telecined. Depending on who created them, some DVD's are purely progressive but encoded as interlaced. There are several variations.
Standard BlueRay can be interlaced or progressive. 1920x1080 can be progressive if the originals are at progressive film speed (23.97 or 24 fps). 1920x1080 is otherwise interlaced at 29.97 or 25 fps. The same holds true for 1440x1080 BluRay.
1280x720 standard BluRay is always progressive at 23.97, 24, 50, or 59.94 fps.
Standard-definiton BluRay is interlaced or telecined at 25 or 29.97 fps.
There are variations on these standards, meaning that some people make non-standard videos.
http://forum.doom9.org/showthread.php?t=154533
If i just call tfm().tdecimate() some frames don't match bluray video.
How can I decimate dvd to match bluray?Can't answer that. No one knows anything about your source videos.
bxyhxyh
29th August 2014, 18:18
What do you mean by "overlay"
Upscale DVD and overlay bluray video on it to get some pixels from DVD source.
That's not correct.
DVD is almost always interlaced or telecined. Depending on who created them, some DVD's are purely progressive but encoded as interlaced. There are several variations.
1280x720 standard BluRay is always progressive at 23.97, 24, 50, or 59.94 fps.
I meant my sources are. Bluray source that I have is progressive and DVD is interlaced.
Can't answer that. No one knows anything about your source videos.
Here are samples and a script
dvd - https://dl.dropboxusercontent.com/u/58215671/dvd.ts
bluray - https://dl.dropboxusercontent.com/u/58215671/bluray.m2ts
dvd=MPEG2Source("C:\Users\win8\Desktop\dvd.d2v", cpu=0).Trim(4,0) # This trim is to start progressive frame of this sample. Doesn't exist in my real script
bd=lwlibavvideosource("C:\Users\win8\Desktop\bluray.m2ts").Trim(178,0) # This trim is for match first frame with dvd's first frame. Doesn't exist in my real script
dvd.TFM().crop(0,2,0,0).TDecimate(mode=1)
nnedi3_rpow2(2,cshift="spline36resize")
d1=Spline36Resize(1280,718)
d2=Spline36Resize(1280,720)
dvd=overlay(d2,d1)
overlay(dvd,bd.Spline36Resize(1260,718,0.5,0.5,-0.5,0),10,2)
EDIT: For these samples, they are off by one frame. But for whole video it appears randomly.
LemMotlow
29th August 2014, 19:51
The BluRay has been inverse telecined and is progressive at 23.976 fps.
The dvd (why is DVD in a .ts file?) was formerly progressive with 3:2 pulldown (telecine). Instead of inverse telecine, some clever individual has field-blend deinterlaced it. The formerly telecined frames are field-blended. Unless someone has some ideas and solutions otherwise, no way to repair those frames.
Regardless, upscaling standard def will have lower quality and other differences. Even if you could get good frames for overlay, the differences in overlaid frames would produce flicker and/or uneven playback.
bxyhxyh
29th August 2014, 20:58
The dvd (why is DVD in a .ts file?) was formerly progressive with 3:2 pulldown (telecine).
I've cut both with TSMuxer.
Instead of inverse telecine, some clever individual has field-blend deinterlaced it. The formerly telecined frames are field-blended. Unless someone has some ideas and solutions otherwise, no way to repair those frames.
What? I see no blends to be fixed.
Problem here is Decimation.
Decimation based on other progressive source.
Also DVD.Spline36Resize(1280,720,10.5,1.5,-10.5,-0).crop(0,0,0,-2) is same as bd.Spline36Resize(1280,718,0,0,0,-2.5) pixel wise.
That would help to decide which frame should be decimated.
poisondeathray
29th August 2014, 21:55
Yes, there are resizing and AR differences, but they line up in terms of matching frames for me. Could it be L-smash issue /difference ?
For example try MPEG2Source (DGIndex), and AVCSource (DGAVCIndex)
MPEG2Source()
AssumeTFF()
TFM().TDecimate()
Trim(1,0)
AVCSource()
Trim(176,0)
Trim(0,324)
bxyhxyh
29th August 2014, 22:08
I use DGSourceIM for bluray and DGIndex for DVD.
And tried L Smash for bluray and DGIndex for DVD
Still same.
poisondeathray
29th August 2014, 22:10
I use DGSourceIM for bluray and DGIndex for DVD.
And tried L Smash for bluray and DGIndex for DVD
Still same.
Why do I get different results ? They match here in terms of decimation and frames
or do your testclips not exhibit the problem ?
Did you try what I posted above ?
bxyhxyh
29th August 2014, 22:23
Why do I get different results ? They match here in terms of decimation and frames
or do your testclips not exhibit the problem ?
Did you try what I posted above ?
Yes, It is ok for samples, but not ok for full vidoes.
Combed frames caused by TFM may be screwing up decimation.
I will try QTGMC. Since I need only 10 pixels from both sides, there wouldn't significant quality loss.
LemMotlow
30th August 2014, 00:08
Why do I get different results ? They match here in terms of decimation and frames
or do your testclips not exhibit the problem ?
Did you try what I posted above ?I take my comments back and go along with poisondeathray. FFMS2, DirectShowSource, other translators, etc., etc., all screw up the dvd and throw frames all over the place. Phooey. I went back to my old standby for this kind of streaming .ts stuff and used TVMW to get a clean avi for AviSource, then TIVTC'd the dvd sample. Frames match for me, at least for 125 frames or so. All the other file openers gave me schizo results with that "DVD".
TFM the cause of combing? I doubt it. After I got a proper AVI from that weirdo dvd.ts, TIVTC worked perfectly. No combing, either.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.