Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th January 2022, 17:31   #1  |  Link
alexVS
Registered User
 
Join Date: Sep 2004
Posts: 147
Problem with deinterlacing (TFF and BFF in source change)

I'm trying to process video of hockey game.
Video is interlaced, so I do deinterlace with Yadif(order = 1, mode = 1)
to make double frame rate 59.94fps
The problem is that some parts of video are Top Field First and looks like some parts are Bottom FF).
Yadif(order = 1, mode = 1) - some smooth, other jerky
Yadif(order = 0, mode = 1) - other smooth, previous one jerky

Example:
https://drive.google.com/file/d/1geq...ew?usp=sharing

around 15 seconds in, there's a change from TTF to BFF
It happens in many parts of video
Is there a way to solve this problem?

My script:
Code:
f1="WJC Rus-Swe.mkv"
video = DSS2(f1,FPS=29.97)
audio = DirectShowSource(f1,fps=29.97,audio=true)
AudioDub(video, audio)

yadif(order = 1, mode = 1)
lanczosresize(1280,720)
sharpen(0.2)

ConvertToYV12()
alexVS is offline   Reply With Quote
Old 4th January 2022, 17:47   #2  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,345
Looks like source filter issues . Directshow /DSS2, ffms2, lsmash all have various problems with that source. Probably buggy timestamps in the MKV

If you demux to ES and use LSMash (LWLibavVideoSource on the elementary stream), it's ok except for the first few frames (maybe from the way it was cut), and it's BFF after

Or works ok with DGSource in MKV container, but you have to use AssumeFPS(30000,1001), and it's TFF
poisondeathray is offline   Reply With Quote
Old 4th January 2022, 18:33   #3  |  Link
alexVS
Registered User
 
Join Date: Sep 2004
Posts: 147
Quote:
Originally Posted by poisondeathray View Post
Looks like source filter issues . Directshow /DSS2, ffms2, lsmash all have various problems with that source. Probably buggy timestamps in the MKV

If you demux to ES and use LSMash (LWLibavVideoSource on the elementary stream), it's ok except for the first few frames (maybe from the way it was cut), and it's BFF after

Or works ok with DGSource in MKV container, but you have to use AssumeFPS(30000,1001), and it's TFF
Thanks for help
I dont know very well LSMash

I tried:
Code:
LoadPlugin("D:\Program files\AviSynth 2.5\plugins\LSMASHSource.dll")

## LWLibavVideoSource with default settings:
v = LWLibavVideoSource("WJC Rus-Swe_track1_und.h264", fpsnum=30000, fpsden=1001)
a = LWLibavAudioSource(source="WJC Rus-Swe_track2_eng.aac")
Audiodub(v, a)

AssumeBFF()
yadif(order = 0, mode = 1)
lanczosresize(1280,720)
sharpen(0.2)
and video twitches after Frame 908 (0:00:15.148)
What I'm doing wrong?
alexVS is offline   Reply With Quote
Old 4th January 2022, 18:48   #4  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,345
works ok for me; maybe old lsmash version ?

L-SMASH-Works-20210811 x64
https://github.com/HomeOfAviSynthPlu...Works/releases

If you seek non linearly (jump all over the place), it can mix up frames. Go back a few seconds and frame advance. Setting threads=1 can also help, but default LWLibavVideoSource works here

There are duplicates in the "slo motion" sequence, but it's not fwd/back jerky
poisondeathray is offline   Reply With Quote
Reply

Tags
avisynth, deinterlace

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:45.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.