digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   General Discussion (https://www.digitalfaq.com/forum/news/)
-   -   Deinterlacing causes audio sync? (https://www.digitalfaq.com/forum/news/13399-deinterlacing-causes-audio.html)

Jayce72 03-24-2023 05:49 PM

Deinterlacing causes audio sync?
 
So wits end.

I have captured some footage and on viewing the raw capture it's fine

I try to deinterlace with either Hybrid or Avisynth (script in Virtualdub2) QTGMC and the audio is out be at least 2 seconds.

If I deinterlace in VirtualDub2 using Yadiff, the audio is fine

So Im told Yadiff is ancient and Avisynth QTGMC is the way - but any ideas on getting this to work?

Here's my script for VirtualDub2:


SetFilterMTMode ("QTGMC", 2)
FFMPEGSource2("C:\Users\etcetc.avi", atrack=1)
AssumeTFF()
QTGMC(preset="fast",EdiThreads=1)
BilinearResize(720,576)
Prefetch(2)

Either way in VD2 or Hybrid I get the same results

Jayce72 03-24-2023 06:01 PM

PS: I have googled and googled this. I have tried a few ideas... and nothing has worked. The only other option I havent tried is reinstalling my machine..... which I dont really want to do

mbassiouny 03-24-2023 06:11 PM

Mind sharing a short sample please (of the capture, not the encode)?

Jayce72 03-24-2023 06:20 PM

Quote:

Originally Posted by mbassiouny (Post 89777)
Mind sharing a short sample please (of the capture, not the encode)?

Can do tomorrow 👍

Jayce72 03-25-2023 04:13 PM

reply
 
2 Attachment(s)
Quote:

Originally Posted by mbassiouny (Post 89777)
Mind sharing a short sample please (of the capture, not the encode)?

now uploaded

mbassiouny 03-25-2023 04:49 PM

"of the capture, not the encode"

But hey, good thing you uploaded the encodes too. It indicated sth useful. ur frame rate is a mess 48fps??:eek:. Your video (image wise) is faster than your audio. In plain english, you accelerated video, but not the audio. Is the out-of-sync, you are complaining about is: audio being longer than video? or am I not getting your issue right?

Share the original untouched interlaced capture file, so we can tell you what is the correct way to de-interlace it.

Jayce72 03-25-2023 05:16 PM

1 Attachment(s)
Using Virtualdub2 to deinterlace is fine - but on using this script in VirtualDub2 I get the issues.

SetFilterMTMode ("QTGMC", 2)
FFMPEGSource2("C:\Users\etcetc.avi", atrack=1)
AssumeTFF()
QTGMC(preset="fast",EdiThreads=1)
BilinearResize(720,576)
Prefetch(2)

But here's the capture

mbassiouny 03-25-2023 09:31 PM

1 Attachment(s)
I didn't notice you were doing PAL.

Your script works, but for some reason, mediainfo says 48fps for your QTGMC video.

I have no clue tbh. Something went wrong with your encoding process. I never use Vdub for encoding, so I can't even guess what went wrong.

Used your script, on your sample, with x264gui. All fine, the "I told you" yell is on time synced with the pointing finger, fps reported correctly in mediainfo.

Also, do not forget to fix AR when encoding, you are doing 5:4.

p.s: why the resize? you are resizing to exactly the same source dimension.

Hushpower 03-25-2023 11:36 PM

Far be it for me to be commenting on AVISynth scripts, but I make the following observations:

- the source file is RGB/Uncompressed, not lossless

- running my QTGMC script, it comes out at 50fps:

Code:

AviSource("H:\DigitalFAQ videos\Jayce72\Birthday clip.avi")
ConvertToYV24(interlaced=true, matrix="Rec601")
AssumeTFF
QTGMC(Preset="Fast", FPSDivisor=1, EdiThreads=2) #FPSDivisor default is 1 gives double framerate; 2 gives orig FR


Jayce72 03-26-2023 04:57 PM

reply
 
1 Attachment(s)
Great stuff it worked.

So my old code was

SetFilterMTMode ("QTGMC", 2)
FFMPEGSource2("C:\file etcetc.avi", atrack=1)
AssumeTFF()
QTGMC(preset="fast",EdiThreads=1)
BilinearResize(720,576)
Prefetch(2)

Now amended your code to:

SetFilterMTMode ("QTGMC", 2)
AviSource("C:\file etcetc.avi)
ConvertToYV24(interlaced=true, matrix="Rec601")
AssumeTFF()
QTGMC(Preset="Fast", FPSDivisor=1, EdiThreads=1) #FPSDivisor default is 1 gives double framerate; 2 gives orig FR
BilinearResize(1440,1080)
Prefetch(2)

Result in 1440x1080 at 50 fps 4x3 frame

mbassiouny 03-26-2023 05:10 PM

I really have trouble seeing the difference. Explicitly mentioning that FPSDivisor=1 has no effect since it is the default value anyway.

Code:

FFVideoSource("D:\files\u2-seed\Birthday clip.avi")
ConvertToYV12(interlaced=true, matrix="Rec601")
AssumeTFF()
QTGMC(preset="fast",EdiThreads=1)

worked just fine...:hmm:

Either way, as long as it works for op and he is happy, it is all good.

Hushpower 03-26-2023 07:40 PM

Quote:

Originally Posted by mbassiouny
Explicitly mentioning that FPSDivisor=1 has no effect since it is the default value anyway.

I realise that but I am AVISynth-challenged and by leaving it in, I won't forget about setting the FPS. :)

Where's Lollo? I thought he'd be congratulatinng me on delving into AVISynth. :)

lollo2 03-27-2023 05:47 AM

Quote:

Where's Lollo? I thought he'd be congratulatinng me on delving into AVISynth.
Congratulations! :wink2:

Once AviSynth tech, never back!



About the original problem, in posted scritps there is a mix of FFMPEGSource2 / FFVideoSource / AviSource. I would debug this :wink2:

mbassiouny 03-27-2023 07:21 AM

Quote:

Originally Posted by lollo2 (Post 89834)

About the original problem, in posted scritps there is a mix of FFMPEGSource2 / FFVideoSource / AviSource. I would debug this :wink2:

FFvideosource should do the same as FFMPEGSource2...?


Code:

FFMPEGSource2("D:\files\u2\Birthday clip.avi")
ConvertToYV12(interlaced=true, matrix="Rec601")
AssumeTFF()
QTGMC(preset="fast")

Still works just fine.

So no new scripts were provided here, all 3 are the same :question: (except for the fact the op has no color conversion in his post, but I am assuming his file prior to the trim was fine otherwise qtgmc won't be happy)

@Hushpower Congrats :D

Hushpower 03-27-2023 07:37 AM

Quote:

Originally Posted by mbassiouny
@Hushpower Congrats

Ha ha! Lollo and I have a love-hate relationship; it took me 2 days to set up QTGMC, almost killed me (my brain, that is), and it's the only AVISynth script I use apart from "Mergechroma", which I got from Jagabo, to cure colour waves due to a dodgy VCR. Apart from that, I'm a GUI man thru and thru! :congrats: :congrats:

mbassiouny 03-27-2023 08:45 AM

Oh I see
Soon you will become part of the sect... I used to hate scripting/cli :D

Quote:

Apart from that, I'm a GUI man thru and thru!
But..but.. AVS can GUI-ied (a bit):D In case you did not know, there is avspmod
https://www.videohelp.com/software/AvsP

You just type the filter name, (it auto completes it for you like code editors), and for the parameters, use the sliders and toolbox on the bottom-right

Hushpower 03-27-2023 09:17 AM

Thanks mbassioumy, I had a dabble with avspmod and Hybrid last year but they don't fit into my workflow (Hybrid won't export to LAGS, for example). I do one run with QTGMC through VDub for Flaxen and Colourmill and then into my editor where I do cropping and more colour. I denoise with Neat Video and stabilise with Mercalli on each timeline object if needed. I just don't have the time or patience to conduct separate AVISynth operations on each clip I use.

mbassiouny 03-27-2023 12:49 PM

Quote:

Originally Posted by Hushpower (Post 89839)
I just don't have the time or patience to conduct separate AVISynth operations on each clip I use.

As long as you have a workflow that suits you fine, u don't have to use avs (you lose the sweet sweet perks * of being an avs sect member tho). Whatever makes you happy my friend (video-wise):congrats:

*: perks include banging your head against the keyboard when u break dependencies between filters/scripts. Breakfast is not included.


All times are GMT -5. The time now is 10:19 PM

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.