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 23rd August 2010, 20:31   #1  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 667
How convert video 30i to 120p

Hi, i like know how could convert hibryd material at 30i to 120p (fields for second). That should be a optional case if i dont want use matroska files.

One code could be:

Code:
DGDecode_mpeg2source("E:\Bleach\141.d2v", info=3)
Tdeint(mode=1)
Tdeint(mode=1)
I understand this metod up to frames numbers, but obtein a constant frame rate, dont it?

Thanks
Overdrive80 is offline   Reply With Quote
Old 25th August 2010, 02:08   #2  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,816
AFAIK, you should just convert to 60p, or keep it interlaced.

Two instances of TDeint(mode=1) won't do any good.

Derek
Blue_MiSfit is offline   Reply With Quote
Old 25th August 2010, 06:39   #3  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 667
If I used some bobber based on interpolation of frames? I understand that not is good idea because tdeint duplicate frames, isnt it?
Overdrive80 is offline   Reply With Quote
Old 25th August 2010, 07:39   #4  |  Link
MrVideo
Registered User
 
MrVideo's Avatar
 
Join Date: May 2007
Location: Wisconsin
Posts: 1,796
Quote:
Originally Posted by Overdrive80 View Post
Hi, i like know how could convert hibryd material at 30i to 120p (fields for second).
First off, 30i isn't 30 fields per second, but 30 frames per second.

Secondly, why are you wanting to go from 30 frames/sec interlaced to 120 frames/sec progressive? What are you hoping to achieve by doing that?
MrVideo is offline   Reply With Quote
Old 25th August 2010, 12:52   #5  |  Link
Alex_ander
Registered User
 
Alex_ander's Avatar
 
Join Date: Apr 2008
Location: St. Petersburg, Russia
Posts: 334
Quote:
Originally Posted by Overdrive80 View Post
I understand that not is good idea because tdeint duplicate frames, isnt it?
ChangeFPS(120)
in place of second TDeint would do the same duplication and slightly better.

Quote:
If I used some bobber based on interpolation of frames?
No, the same as with second TDeint. But you could try MFlowFPS for 60->120fps interpolation after single TDeint.
Alex_ander is offline   Reply With Quote
Old 25th August 2010, 13:07   #6  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,394
Guys ...

the question is not how to get 120fps. The question is WHY.

Reminder: Hybrid content, containing a mix of 24fps and 30fps. Does that ring a bell?

Now you can proceed with discussing.

***

Oh, BTW: keep in mind that CRTs are slowly disappearing (CRTs can handle 120fps - not all, but many), and 120Hz TFTs are quite new and not common yet.

Todays most typical desktop monitor is a 60Hz budget TFT that is unable to display 120Hz content.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 25th August 2010, 13:44   #7  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 667
@Dideé

Why? Because if i dont want use to matroska files, it is the only way to do good deinterlacing, isnt it?

I read post and post, and the mcm of 24 and 30 is 120. It is for this reason for which i like know as encoded at this constant framerate, with optimal result, from hibryd source.

Quote:
Originally Posted by MrVideo View Post
First off, 30i isn't 30 fields per second, but 30 frames per second.
Citing fields per second resulting video I referred to 120 fps (fields for second) after bobber deinterlaced.

If I am wrong on the technical basis, could you explain why, please?

Last edited by Overdrive80; 25th August 2010 at 13:53.
Overdrive80 is offline   Reply With Quote
Old 25th August 2010, 13:51   #8  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,394
Thanks for explaining, but I already know the why's and how's. And also the whynot's and hownot's.


In a nutshell: you have to isolate the (telecined) 24 fps parts and the (interlaced) 60i parts, process them seperately (telecine parts: first IVTC, then make 3:3:3 pulldown // interlaced parts: bob deinterlace, then make 2:2 pulldown), and finally stitch everything together again.

Having accomplished this workflow, you have a 120fps clip that displays as intended on ancient CRT tubes and future 120Hz panels, but not on any typical 60Hz TFT of today.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)

Last edited by Didée; 25th August 2010 at 14:10.
Didée is offline   Reply With Quote
Old 25th August 2010, 15:16   #9  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 667
Quote:
Originally Posted by Didée View Post
Thanks for explaining, but I already know the why's and how's. And also the whynot's and hownot's.
LOL, then i understand bad ^^.

