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 19th December 2018, 12:56   #1  |  Link
masagrator
Registered User
 
Join Date: Aug 2016
Posts: 3
Deinterlace 25 FPS DVD to 23,976 FPS Progressive

It's my first time with 25 FPS Interlaced video. I don't know how to take this.
Video players are deinterlacing it without issue, so it's not that video is screwed.

I tried QTGMC, TFM, yadifmod, DGSource. In every case is 25 FPS Progressive or 50 FPS Progressive, both are smoothing with interlace artifacts.

Code:
Format                                   : MPEG Video
Format version                           : Version 2
Format profile                           : Main@Main
Format settings                          : CustomMatrix / BVOP
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Custom
Format settings, GOP                     : M=3, N=12
Format settings, picture structure       : Frame
Codec ID                                 : V_MPEG2
Codec ID/Info                            : MPEG 1 or 2 Video
Duration                                 : 1 h 25 min
Bit rate mode                            : Constant
Bit rate                                 : 7 000 kb/s
Width                                    : 720 pixels
Height                                   : 576 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 FPS
Standard                                 : PAL
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Interlaced
Scan order                               : Bottom Field First
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.675
Time code of first frame                 : 00:00:00:00
Time code source                         : Group of pictures header
GOP, Open/Closed                         : Closed
masagrator is offline   Reply With Quote
Old 19th December 2018, 17:41   #2  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,122
I guess you could just (after Deinterlace)
Code:
Last=Deint.AssumeFPS(24000,1001,Sync_Audio=true) # play clip a bit slower, whilst keeping audio sync
Last=ReSampleAudio(Deint.AudioRate) # original sample rate
Return Last
But above will result in change in audio pitch, might wanna look up TimeStretch here on forum.
On Wiki:- http://avisynth.nl/index.php/TimeStretch

EDIT: Maybe see here:- https://forum.doom9.org/showthread.p...35#post1810135

Demo using Colorbars
Code:
Function TimeStretchTempo(clip InC,Float OutNum,Float "OutDen") { 
    # http://forum.doom9.org/showthread.ph...35#post1810135
    # Returns Timestretch() Tempo arg, to change playback tempo when changing VideoFramerate, without changing pitch: 
    Num    = InC.FrameRateNumerator      
    Den    = InC.FrameRateDenominator
    OutDen = Default(OutDen,1.0).Float
    Assert(0.0<OutNum,String(OutNum,"TempoAsPercent: 0.0 < OutNum(%f)"))
    Assert(0.0<OutDen,String(OutDen,"TempoAsPercent: 0.0 < OutDen(%f)"))
    Return 100.0 * OutNum * Den / (OutDen * Num)               # All are Coerced to Float (v2.58 Incl)    
}


InC=ColorBars
IFPS=25.0
InC=InC.AssumeFPS(IFPS)                                        # Input simulated FPS : Audio No Change
InC=InC.Trim(0,-(25*60)) # EDIT: Added, make 25 FPS 60 second clip (25*60 frames)

ONUM=24000 # More Accurate than 23.976
ODEN=1001  # Ditto

Tempo=InC.TimeStretchTempo(ONUM,ODEN)                          # Calc Required Tempo keeping same pitch as InC

OutAudio=InC.TimeStretch(tempo=Tempo).ResampleAudio(InC.AudioRate)   # Stretch and back to Original SampleRate
                                                               # SSRC() can fail with some ratios, 
                                                               # ResampleAudio() almost no different to SSRC() for some years.
                                                               
OutC=InC.AssumeFPS(ONUM,ODEN,Sync_Audio=False)                 # Output Video rate leaving Audio as was

Last=OutC.AudioDub(Outaudio)                                   # Result Explicit assign to Last (no reason)

#RT_Subtitle("InFPS=%f : OutFPS=%f : Tempo=%f%%",InC.FrameRate,FrameRate,Tempo)
Subtitle(String(InC.FrameRate,"InFPS=%.3f") + String(FrameRate," : OutFPS=%.3f") + String(Tempo," : Tempo=%f%%"))
EDIT: Removed RT_Subtitle requirement.

EDIT: NOTE, both clip and audio will change length (due to lower FPS) showing ~62.56 seconds.

