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 21st October 2022, 16:23   #1  |  Link
RGMOfficial
Registered User
 
RGMOfficial's Avatar
 
Join Date: May 2022
Location: Brazil
Posts: 38
Replicating Telecine on AviSynth

I have a question about replacing old media (like i've been doing with DotCrawl++):

How i can properly redo an telecine of an 23.976fps film, into 60i, on AviSynth?

As for anyone who doesn't know, Telecine was an old way to transferring video into film using interlacing and duplicated frames together.
The most common technique is 2:3 pull-down.

__________________
AviSynth+ Projects:
DotCrawl++
RGMOfficial is offline   Reply With Quote
Old 21st October 2022, 16:39   #2  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,718
1. You generate the additional frames needed to go from 24 events per second to 60 events per second, but do this using the 1000/1001 conversion that is needed for NTSC video.

2. You convert frames to fields.

3. You remove every other field and then weave the remaining fields back together.

This code assumes your video has been assigned to the variable "source" and returns the result in the variable "final." MFlowFPS is a function in the MVTools2 DLL.

Code:
MFlowFps(source,super, backward_vec, forward_vec, num=60000,den=1001,ml=600)
SeparateFields()
SelectEvery(4, 0, 3)
final=Weave()
johnmeyer is offline   Reply With Quote
Old 21st October 2022, 16:42   #3  |  Link
RGMOfficial
Registered User
 
RGMOfficial's Avatar
 
Join Date: May 2022
Location: Brazil
Posts: 38
Quote:
Originally Posted by johnmeyer View Post
1. You generate the additional frames needed to go from 24 events per second to 60 events per second, but do this using the 1000/1001 conversion that is needed for NTSC video.

2. You convert frames to fields.

3. You remove every other field and then weave the remaining fields back together.

This code assumes your video has been assigned to the variable "source" and returns the result in the variable "final." MFlowFPS is a function in the MVTools2 DLL.

Code:
MFlowFps(source,super, backward_vec, forward_vec, num=60000,den=1001,ml=600)
SeparateFields()
SelectEvery(4, 0, 3)
final=Weave()
What about the "super", "backward_vec" and "forward_vec" variables?
__________________
AviSynth+ Projects:
DotCrawl++
RGMOfficial is offline   Reply With Quote
Old 21st October 2022, 17:27   #4  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,718
Sorry. I just grabbed the key parts from a larger script and figured you would know how to do the rest. Here is a larger segment of that script and it should work as shown. You probably don't need the killaudio() statement. I included it because I used multi-threading (I deleted all those statements in the post below) to dramatically increase the script's speed, and MVTools2 didn't used to work well with multi-threading unless you eliminated the audio.

Code:
loadplugin("C:\Program Files\AviSynth 2.5\plugins\MVTools\mvtools2.dll")
source=AVISource("e:\frameserver.avi").killaudio()
super = MSuper(source,pel=2)
backward_vec = MAnalyse(super, blksize=16, overlap=4, isb = true, search=3)
forward_vec = MAnalyse(super, blksize=16, overlap=4, isb = false, search=3)
MFlowFps(source,super, backward_vec, forward_vec, num=60000,den=1001,ml=600)
SeparateFields()
SelectEvery(4, 0, 3)
final=Weave()
return final
johnmeyer is offline   Reply With Quote
Old 21st October 2022, 18:47   #5  |  Link
lollo2
Registered User
 
lollo2's Avatar
 
Join Date: Aug 2017
Location: Italy
Posts: 124
Quote:
How i can properly redo an telecine of an 23.976fps film, into 60i, on AviSynth?
From Scharfis_Brain - Exotic Interlacing document in https://forum.doom9.org/showthread.p...07#post1865607

Code:
AVISource("24fps.avi")
SelectEvery(2,0,0,0,1,1).SeparateFields().SelectEvery(4,1,2).Weave()
__________________
A channel on S-VHS / VHS capture and AviSynth restoration https://www.youtube.com/channel/UCMs...h1MmNAs7I8nu4g
lollo2 is offline   Reply With Quote
Old 21st October 2022, 18:55   #6  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,597
Code:
ColorBars().ChangeFPS(24) #the 24fps source
AssumeFPS("ntsc_film",true) #for 1000/1001 thing, it change the audio too
ChangeFPS("ntsc_double")
interlaced60or50(bff=false)
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 21st October 2022, 19:17   #7  |  Link
RGMOfficial
Registered User
 
RGMOfficial's Avatar
 
Join Date: May 2022
Location: Brazil
Posts: 38
Thanks a lot for all the help you guys.
__________________
AviSynth+ Projects:
DotCrawl++
RGMOfficial is offline   Reply With Quote
Old 21st October 2022, 20:25   #8  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,718
reel.finder's solution is better than mine because it does what you asked and does the telecine by duplicating fields. I grabbed the wrong script because I was in a hurry. Mine will work, and it will match up with your other footage, but you won't get quite the same "feel" to the video as you do when fields are duplicated.

The one additional thing to add is that, depending on the field dominance in your other footage, you need to pay attention to the bff or tff flag in the "interlaced" line. Otherwise you will end up with some pretty nasty artifacts.

Last edited by johnmeyer; 21st October 2022 at 20:30.
johnmeyer is offline   Reply With Quote
Old 22nd October 2022, 04:16   #9  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,023
NOTE, in real.finder script,
Quote:
AssumeFPS("ntsc_film",true) #for 1000/1001 thing, it change the audio too
The true arg is Bool "sync_audio" which keeps the audio in sync,
but will result in odd-non/std samplerate, you would normally follow it with
ResampleAudio(OriginalAudioRate).

or ResampleAudio(OriginalClip.AudioRate).

AssumeFPS:- https://forum.doom9.org/showthread.php?t=184500
__________________
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 ???
StainlessS is online now   Reply With Quote
Reply

Tags
avisynth, interlacing, telecine

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 17:22.


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