Hello guest, if you like this forum, why don't you register? https://fanrestore.com/member.php?action=register (December 14, 2021) x


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AVI Synth Script Assistance
#1
Hi All,

I am trying to fix an old PAL TV recording and I have managed to obtain. I am a basic Avisynth user, I've used it several times to IVTC but if there is an expert out there maybe they could point me in the right direction? 

Mediainfo reports the file as 25 fps progressive and during movement horizontal lines appear. It looks to me as if the field order is reversed? When I have come across this before I've fixed it using TFM() but that as for NTSC footage and it doesn't seem to make any difference with this footage. 

Unfortunately this is the only way I am able to get this recording, I've was searching for it for years and was lucky to find this. 

Much appreciated Smile

Format                                  : MPEG Video
Format version                          : Version 2
File size                                : 3.11 GiB
Duration                                : 3 h 4 min
Overall bit rate mode                    : Variable
Overall bit rate                        : 2 407 kb/s

Video
Format                                  : MPEG Video
Format version                          : Version 2
Format profile                          : Main@Main
Format settings                          : BVOP
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Default
Format settings, GOP                    : M=3, N=13
Duration                                : 3 h 4 min
Bit rate mode                            : Variable
Bit rate                                : 2 407 kb/s
Maximum bit rate                        : 9 352 kb/s
Width                                    : 720 pixels
Height                                  : 576 pixels
Display aspect ratio                    : 16:9
Frame rate                              : 25.000 FPS
Standard                                : PAL
Color space                              : YUV
Chroma subsampling                      : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Compression mode                        : Lossy
Bits/(Pixel*Frame)                      : 0.232
Time code of first frame                : 00:00:00:00
GOP, Open/Closed                        : Closed
Stream size                              : 3.11 GiB (100%)


[Image: GqNuxtf.png]
Reply
Thanks given by:
#2
You're on the right track.    If the video were phase-shifted, TFM() ought to have helped.  What you have to do is call SeparateFields() and step through the video frame by frame.  If the problem disappears and the fields look fine, then you can do some field matching to try to restore the frames.  If the fields are messed up as well, then your video is probably field-blended.  No one can say for sure without a sample, but my guess is that field-blending is the culprit: you see it all the time with old recordings and their subsequent re-encodings.

If you want to make a sample, you can do so by opening the video in DGIndex and using the square brackets in the bottom right to mark out a clip.  Find a bit in which there is plenty of motion.  File→Save Project and Demux Video

The video's encoded as progressive, but it might well have been mishandled before encoding.  I'm afraid that I'm unlikely to have time to do more than have a very quick look.
Reply
Thanks given by: alleycat
#3
From your sample, it looks like the video is a field-blended mess.  Usually, only certain fields are blended, but it looks as if every field is affected.  I can't do more than help you get SRestore() (the standard solution) up and running.

Requirements
Grunt
Code:
smdegrain: https://raw.githubusercontent.com/realfinder/AVS-Stuff/master/avs%202.5%20and%20up/Zs_RF_Shared.avsi
MaskTools2

Code:
LoadPlugin("DGDecode.dll")#from DGIndex
LoadPlugin("masktools2.dll")
LoadPlugin("grunt")
Import("srestore.avsi")
Import("Zs_RF_Shared.avsi")
Mpeg2Source("test.demuxed.d2v")
#SeparateFields()
Bob()#substitute QTGMC(Preset="Placebo") or whatever
SRestore()

But the result is not pretty, and you'll have to experiment with the settings for SRestore(), including ascertaining the correct framerate.  Is this a PAL TV show?

Bob() is rubbish: I'm using it only because my PC's tied up, and I'm running all of this very slowly under Wine.  Substitute something else.
Reply
Thanks given by: alleycat
#4
If you don't fancy playing hunt-the-plugin to get QTGMC working, you can use Yadif.  It's what I tend to use because (1) it's fast and pretty good (2) I'm a dinosaur and set in my ways.

Code:
LoadPlugin("DGDecode.dll")#from DGIndex
LoadPlugin("masktools2.dll")
LoadPlugin("grunt")
LoadCPlugin("yadif.dll")
Import("srestore.avsi")
Import("Zs_RF_Shared.avsi")
Mpeg2Source("test.demuxed.d2v")
Yadif(mode=1)
SRestore(frate=25)

But this source really is garbage.  I doubt that you'll be able to do much with it, apart from maybe blurring it a bit so that it looks a bit less messed up.
Reply
Thanks given by:


Forum Jump:


Users browsing this thread: 1 Guest(s)