Quote:
In a nutshell: you have to isolate the (telecined) 24 fps parts and the (interlaced) 60i parts, process them seperately (telecine parts: first IVTC, then make 3:3:3 pulldown // interlaced parts: bob deinterlace, then make 2:2 pulldown), and finally stitch everything together again.
Ok, forgive me if I ask so much.

IVTC would be tfm() and Bobber (f.e.) McBob()

But when you say pulldown 3:3:3 and 2:2, i dont know how write it in code for script, maybe could help me, please? I have a thirst for knowledge
/
Overdrive80 is offline   Reply With Quote
Old 25th August 2010, 16:03   #10  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,394
Where did I have my brain, to write 3:3:3 pulldown? That's wrong, of course the 24fps parts need 5:5 pulldown to get 120fps.

Quote:
Originally Posted by Overdrive80 View Post
IVTC would be tfm() and Bobber (f.e.) McBob()
For example, yes. Just that IVTC would be TFM().TDecimate(), and I for one would not use MCBob anymore.


Quote:
But when you say pulldown ... i dont know how write it in code for script,
Okay, example. Let's assume a 30i source has FILM in frames [0,1000] and [4000,5000] and [8000,9000], all the rest is VIDEO.

Code:
source = whatever

# prepare the two different processings
vid24 = source.TFM().TDecimate()
vid60 = source.bob() # plenty of different bob filters are available, can't tell which one you prefer

# prepare frame pulldown
vid24_120 = vid24.selectevery(1, 1,1,1,1,1) # for every 1 frame, do output 5 times the same frame
vid60_120 = vid60.selectevery(1, 1,1) # for every 1 frame, do output 2 times the same frame

# splice together
vid24_120.trim(    0*4, 1000*4 + 3 ) ++ vid60_120.trim( 1001*4 , 4000*4 - 1 ) ++ \
vid24_120.trim( 4000*4, 5000*4 + 3 ) ++ vid60_120.trim( 5001*4 , 8000*4 - 1 ) ++ \
vid24_120.trim( 8000*4, 9000*4 + 3 ) ++ vid60_120.trim( 9001*4 ,    0       ) 

return(last)
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)

Last edited by Didée; 25th August 2010 at 16:16.
Didée is offline   Reply With Quote
Old 25th August 2010, 16:09   #11  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 667
WOW its wonderfull, thanks you very much. I go to test it and more or less, i understand the code althought im not programmer.
Overdrive80 is offline   Reply With Quote
Old 25th August 2010, 16:15   #12  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,394
There's a stupid mistake in it - the base framerate is 30fps, hence the factor is "4" (120/30), not "5". I'm editing the script right now.

Edit: Done.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)

Last edited by Didée; 25th August 2010 at 16:17.
Didée is offline   Reply With Quote
Old 25th August 2010, 18:47   #13  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 667
I test two codes for separated

First

Code:
DGDecode_mpeg2source("E:\DB_1\Opening\NF\ope.d2v", info=3)+\
DGDecode_mpeg2source("E:\DB_7\41\41.d2v", info=3)

ColorMatrix(hints=true, interlaced=true, threads=0)

source=last

# prepare the two different processings
vid24 = source.TFM().TDecimate()

vid24_120 = vid24.selectevery(1, 1,1,1,1,1) # for every 1 frame, do output 5 times the same frame

vid24_120
Framecount indicates 177225

Second

Code:
DGDecode_mpeg2source("E:\DB_1\Opening\NF\ope.d2v", info=3)+\
DGDecode_mpeg2source("E:\DB_7\41\41.d2v", info=3)

ColorMatrix(hints=true, interlaced=true, threads=0)

source=last

# prepare the two different processings

vid60 = source.bob() # plenty of different bob filters are available, can't tell which one you prefer

# prepare frame pulldown

vid60_120 = vid60.selectevery(1, 1,1) # for every 1 frame, do output 2 times the same frame

vid60_120
Framecount indicates 177230

Dont should framecount be the same in both cases?
Overdrive80 is offline   Reply With Quote
Old 25th August 2010, 20:45   #14  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,394
Not necessarily. The *exact* number of total framecount after IVTC is a dice game. IVTC makes 4 output frames out of 5 input frames. If you have an input stream of 50 frames, the output (should) be 40 frames. But what if your input stream is 49 or 48 frames, or 51 or 52?
The exact number depends on the length of the input, on how the pattern is distributed, on how the decimator is making decisions, and so on. There is definetly an uncertainty of +/-1 frame, and even +/-2 frames would not be a surprise. And since the IVTC'ed frames are 5-folded (to make 24fps->120fps), you can easily get a difference of 5 frames, or maybe even 10 frames, in the total frame count.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 25th August 2010, 21:10   #15  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 667
Ok thanks
Overdrive80 is offline   Reply With Quote
Old 26th August 2010, 05:20   #16  |  Link
MrVideo
Registered User
 
MrVideo's Avatar
 
Join Date: May 2007
Location: Wisconsin
Posts: 1,796
Quote:
Originally Posted by Overdrive80 View Post
I read post and post, and the mcm of 24 and 30 is 120. It is for this reason for which i like know as encoded at this constant framerate, with optimal result, from hibryd source.
I'm a little confused, since MPEG video wrappers (TS, MP4, MKV), AFAIK, do not allow mixed frame rates. You can have multiple source files where they can have different frame rates, but not different frame rates in a single source file.

