View Full Version : A mess in 1080i: suggestions?
phædrus
29th January 2008, 18:24
Here's a 50 second clip from a capture @ 1080i, which I have reduced to 480i with the following script (offered by scharfis_brain, thank you sir) to preserve the fields.
---EDIT--- Link was removed. The original 1080i clip is down the page a bit, post #7 in this thread. -- END EDIT ----
#
# 1080i script
#
# PLUGINS
LoadPlugin("C:\Program Files\dgmpgdec149\DGDecode.dll")
#
# SOURCE
mpeg2source("F:\MyHDCapture\movie.d2v")
#
bob()
#
Lanczos4resize(720,480)
#
converttoyuy2()
#
assumetff()
#
separatefields().selectevery(4,0,3).weave()
#
AudioDub(BlankClip())
If you look at the individual fields, you see what looks like two frames superimposed on some fields. So that's a mess. The fields are not clean.
If I use Telecide() on the original 1080i (90 minute program) without decimating -- ending up with 30p, then reducing to 720x480 -- it looks pretty smooth to me and the image looks better in PowerDVD than interlacing like the clip above.
If anyone can suggest an easy way to make this cleaner, I am open to suggestion. When I apply Telecide (without decimation), I usually get four relatively clean frames followed by one or two frames that look like one frame superimposed on another, but it isn't perfectly consistent throughout the video. Maybe this isn't the best way to handle it, but to me it looks a little better on playback than leaving it interlaced and letting PowerDVD deinterlace it.
Blue_MiSfit
29th January 2008, 19:18
Post a sample from the original...
What exactly is your goal? To go from 1080i to 480i? If it's a FILM movie with pulldown, do you want to recover the 24p and get 480p?
~MiSfit
phædrus
29th January 2008, 20:41
OK, I can post the same section from the original 1080i, but I can't upload it until tomorrow. And of course it would be a much bigger clip. I may have to trim. Sorry, I don't know why I didn't post the original. Considerations of size, I guess.
Yes, if it would be possible to recover the original film frames -- I think it is quite obviously a filmed production -- that would be best. But you can see what the original fields look like in this clip (just reduced in size). Even at 1080, it hardly does justice to HD quality, but that's what I have to work with.
jeffy
29th January 2008, 21:11
phaedrus, may I please ask what movie it is? It seems there is some sort of blending (encoded output.mpg), visible in frames 3171, 3173.
Simple script for preview in VirtualDub:
MPEG2Source("output.d2v",idct=4)
separatefields()
scharfis_brain
29th January 2008, 22:43
The movie is 25fps blended to 59.94fps interlaced.
it seems to be constant pattern, so you may try to create PAL-DVD from it:
#
# 1080i script
#
# PLUGINS
LoadPlugin("C:\Program Files\dgmpgdec149\DGDecode.dll")
#
# SOURCE
mpeg2source("F:\MyHDCapture\movie.d2v")
#
bob()
#
changefps(25*10)
selectevery(10,?) #set ? to any value between 0 and 9 until blending and motion stutter are gone.
#
converttoyuy2()
#
Lanczos4resize(704,576)
#
AudioDub(BlankClip())
phædrus
29th January 2008, 23:19
pheadrus, may I please ask what movie it is? It seems there is some sort of blending (encoded output.mpg), visible in frames 3171, 3173.
This film is Mansfield Park broadcast here in USA. A Jane Austen costume drama. :) Yes, there is some blending going on, definitely. Scharfis_brain has it nailed, I think. I would never know how to fix this without help. I suppose it was filmed at 24fps, then shown on British TV at 25fps. When the Americans got it, they bumped it up to 60p and 30i. I'm guessing.
phædrus
29th January 2008, 23:22
Here is the original 1080i clip from the same spot in the program, if anyone needs it.
EDIT - file removed from server, link removed from post.
phædrus
29th January 2008, 23:28
The movie is 25fps blended to 59.94fps interlaced.
it seems to be constant pattern, so you may try to create PAL-DVD from it:
#
# 1080i script
#
# PLUGINS
LoadPlugin("C:\Program Files\dgmpgdec149\DGDecode.dll")
#
# SOURCE
mpeg2source("F:\MyHDCapture\movie.d2v")
#
bob()
#
changefps(25*10)
selectevery(10,?) #set ? to any value between 0 and 9 until blending and motion stutter are gone.
#
converttoyuy2()
#
Lanczos4resize(704,576)
#
AudioDub(BlankClip())
Thank you again, sir. I loaded a clip into VDub with this script, and with selectevery (10,9) it looks much better. I'll play with it some more to see if another setting will optimize it, and do a long encode overnight to test it on the whole program.
Blue_MiSfit
29th January 2008, 23:47
If you're going to actually do that, a better bobber like YADIF(mode=1) might help... It's pretty fast and always better than bob() if memory serves.
~misfit
jeffy
29th January 2008, 23:48
This film is Mansfield Park broadcast here in USA. A Jane Austen costume drama. :) Yes, there is some blending going on, definitely. Scharfis_brain has it nailed, I think. I would never know how to fix this without help. I suppose it was filmed at 24fps, then shown on British TV at 25fps. When the Americans got it, they bumped it up to 60p and 30i. I'm guessing.
Thank you for the info. I'm --just-- guessing that it might have been filmed at 25fps for the UK, then converted for the US.
http://www.imdb.com/title/tt0847182/
http://en.wikipedia.org/wiki/Moving_image_formats#50_Hz_camp
And I would take the Yadif insted of bob as well.
EDIT:
You might want to give mrestore try as well, it outputs 25 fps in this case:
http://forum.doom9.org/showthread.php?t=95924
import("mrestore.avs")
MPEG2Source("output2.d2v",idct=4)
yadif(mode=1)
mrestore()
spline36resize(704,576)
EDIT 2:
Mrestored Xvid Hvs best matrix Q3 clip from output2.mpg:
http://maxupload.com/80ED3BD6
scharfis_brain
30th January 2008, 00:43
I tried this with sucess on the sample:
mpeg2source("C:\forum\phædrus\output2.d2v",cpu=6)
crop(8,4,-6,0)
bicubicresize(720,height)
yadif(mode=1)
bicubicresize(width, 576)
changefps(25*10)
selectevery(10,8)
#converttoyuy2() #if your encoder is NOT HcEnc or QuEnc you need to uncomment this line!
BUT CONSIDER!
This puts out PAL! 704x576 pixels at 25 fps.
Also scroll through the whole movie to check for pattern breaks that cause motion stutter and blending!
if the pattern varies to frequently you may want to use mrestore.
But if the pattern is constant, you're better choosing my script, cause there simply cannot be any mismatches...
phædrus
30th January 2008, 02:45
Yes scharfis, pattern breaks are a bane, and with a larger clip (including about a minute either side of the clip I uploaded here) you find some problem areas with jerks and blends using your script. I assume pattern breaks, but I'll have to check. It doesn't need to be perfect, but I'll need to experiment. There are other programs in this series that are soon to air, and I assume they will have the same problems, so if I crack this nut now, maybe the knowledge will be useful later.
I haven't used mrestore before. Another thread today in Avisynth usage says you must bob before mrestore.
So it could be...
bob()
mrestore()
BicubicResize(704,576)
etc.
?? Or must I use yadif?
scharfis_brain
30th January 2008, 04:19
the deinterlacer is upon your choice.
you can use any deinterlacer as long as it is able to bob the video (ie. put out full field rate = 59.94 or 50.00 fps)
btw.: the source from this video seems to be nothing more than 576p25 badly converted to 1080i60
scharfis_brain
30th January 2008, 16:36
btw.: it is better to get the PAL-DVD from somewhere, because it will have MUCH better quality then the mess you captured.
I guess the video has gone this way:
- Source: 576p25 (16x9 anamorphic PAL progressive 25fps)
- treated as interlaced (576i50) and converted to 480i60 using field blending
- converted again, this time from 480i60 ti 1080i60.
- heavily denoised to help the MPEG2-compressor
- compressed to 13 mbps
phædrus
30th January 2008, 21:49
"Badly converted" is the key phrase. I thought it probably was upconverted from a lower resolution source. It had that look to it.
I'll have a look at the region 1 DVD release soon to come before spending money. Maybe that'll be decently converted.
Still, fiddling with this file is an education, at least, even if at best it doesn't come out looking very good.
2Bdecided
31st January 2008, 10:30
The original PAL DVD is quite cheap...
http://www.amazon.co.uk/Mansfield-Park-Billie-Piper/dp/B000NDETKQ
... but the production is not well thought of...
http://www.imdb.com/title/tt0847182/#comment
...it was a cheap(er) ITV production, not a "better quality" BBC one.
Cheers,
David.
phædrus
31st January 2008, 15:24
This specific program may not be worth the effort to try to perfect the conversion. However, I believe a similar technique will be applicable to other British programs that are shown on public television here in USA, ones that are more worthy. I haven't even watched the film yet. I'm just trying to get the process down.
What I don't understand is why it should be necessary to do any blending to convert 25p to 60i. They would only need to do something akin to telecining to change every block of 5 frames into 12 fields. No point in asking why, I guess. It is what it is.
phædrus
1st February 2008, 17:26
As an addendum, bob().mrestore() worked like a charm on this capture. I was quite surprised. I am indebted to the forum once again. No doubt I will use this many times in the future. There was a block error that caused the last 40 minutes of the video to go completely black. Once I fixed that and reencoded the last bit, everything was fine.
Question: When using mrestore(), i.e. the default settings, does one need TIVTC.dll and mk_masktools.dll? I loaded them in the script just in case.
2Bdecided
1st February 2008, 18:34
What I don't understand is why it should be necessary to do any blending to convert 25p to 60i. They would only need to do something akin to telecining to change every block of 5 frames into 12 fields. No point in asking why, I guess. It is what it is.It could be because they're stupid, and just treat all 25p material as if it were 50i; it could be because they're clever and know that lots of "25p" material actually includes 50i segments (by accident or on purpose); or it could be because they know how to handle 25p but prefer the look of the blends to the sharper but more stuttery hard field repeat process.
As you say though, it is what it is! As such, you might find the next one you want to restore is different - and most of what you might want to restore is available on anamorphic 576i50 PAL DVD, and increasingly likely to be broadcast by BBC HD in the UK as 1440x1080i50.
Cheers,
David.
jeffy
1st February 2008, 19:00
Question: When using mrestore(), i.e. the default settings, does one need TIVTC.dll and mk_masktools.dll? I loaded them in the script just in case.
Yes, TIVTC.dll & mt_masktools are needed.
Confirm here:
http://forum.doom9.org/showthread.php?p=673243#post673243
BTW, did you like my Xvid sample here?
http://forum.doom9.org/showthread.php?p=1094029#post1094029
phædrus
3rd February 2008, 18:43
Yes, TIVTC.dll & mt_masktools are needed.
Confirm here:
http://forum.doom9.org/showthread.php?p=673243#post673243
BTW, did you like my Xvid sample here?
http://forum.doom9.org/showthread.php?p=1094029#post1094029
Sorry, I missed that clip before. I downloaded it, and it looks comparable in motion smoothness to what I got. Yeah, that's the ticket. I'm impressed with mrestore. There are some artifacts noticeable on individual frames, sort of like halos around the edges of things. But viewing at normal speed, they aren't seen. Close enough for gov't work.
Sure, I could buy PAL DVDs. I'd have to want something really bad to do that. :) As far as Mansfield Park goes, after watching the TV adaptation, I conclude that the movie version made in 1999 is superior in every way.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.