EDIT: An alternative is to miss out a frame every second or so, but that would produce a jerk every second,
or interpolate to lower framerate which will likely look somewhat worse than original.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 19th December 2018 at 19:51.
StainlessS is online now   Reply With Quote
Old 19th December 2018, 19:57   #3  |  Link
kuchikirukia
Registered User
 
Join Date: Oct 2014
Posts: 435
Quote:
Originally Posted by masagrator View Post
It's my first time with 25 FPS Interlaced video. I don't know how to take this.
Video players are deinterlacing it without issue, so it's not that video is screwed.

I tried QTGMC, TFM, yadifmod, DGSource. In every case is 25 FPS Progressive or 50 FPS Progressive, both are smoothing with interlace artifacts.
What do you mean, "interlace artifacts"?
kuchikirukia is offline   Reply With Quote
Old 19th December 2018, 20:30   #4  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,122
Thanks kuchikirukia, guess I was focused on the 25->23.976 rather than the deinterlace thing.

I note that MediaInfo says Bottom Field First (nearly every PAL DVD I've played with was Top field First).
Perhaps needs Clip=Clip.AssumeBFF() prior to Deinterlace. [or set whatever deinterlacer option is to choose BFF field order]
EDIT: Can never remember what the default field order is.
You can check for field order with
Code:
AssumeBFF
#AssumeTFF
SeparateFields
Resize in Vdub2 to about correct size and look for backwards forwards jumping, if so then try the alternate field order.
When true field order ascertained, remove the SeperateFields, and keep the correct field order for deinterlace.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 19th December 2018 at 20:43.
StainlessS is online now   Reply With Quote
Old 19th December 2018, 23:51   #5  |  Link
LemMotlow
Registered User
 
Join Date: Jul 2011
Location: Tennessee, USA
Posts: 266
Quote:
Originally Posted by StainlessS View Post
EDIT: Can never remember what the default field order is.
Default is BFF.

Quote:
Originally Posted by kuchikirukia View Post
What do you mean, "interlace artifacts"?
Same question. How can you have interlace artifacts after deinterlacing?
And why does the frame rate have to be 23.976? Is this a film-based movie?

I think we need a sample of this video.

Last edited by LemMotlow; 19th December 2018 at 23:55.
LemMotlow is offline   Reply With Quote
Old 20th December 2018, 02:54   #6  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,250
Quote:
Originally Posted by LemMotlow View Post
I think we need a sample of this video.
No one should have to guess. Nor should we even have to ask for a sample from the source. 10 seconds of steady motion will be plenty.
manono is offline   Reply With Quote
Old 22nd December 2018, 10:39   #7  |  Link
masagrator
Registered User
 
Join Date: Aug 2016
Posts: 3
Ok, sorry for delay.

Here is the sample of file.
https://drive.google.com/file/d/14sM...ew?usp=sharing

It's an anime which is always in 23.976 (with few old exceptions). That's why it should be 25->23.976.

Last edited by masagrator; 22nd December 2018 at 10:42.
masagrator is offline   Reply With Quote
Old 22nd December 2018, 20:36   #8  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,250
Quote:
Originally Posted by manono View Post
10 seconds of steady motion will be plenty.
Flapping lips are not 'steady motion'. And not an MKV. Demux the M2V from the VOB using DGIndex.

Edit: However, there's probably enough there to tell what's going on. It's standard field-blended garbage:

Yadif(Mode=1)## or the better bobber of your choice
SRestore()

Last edited by manono; 22nd December 2018 at 20:48.
manono is offline   Reply With Quote
Old 22nd December 2018, 23:42   #9  |  Link
Katie Boundary
Registered User
 
Katie Boundary's Avatar
 
Join Date: Jan 2015
Posts: 606
Quote:
Originally Posted by masagrator View Post
It's an anime which is always in 23.976 (with few old exceptions).
Then I can virtually guarantee that something went horribly wrong during the original NTSC -> PAL conversion and your DVD footage itself is fuxx0red.
__________________
If I ask "How do I do X?" or "what happens if I do X?", and X is a very bad thing that no one would ever normally do, assume that I already know this, and that I have Katie reasons for asking anyway.
Katie Boundary is offline   Reply With Quote
Reply

Tags
deinterlace, dvd

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 09:56.


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