Quote:
Citing fields per second resulting video I referred to 120 fps (fields for second) after bobber deinterlaced.
Progressive video does not have fields, only complete frames. Interlaced video is the only type that has fields. You do not care if the source of the progressive video was interlaced or not, the description is always based on the video format at hand. In this case, the video at hand is 120p, which is only available in frames per second.

BTW, the video rates are really 23.976, 29.97, 59.94 and 119.88, not 24, 30, 60 or 120. You can thank our idiot FCC for causing that problem way back when color TV was standardized all those many years ago.
MrVideo is offline   Reply With Quote
Old 26th August 2010, 11:28   #17  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 667
Quote:
Originally Posted by MrVideo View Post
I'm a little confused, since MPEG video wrappers (TS, MP4, MKV), AFAIK, do not allow mixed frame rates. You can have multiple source files where they can have different frame rates, but not different frame rates in a single source file.
Yes, you are saying correctly all. But hibryd material have different part of material encoded as interlaced. Someone could be identify as FILM and others as VIDEO.

Quote:
Progressive video does not have fields, only complete frames. Interlaced video is the only type that has fields. You do not care if the source of the progressive video was interlaced or not, the description is always based on the video format at hand. In this case, the video at hand is 120p, which is only available in frames per second.
Ok, yes only have frames. But the fields in each frame are used for the reconstruction of duplicaded frames; for this reason i said it.

Quote:
BTW, the video rates are really 23.976, 29.97, 59.94 and 119.88, not 24, 30, 60 or 120.
Yeah, i did know it. Is the way of talking

24000/1001=23.976..
30000/1001=29.970..
60000/1001=59.970..
120000/10001=119.88..

Bye
Overdrive80 is offline   Reply With Quote
Old 26th August 2010, 18:45   #18  |  Link
MrVideo
Registered User
 
MrVideo's Avatar
 
Join Date: May 2007
Location: Wisconsin
Posts: 1,796
Quote:
Originally Posted by Overdrive80 View Post
Yes, you are saying correctly all. But hibryd material have different part of material encoded as interlaced. Someone could be identify as FILM and others as VIDEO.
I've never heard anyone call that hybrid before. Even if you bump everything up to 119.88, the 23.976 source material is still going to be effectively 23.976 frames per second and the 29.97 source material is still going to effectively be 29.97 frames per second. Just what are you trying to accomplish going to 119.88p? Other than getting a frame rate that pretty much can't be played anywhere.

Quote:
Ok, yes only have frames. But the fields in each frame are used for the reconstruction of duplicaded frames; for this reason i said it.
It is still a wrong description of progressive video. Once you have progressive video, you do not have fields anymore. Forget what kind of video was used to create it. So that EVERYONE understands you correctly, you need to use the correct terms.

The same thing applies when I take 1080i29.97 video that is sourced from 1080p23.976 and convert it back to 1080p23.976 using AVISynth tools. The result, even though it came from interlaced video, having fields, the result is now progressive and is frames only. The correct terms MUST be used according to the video material type.
MrVideo is offline   Reply With Quote
Old 26th August 2010, 19:00   #19  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 667
Quote:
Originally Posted by MrVideo View Post
I've never heard anyone call that hybrid before
Well If I am wrong, when they refer to hybrid material, is that video that has parts telecined and other purely interlaced. Both parts have the same frame rate, but have been so interlaced different.

Quote:
Just what are you trying to accomplish going to 119.88p?
Get a constant frame rate that is multiple of both for not using VFR.

There are Japanese video at these rates, which may be actually encoded videos at 120 fps using a video capture with that option

Quote:
It is still a wrong description of progressive video. Once you have progressive video, you do not have fields anymore. Forget what kind of video was used to create it. So that EVERYONE understands you correctly, you need to use the correct terms.
Sure that i didnt explained correctly. I know that when a video is progressive never has fields because only appears in interlaced video. In all time, I was referring to the process of moving interlaced video to progressive, using the reconstruction of fields.

Last edited by Overdrive80; 26th August 2010 at 19:07.
Overdrive80 is offline   Reply With Quote
Old 28th August 2010, 17:21   #20  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,341
Quote:
I'm a little confused, since MPEG video wrappers (TS, MP4, MKV), AFAIK, do not allow mixed frame rates. You can have multiple source files where they can have different frame rates, but not different frame rates in a single source file.
MP4 and MKV (not sure about TS) don't use a constant frame rate. Look up timecodes.

If you want to create a 120 (frames) fps avi you need to add drop frames: http://avisynth.org/mediawiki/VFR#en..._cfr_-_120_fps (instead of encoding all the 120 frames).
Wilbert is offline   Reply With Quote
Reply

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 03:57.


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