View Full Version : UK show in 29.976 back to PAL?
rhaz
8th March 2018, 14:25
I think this show is PAL converted to NTSC, how do I restore it to normal state?
I tried multiple variations of srestore, but it ends up either in skipping frames or duplicate frames, then I tried variations with tdecimate, but it decimates wrong frames and gives even more skipping frames.
I tried srestore(23.976) combo with yadif deinterlace, since it's NTSC I tried the regular telecide and I also tried Srestore(frate=30.0/1.001).tdecimate() which gives best result so far, but I think tdecimate() does something wrong.
PetitDragon
8th March 2018, 14:58
I usually use:
TDecimate(mode=7,rate=25.0)
rhaz
8th March 2018, 15:09
I usually use:
TDecimate(mode=7,rate=25.0)
Hi! I tried your method and it gives heavy skippings.
StainlessS
8th March 2018, 15:09
Not looked @ your clip (mobile), but I saved a web page by Scharfis_Brain on 'Exotic Interlacing" some time ago, web page is no longer
available on-line but is on my MediaFire filehost (below in this post my sig [DATA Folder]), or here:- https://www.mediafire.com/folder/hb26mthbjz7z6/StainlessS#wl30b5ghmomaw
rhaz
8th March 2018, 15:29
Not looked @ your clip (mobile), but I saved a web page by Scharfis_Brain on 'Exotic Interlacing" some time ago, web page is no longer
available on-line but is on my MediaFire filehost (below in this post my sig [DATA Folder]), or here:- https://www.mediafire.com/folder/hb26mthbjz7z6/StainlessS#wl30b5ghmomaw
I gave it a read, not sure which paragraph is supposed to be 30FPS to 25FPS.
johnmeyer
8th March 2018, 15:36
It is heavily field blended. What's worse, it has some pretty obvious field skips (gaps) not sure how that happened, given that it was supposedly transformed to a higher frame rate.
SRestore (http://avisynth.nl/index.php/Srestore) is the only tool I know of that might be able to help a little bit.
rhaz
8th March 2018, 15:41
It is heavily field blended. What's worse, it has some pretty obvious field skips (gaps) not sure how that happened, given that it was supposedly transformed to a higher frame rate.
SRestore (http://avisynth.nl/index.php/Srestore) is the only tool I know of that might be able to help a little bit.
That's what I think, but can't find best srestore setting.
real.finder
8th March 2018, 15:56
That's what I think, but can't find best srestore setting.
try this
sanimebob (https://forum.doom9.org/showthread.php?p=1750019#post1750019)()
srestore(omode=4, cache=10).srestore(frate=23.976)
#smam() #for more stability
rhaz
8th March 2018, 16:38
try this
sanimebob (https://forum.doom9.org/showthread.php?p=1750019#post1750019)()
srestore(omode=4, cache=10).srestore(frate=23.976)
#smam() #for more stability
Well, I ended up importing 20 libraries for that sanimebob() and output is pretty bad, lots of duplicate frames.
rhaz
8th March 2018, 17:30
So, did more testing, with any strestore lower than 29.976 we get skipping frames, but we get rid of blended frames. And with Srestore(frate=30.0/1.001).tdecimate(cycler=1,cycle=6) we get rid of duplicate frames, deinterlace with yadif, but don't get rid of blended frames.
So I have to choose witch output best, the one with blended frames or the one with no blended frames, but with skipping frames.
Unless there's more solutions.
Sharc
8th March 2018, 20:20
Try
yadif(mode=1) #or a bobber of your choice
srestore(frate=25.0)
johnmeyer
8th March 2018, 20:21
Keep playing around with SRestore settings. I don't have time to fiddle with it, but when you get skipping frames, that usually indicates that you have not set the parameters correctly. Also, do some research in this forum about SRestore. It can produce some pretty magical results, but you sometimes have to precede it by other functions.
hello_hello
8th March 2018, 20:23
I tried srestore(23.976) combo with yadif deinterlace, since it's NTSC I tried the regular telecide and I also tried Srestore(frate=30.0/1.001).tdecimate() which gives best result so far, but I think tdecimate() does something wrong.
Both methods would generally be wrong, even if you specified Yadif(mode=1). Is that what you used? You must bob de-interlace prior to srestore for normal blend removal.
Interlaced PAL, field blended to NTSC, should de-blend to 25fps progressive (most of the time) and that's the default output when applying srestore to NTSC sources (assuming you bobbed first).
It'd be better to de-interlace with QTGMC(). All you should need is the following in a script:
QTGMC()
Srestore()
If you want to get really fussy, there's a function below for manually choosing which frames to keep rather than use SRestore. You don't actually choose every single frame, but for deblending NTSC back to PAL you have to specify one of four frames and check properly to make sure the blending is removed. Mostly the blending pattern doesn't change from beginning to end, and if that's the case the function should remove it all. Srestore can miss blended frames for a second or two until it settles down (although it's generally hard to spot unless you're looking for it), and it'll probably do the same here and there if the blending pattern changes a lot, but if the blending pattern does change, srestore is much easier to use, given it's automatic.
I tend to open a blended source this way initially, because it's fast and usually makes the blending easier to see.
Yadif(mode=1)
FixBlendNTSC(4)
Spline36Resize(1280, 720) # or whatever
Tweak(Bright=25) # or whatever
Once you have the magic number for removing the blending, you can replace Yadif with QTGMC if you prefer, which you should, followed by any cropping and resizing etc.
The sample below was created with the following script. I added a little extra denoising to QTGMC(), cropped a few pixels and resized to 16:9 with this script (https://forum.doom9.org/showthread.php?t=175114), followed by GradFun3() to help prevent banding. All of that is purely personal choice.
It is supposed to be 16:9 isn't it? Your sample indicates 4;3, but surely that's wrong?? Your screenshot has the picture resized to around 1.6, with black borders added for a total of 1.7. That seems somewhat odd.
QTGMC(Ezdenoise=1)
FixBlendNTSC(4)
CropResize8(832, 468, 0, 2, -0, -2, InDAR=20.0/11.0)
Gradfun3()
Here's the encoded sample: tested.zip (https://files.videohelp.com/u/210984/tested.zip)
Here's the FixBlend function if you want to try it. Don't forget to bob de-interlace first.
# https://forum.doom9.org/showthread.php?t=97447
# For deblending NTSC back to PAL the choices are 1 thru 4.
# For deblending PAL back to NTSC the choices are 1 thru 10.
#==== PAL-Film Blended Into NTSC 59.94i ==================================================
function FixBlendNTSC(clip orig, int "Select")
{
Select = default(Select, 3)
assert(1 <= Select <= 4, """ FixBlendNTSC: "Select" value must be 1, 2, 3 or 4 """)
Selected = (Select - 1)
orig.changefps(25*4, linear=false)
selectevery(4, Selected)
return last
}
#==== NTSC-Film Blended Into PAL 50i ====================================================
function FixBlendPAL(clip orig, int "Select")
{
Select = default(Select, 2)
assert(1 <= Select <= 10, """ FixBlendPAL: "Select" range is 1 through to 10 """)
Selected = (Select - 1)
orig.changefps(24.0/1.001*10, linear=false)
selectevery(10, Selected)
return last
}
#==== NTSC-Progressive (29.97p) Blended Into PAL 50i ========================================
function FixBlendPAL2(clip orig, int "Select")
{
Select = default(Select, 2)
assert(1 <= Select <= 10, """ FixBlendPAL2: "Select" range is 1 through to 10 """)
Selected = (Select - 1)
orig.changefps(30.0/1.001*10, linear=false)
selectevery(10, Selected)
return last
}
#=================================================================================
rhaz
8th March 2018, 21:14
QTGMC(Ezdenoise=1)
FixBlendNTSC(4)
CropResize8(832, 468, 0, 2, -0, -2, InDAR=20.0/11.0)
Gradfun3()
@hello_hello I don't know what I'm doing wrong, I imported the FixBlend script you posted below as .avsi and I get jerky playback.
real.finder
8th March 2018, 21:30
ok, I did download and test the clip
this one should be ok
sanimebob()
srestore(omode=2, mode=4, thresh=44,cache=10)
srestore(frate=23.976, mode=-4, speed=-4) #or mode=4
#smam() #for more stability
rhaz
8th March 2018, 21:47
ok, I did download and test the clip
this one should be ok
sanimebob()
srestore(omode=2, mode=4, thresh=44,cache=10)
srestore(frate=23.976, mode=-4, speed=-4) #or mode=4
#smam() #for more stability
OK, tested it and it's full skips and duplicates and blended frames. Maybe I'm applying it wrong.
So far @hello_hello test file is best quality and it's exactly what I wish, but I'm trying to follow his steps and can't reproduce, how he achieved it, because I get jerky playback with tons of duplicates than usual.
hello_hello
8th March 2018, 22:04
@hello_hello I don't know what I'm doing wrong, I imported the FixBlend script you posted below as .avsi and I get jerky playback.
Playback of the encoded video or playing the script you're creating for encoding? What are you using for playback?
The only other likely variable I can think of would be the method of opening the source file. For DVD video I'd always use DGIndex. If you ripped a DVD with MakeMKV you can open the MKV with TSMuxer and remux it as as a TS file, which you can then open with DGIndex. Other than that we don't know if you're using a GUI or how you're encoding etc, or even if you're bob de-interlacing. Yadif should be fast enough to let you preview the script in real time. QTGMC() is to slow for that.
How are you opening the video at the moment?
Sharc
8th March 2018, 22:06
Did you try the simple
yadif(mode=1) #or a bobber of your choice
srestore(frate=25.0)
It restores the original 25fps PAL video.
rhaz
8th March 2018, 22:14
Playback of the encoded video or playing the script you're creating for encoding? What are you using for playback?
The only other likely variable I can think of would be the method of opening the source file. For DVD video I'd always use DGIndex. If you ripped a DVD with MakeMKV you can open the MKV with TSMuxer and remux it as as a TS file, which you can then open with DGIndex. Other than that we don't know if you're using a GUI or how you're encoding etc, or even if you're bob de-interlacing. Yadif should be fast enough to let you preview the script in real time. QTGMC() is to slow for that.
How are you opening the video at the moment?
I meant like it looks jerky e.g. on mpc-hc because on virtual dub you can see tons of duplicate frames, so I'm not sure what I'm doing wrong applying your script. Because your test file looks perfect and I want that. I think I'm missing the 'bob de-interlacing' part? Because I don't understand, I thought QTGMC is a deinterlacer.
Did you try the simple
yadif(mode=1) #or a bobber of your choice
srestore(frate=25.0)
It restores the original 25fps PAL video.
I mentioned multiple times this does not work, it gives skipping frames.
real.finder
8th March 2018, 22:37
OK, tested it and it's full skips and duplicates and blended frames. Maybe I'm applying it wrong.
So far @hello_hello test file is best quality and it's exactly what I wish, but I'm trying to follow his steps and can't reproduce, how he achieved it, because I get jerky playback with tons of duplicates than usual.
seems that
anyway, here is what I got http://www88.zippyshare.com/v/117TgILi/file.html
ffms2("test.mkv")
sanimebob()
srestore(omode=2, mode=4, thresh=44,cache=10)
srestore(frate=23.976, mode=-4, speed=-4) #or mode=4
#smam() #for more stability
seems you use bad Source filter, like DirectShowSource
rhaz
8th March 2018, 23:14
seems that
anyway, here is what I got http://www88.zippyshare.com/v/117TgILi/file.html
ffms2("test.mkv")
sanimebob()
srestore(omode=2, mode=4, thresh=44,cache=10)
srestore(frate=23.976, mode=-4, speed=-4) #or mode=4
#smam() #for more stability
seems you use bad Source filter, like DirectShowSource
Not to be rude, but your output sample is bad, I got that too, skipping frames and duplicate frames, just check it on virtualdub. Check hello_hello's sample, it has none of these issues. But I still can't figure out how to apply his method.
real.finder
8th March 2018, 23:38
Not to be rude, but your output sample is bad, I got that too, skipping frames and duplicate frames, just check it on virtualdub. Check hello_hello's sample, it has none of these issues. But I still can't figure out how to apply his method.
how did you load the mp4 and mkv with virtualdub?
anyway I have no problem in avspmod, maybe there are one duplicate frame but not bad as you said, it's fast try base on already used setting anyway
and about hello_hello sample, it's 25 fps, simply change the fps in last srestore line, and he use srestore anyway, but with another bobber, you must not just copy past without any edit, mean you must change some settings
good luck anyway
rhaz
8th March 2018, 23:50
how did you load the mp4 and mkv with virtualdub?
anyway I have no problem in avspmod, maybe there are one duplicate frame but not bad as you said, it's fast try base on already used setting anyway
and about hello_hello sample, it's 25 fps, simply change the fps in last srestore line, and he use srestore anyway, but with another bobber, you must not just copy past without any edit, mean you must change some settings
good luck anyway
I opened it with right-click open with? Maybe I have some addons or plugins, I don't know. Anyway I solved it with hello_hello solution, I had to add bob() right before qtgmc(). And like I said it has no issues, no skips, etc. your video you attached had skips, it skips right at frame 2-3 and next at 37-38 and like that throughout, it's so many skips you can even notice it when playing file on mpc-hc.
Anyway thanks all for help, learned a lot today.
real.finder
9th March 2018, 00:15
I opened it with right-click open with? Maybe I have some addons or plugins, I don't know.
virtualdub can only open these https://s9.postimg.org/id4ugxb73/Untitled.png
mean you must use .avs file to open mp4 and others
Anyway I solved it with hello_hello solution, I had to add bob() right before qtgmc(). And like I said it has no issues, no skips, etc.
bob then qtgmc wrong, since both did de-interlace
your video you attached had skips, it skips right at frame 2-3 and next at 37-38 and like that throughout, it's so many skips you can even notice it when playing file on mpc-hc.
skips cuz the fps is not right (less than what it should), as I said before...
rhaz
9th March 2018, 00:27
You need to install FFInputDriver.vdplugin to open MKV and MP4 on virtualdub. But this is getting offtopic.
So you're saying hello_hello was wrong, because he said to bob it and then qtgmc, i don't get it.
I changed your script to 25.000 and now it has and skipping frames and blended frames that got not removed.
real.finder
9th March 2018, 00:38
You need to install FFInputDriver.vdplugin to open MKV and MP4 on virtualdub. But this is getting offtopic.
So you're saying hello_hello was wrong, because he said to bob it and then qtgmc, i don't get it.
I changed your script to 25.000 and now it has and skipping frames and blended frames that got not removed.
he never say so, he told you to use de-interlace as bob (output with double fps) by edit the setting of filters you use (yadif or whatever), not to use "bob()"!
anyway, your sample with only srestore, as they told you (Including hello_hello himself)
ffms2("E:\UK show test.mkv")
sanimebob()
srestore
http://www93.zippyshare.com/v/FPNbJYYA/file.html
manono
9th March 2018, 00:41
Where's the sample? Was it removed?
real.finder
9th March 2018, 00:43
Where's the sample? Was it removed?
seems he remove it!
anyway, here it is from history http://www93.zippyshare.com/v/4bUSQFKX/file.html
hello_hello
9th March 2018, 03:25
So you're saying hello_hello was wrong, because he said to bob it and then qtgmc, i don't get it.
I posted a script for checking the blending removal, and also a typical script I'd use for encoding, but neither of them contained more than one de-interlacer.
Maybe I wasn't clear. A bob de-interlacer doubles the frame rate, or for NTSC, it turns 59.94 fields per second into 59.94 frames per second, rather than de-interlacing to 29.97 frames per second. You didn't say how you'd been using Yadif so I was trying to make sure it was running in Bob mode.
Yadif() won't be sufficient. You need to use Yadif(mode=1)
QTGMC() performs bob de-interlacing by default.
There's no need to also bob it first.
I opened it with right-click open with? Maybe I have some addons or plugins, I don't know.
Is there a line at the beginning of the script for opening the video and if so, will it remain a secret?
Honestly, your sample should deblend easily with just bob deinterlacing followed by SRestore.
You could at least verify the frame rates are what they should be.
# Info() Should display 29.97fps when it's here
Yadif(mode=1)
# Info() Should display 59.94fps when it's here
SRestore()
# Info() Should display 25fps when it's here
johnmeyer
9th March 2018, 07:53
I don't use bob() much, but can you use it without parameters, or do you have to feed use it like this?
bob(0.0,1.0)
I usually use it when I want to preserve the original fields, exactly, and go back to interlaced at the end of the script. For that, I have to use these parameters.
manono
9th March 2018, 09:01
seems he remove it!
anyway, here it is from history http://www93.zippyshare.com/v/4bUSQFKX/file.html
Thank you, real.finder.
As hello_hello (and sharc, and others) said, to unblend field-blended garbage you first bob it (double-rate deinterlace it) followed by the use of SRestore.
More tips: Don't use an MKV when the source is a DVD.
Make a D2V project file from the VOB(s) and then use MPEG2Source as your source filter.
Read and understand the docs included in the DGMPGDec (https://www.videohelp.com/software/DGMPGDec) package.
I tried multiple variations of srestore, but it ends up either in skipping frames or duplicate frames,
Maybe you used an MKV you made from the DVD as a source? Maybe you used DirectShowSource as the source filter? Maybe you used a single-rate deinterlacer before SRestore? Or maybe you used all three?
Here's the complete script:
LoadPlugin("H:\AVISynth\dlls\DGDecode.dll")
MPEG2Source("Test.d2v")
YadifMod(mode=1, edeint=nnedi3(field=-2))#or your favorite bobber
SRestore()
Here's the reencoded file:
https://www.sendspace.com/file/5wpgxs
rhaz
9th March 2018, 10:46
manono thanks, I did what you said, on vob and not mkv, I applied your script (and hello_hello's) on the sample and it worked, then I applied it on full length video vob source and it still has blended frames and produce skips on minimal amount on random areas. I guess source is just that bad.
Thanks everyone for help.
manono
9th March 2018, 19:26
I applied your script (and hello_hello's) on the sample and it worked, then I applied it on full length video vob source and it still has blended frames and produce skips on minimal amount on random areas.
There's a chance the field order is different on the full video than the sample. The way you test that out is to just put on the bobber and play it. If you get this jerky forward/backward stuff, reverse the field order and try again in various places. Once you have that right then put on SRestore and test again.
One thing, though. Once SRestore is on you can't just go to a place and have it work. It needs time to lock in the cadence. Just checking right after you go to a place in the video is a recipe for what you describe. I 'sneak' up on it from a 100 frames or so back.
I do my testing with Yadif because it's fast. So, first try Yadif(Order=0,Mode=1). If you get that herky-jerky stuff, then try Yadif(Order=1,Mode=1) and test in various places. One or the other should work. Sometimes, but rarely, you'll get field order reversals in the middle. Once you get the field order right, put on your real bobber (or keep Yadif, if you prefer) and add in SRestore.
Yadif allows you to set the field order. Other bobbers require you to put AssumeTFF or Assume BFF (http://avisynth.nl/index.php/AssumeTFF#AssumeTFF_.2F_AssumeBFF) before the bobber itself. Good luck.
johnmeyer
9th March 2018, 21:49
Great post, manono!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.