View Full Version : 25fps to 29.976fps
El Enmascarado
11th June 2005, 07:10
I tried finding information in this forum about this conversion and all I found was to use avisynth but not instructions on how to do it, could you please provide them here using this or another program capable of doing this conversion which I tried to solve and keep getting unsynched video.
IanB
11th June 2005, 08:01
El Enmascarado, :search: To get you started some simple examples.
Frame DuplicationAviSource("your.avi")
ChangeFPS(29.97)
Frame Blending (I don't like this)AviSource("your.avi")
ConvertFPS(29.97)
Interlaced Field duplicationAviSource("your.avi")
Bob() # Should use a smart Bob'er, i.e DGBob etc
ChangeFPS(59.94)
SeparateFields()
SelectEvery(4,0,3)
Weave()
IanB
Kika
11th June 2005, 12:56
If you use Bob() or LeakKernelBob(), you should use SelectEvery(4,1,2).
With KernelBob(), SelectEvery(4,0,3) is correct.
El Enmascarado
11th June 2005, 16:01
Thanks so much that work great, but one more thing, what do u mean to get me started? is there more to do?
Can you explain what is the diference using all 3 methods?
?
IF your PAL 25fps source is progressive (means no combs are shown) then you dont have to do the fieldblended conversation at all.
Simply....
Avisource("25fpspalsource.avi")
Assumefps(23.976, true)
SSRC(48000) # (44100) in case of VCD etc.
Here applying the pulldown
And a 29.97 fps NTSC telecined Stream is the result. And its much more easier to restore back to 23.976 if needed.
El Enmascarado
13th June 2005, 20:44
I still have one problem, I was using the Frame Duplication technique you described earlier, and I was good with it for the 2 avis (512x384 and 704x576) and the rest of mpgs; I changed them to compabible ntsc vcd and they were syncronized; however I also had some pal vcd compliant avis but these I can't convert them to ntsc vcd without having sync problems again! of about 2 or 3 seconds; and that was using the same method (Frame Duplication), could it be that is time for me to use another method or could it be that I haven't reset my pc for the last 3 days?
as I was reading here; according to the incredable guy, I don't need to use the 2nd method cuz the video is PAL and progresive so no blending is needed, that leaves me to the first method only, but I have no idea how to use a boobster, and for the new method described by the incredable guy SSRC fails to respond.
I still need some help.
Maybe my nic is "incredible" but im not that incredible *lol*. If said the truth, I hate that name lately as it was the first "thing" came into my mind when registering at vcdhelp.com 3 Years ago as that word was included in a headline of a newspaper I got in front of mine in that moment *lol*
Best would be if you post your script.
A simple ChangeFPS(29.97) out of 25fps done on a non-fieldseparated stream is one of the worst conversations you can do. The flow of the stream will be recognisely interrupted and a nice jitter effect will be the result.
According to ssrc: http://www.avisynth.org/SSRC
The script for your needs would look like this:
Avisource("25fps_Progressive_palsource.avi")
Assumefps(23.976, true)
AssumeFrameBased
SeparateFields()
SelectEvery(8, 0,1, 2,3,2, 5,4, 7,6,7)
Weave()
Assumefps(23.976, true) does lower the pitch of your audio ton a bit, but in most cases the specific PAL country language tracks are spoken on 24fps for cinema purposes and pitched up to 25 for DVD/TV mastering/broadcasting purposes. So by lowering the Pitch you even should obtain the correct tone.
If you want to keep the tone then change ...
... Assumefps(23.976, true)
to
... Assumefps(23.976).TimeStretch(tempo=(100.0*23.976)/25)
and delete the SSRC(...) Line at the end.
BUT .... do you really have to end up with a 29.97 fps NTSC Videostream?
If you want to encode to mpeg2 DVD then you can LEAVE the progressive stream at 25fps! and after encoding to still 25fps you simply process that resulted 25fps mpeg2 by using DgPulldown to obtain a DVD compilant NTSC stream!
IanB
14th June 2005, 10:28
Thanks so much that work great, but one more thing, what do u mean to get me started? is there more to do?In short YES. This is a complicated and very much discussed topic.
:search: :readguid:
Can you explain what is the difference using all 3 methods?
Each method has it's pro's and con's depending on the source and destination display format, e.g. interlaced, progresive, etc, and the ease which the process can be reversed, e.g. blending is hard to reverse, duplicating is easier. All these methods cause motion jitter, using the interlaced method gives a motion jitter with lower amplitude and higher frequency hence less noticable but is only suitable for viewing on interlaced display device like a TV.
Other methods which avoid the jitter like a $100,000 Snell and Wilcox machine involve motion prediction to interpolate timewise the new frames. Motion Perfect is a product that achives credible results. MVTools emulates this performance but is still being developed. With what I have mentioned here I am just scratching the surface.
As you are finding out the other part to this problem is audio sync.SSRC fails to respond.SSRC() give very high quality conversion between 2 audio sample rates but is limited to rates that have a limited rational relationship. ResampleAudio() does not have this restriction, but prior to Avisynth 2.5.6 the code had a slight creeping error in the calculations which caused distortion in the result. The 2.5.6 version now is quite close to SSRC() in quality. Timestretch() by the nature of the algorithm used causes noticable distortion in the result, generally use it for speech only, never for high quality music.SelectEvery(8, 0,1, 2,3,2, 5,4, 7,6,7)This implements the standard NTSC-Film telecine pattern. A slightly more complicated pattern can be used to convert directly from 25 frames per second progressive to 59.94 fields per second interlaced. Search for DGPulldown by Neuron2 (Donald A. Graft) to find out more.
IanB
Wilbert
14th June 2005, 12:01
Timestretch() by the nature of the algorithm used causes noticable distortion in the result, generally use it for speech only, never for high quality music.
Could you elaborate or give a reference if this is common knowledge?
zilog jones
14th June 2005, 12:34
I've heard this many a time too about pitch correction algorithms. I just never bother with them - most (if not all?) proper PAL telecine conversions don't appear to change the pitch, and I still notice this on new DVDs. It makes music slightly off-key anyway.
The only time I ever notice the pitch change is if I've heard the 24fps audio very recently (or a lot) before hearing it in 25fps, or if I've been listening to the soundtrack album a lot - I don't think it's anything to get worried about, IMO.
Anyway, back on topic (sorry for my rant):
El Enmascarado, it appears you are making VCDs? Is this true? That means you're stuck with 352x240 - so these mentions of interlaced convertions (using DGBob, etc.) won't be much help. As incredible said, try AssumeFPS(23.976, true) and don't worry about the pitch change ^_^
For VCD, the only other options would be changeFPS(29.97) which would be very jerky, or ConvertFPS(29.97) which would end up with a lot of blurred frames. AssumeFPS like above won't destroy the frames/motion - all you need to do is resize them correctly.
And IanB - wouldn't SelectEvery(8, 0,1, 2,3,2, 5,4, 7,6,7), be the same as ChangeFPS(59.94) then weaving? Though it still wouldn't be much help in this case...
IanB
14th June 2005, 14:49
And IanB - wouldn't SelectEvery(8, 0,1, 2,3,2, 5,4, 7,6,7), be the same as ChangeFPS(59.94) then weaving? Though it still wouldn't be much help in this case...No, because ChangeFPS won't do the 23254767 quickstep it does something (now don't quote me on this) like 0123345677.
Could you elaborate or give a reference if this is common knowledge?Avery Lee had a bit of a rant about his "Ratty Pitch Shift" and other algorithms on his blog page http://www.virtualdub.org/blog/pivot/entry.php?id=45
Admittadly TimeStretch() does a fairly creditable job, but I find with music it just lacks that cleanness I expect. I think part of the algoithm detects silence and stretches or squeezes it, speech has lots of silence between sylables so that part of the algorithm does most of the work. With music there is very little silence so the other part the algorithm has to do all the work and results in artifacts.
IanB
Paulcat
14th June 2005, 15:10
Since the original film is 24 fps, and PAL is just "sped-up" film, why not just leave it the way it is? (unless you are doing it professionally or course)
To convert PAL AVI's from 25 fps to NTSC MPG's at 29.97 I first convert with TMPGEnc and leave the framerate at 25 (I just change the size) and encode non-interlaced (progressive). Then I use DGPulldown to adjust the playback to 29.97. For making DVD's from AVI's, this works like a charm. You can use your original audio with no manipulation, and you get to see a 100 minute film in 96 minutes, imagine all the free time you will have!
Admittadly TimeStretch() does a fairly creditable job, but I find with music it just lacks that cleanness I expect. I think part of the algoithm detects silence and stretches or squeezes it, speech has lots of silence between sylables so that part of the algorithm does most of the work. With music there is very little silence so the other part the algorithm has to do all the work and results in artifacts.
Normally a TimeScaler in Audio Hardware/Software environments does something like slicing the audio in a tricky way. And here comes the diff. from lowQ and HighQ Audio TimeScalers, highQ Timescalers do somthing like interpolate the lecks between the slices if expanding, and on the other side doing a better merging if compressing the TimeLength.
LowQ Timescalers just use the slices and dont care about the lecks.
This effect was often as-wanted used as an effect on vocals in brum'nBass tracks.
Theres a nicy tricky software for "timescaling" tracks/songs, which is called ReCycle: http://www.propellerheads.se/products/recycle/index.cfm?fuseaction=mainframe
That one does slice at every peak in the audio (or you can do it manually) so the audio is at least splitted more logically referred whats playing on that actual ms. Like a Bassdrum, a snare or whatever. But for shure it fails on continous tones, like voices or synthesizers in the background.
I also try to avoid timescaling in audio (as lang. mostly is spoken on 24fps) as its comparable to a fieldblending or motionvector based fps scaling in video ;)
zilog jones
14th June 2005, 16:59
To convert PAL AVI's from 25 fps to NTSC MPG's at 29.97 I first convert with TMPGEnc and leave the framerate at 25 (I just change the size) and encode non-interlaced (progressive). Then I use DGPulldown...
Have you not been reading this? He's trying to make VCDs, not DVDs...
El Enmascarado
15th June 2005, 03:48
A simple ChangeFPS(29.97) out of 25fps done on a non-fieldseparated stream is one of the worst conversations you can do. The flow of the stream will be recognisely interrupted and a nice jitter effect will be the result.
How do I know if my avi is interlaced, progresive or non-fieldseparated?
what is non-fieldseparated?
if my video was fieldseparated will the jitter effect be minimized when using changefps?
Kika
15th June 2005, 08:51
Have you not been reading this? He's trying to make VCDs, not DVDs
This does not matter...
How do I know if my avi is interlaced, progresive or non-fieldseparated?
Watch your stream in Vdub or any other Videoplaying appl.
If you see combings in fast moving parts, THEN you deal with an interlaced source.
what is non-fieldseparated?
if my video was fieldseparated will the jitter effect be minimized when using changefps?
Your video (if interlaced) comes in a weaved state, so the fields are not separated. Separating fields is done in the avisynth script above for filtering each field separately. In interlaced architecture you got a top- and a bottom-field., means in PAL 50 fields per second = smoother movements. Progressive streams do come in full frames, means 25 Frames per second.
mg262
15th June 2005, 10:38
On stretching audio, also see:
Time Length Adjustment Tools Quality Comparison
http://forum.doom9.org/showthread.php?s=&threadid=76376
Edit:
From a very old USENET post (http://groups-beta.google.com/group/comp.music.research/msg/5f2cd2759fb6f60e)
> Time stretching or compression could probably be accomplished by first
> pitch shifting and then resampling to restore the original pitch.
No, this is not recommendable because you will experience high frequency
loss when you downsample to raise the pitch (to finally make the signal
duration longer). It is better to do the time scaling first and then
resample to change the pitch.
> All of these methods suffer from "Munchkinization" due to the fact that
> formant peaks end up getting shifted along with the fundamental.
> Prosoniq supposedly uses neural networks to solve this problem.
We use an ANN approach for time frequency decomposition, called MCFE.
The formant manipulation is a simple change in the size of the acoustic
model thus represented in the MCFE domain.
...
Stephan M. Sprenger
Director, R&D
PROSONIQ PRODUCTS SOFTWARE
(As far as I'm aware there are no problems with quoting from USENET... let me know if there are & I will remove this.)
Even better!:
His (=Prosoniq's) new website:
http://www.dspdimension.com/data/html/dirac.html
contains a link to a time-pitch shifter which 'You can use [in] any commercial and non-commercial applications that you develop, without a licensing fee, subject to the DIRAC LE licensing agreement.' (the agreement looks v. reasonable).
_________________________________________________
@El Enmascarado:
If you haven't read this already, give it a go:
http://www.doom9.org/index.html?/video-basics.htm
zilog jones
15th June 2005, 11:14
This does not matter...
Yes it does, because you can't deal with interlaced video at all on VCDs - only 23.976, 25, and 29.97fps progressive.
Kika
15th June 2005, 11:35
That's right, but on 25 to 29.97 or 25 to 23.976 progressive conversions, you can use Pulldown, no matter if the target is VCD, SVCD or DVD.
Wilbert
15th June 2005, 12:21
Just curious, does DGPulldown support mpeg-1 streams?
zilog jones
15th June 2005, 12:50
From what I can see, it only supports MPEG-2...
I always assumed VCDs were not field-based in any sort of way, and 23.976 VCDs were just progressive frames in their own right and it's just the VCD player that applied the pulldown - hence my opinion of 25fps NTSC pulldown not being possible - but I don't know if that's right now...
Kika
16th June 2005, 09:13
I never used DBPullDown because TMPGEnc is able to set the Flags correctly while encoding.
VCD FILM works similar to DVD FILM (progressive 23.976)
2Bdecided
16th June 2005, 13:28
I never used DBPullDown because TMPGEnc is able to set the Flags correctly while encoding.
Not for "pulling down" 25p to 29.97i. It encodes duplicated frames as actual frames, and creates a stuttery mess. At least that's how it appears to me.
Cheers,
David.
Kika
16th June 2005, 14:17
Like i wrote, i never tried DGPulldown...
But give TMPGEnc a try:
Encode mode: 3:2 pulldown when playback
Framerate 23.976 (internaly 29.97 fps)
Setting -> Advance -> Do not frame rate conversion.
All Conversions i have done yet where from NTSC to PAL and PAL 25i to NTSC 29.97i
El Enmascarado
17th June 2005, 03:57
_________________________________________________
@El Enmascarado:
If you haven't read this already, give it a go:
http://www.doom9.org/index.html?/video-basics.htm
Thanks for the lesson, I learned a bit of history but I still need to know what to do with my AVI to correctly convert it from PAL VCD to NTSC. I want to final result in AVI not MPG as I can probably do that already, but I have the obstination to get it in AVI, basically manage it as I desire.
El Enmascarado
17th June 2005, 08:36
?
IF your PAL 25fps source is progressive (means no combs are shown) then you dont have to do the fieldblended conversation at all.
Simply....
Avisource("25fpspalsource.avi")
Assumefps(23.976, true)
SSRC(48000) # (44100) in case of VCD etc.
Here applying the pulldown
And a 29.97 fps NTSC telecined Stream is the result. And its much more easier to restore back to 23.976 if needed.
Why 23.976??? I want it NTSC! 29.976? any ideas?
Why 23.976??? I want it NTSC! 29.976? any ideas?if u use incredible's script (in #7) u get an interlaced 29.97 stream w/ the standard 'blend pattern'. isn't it what u want ? (just give it try ;) )
the bests
y
El Enmascarado, I think you really should do some search in here for guides and basic video explanations or u use google. Searching terms could be "telecine", "interlaced", "progressive","fieldbased" etc. there you will see WHY you need.
And BTW ... as you're talking about generating a VCD and as we still not clearly know if your source gots combing (interlacing) or not:
Technical Info for VCD
NTSC/NTSC Film
Video:
1150 kbit/sec MPEG-1
352 x 240 pixels
29,97 frames/second
23,976 frames/second NTSC Film
Audio:
44100 Hz
224 kbit/sec MPEG-1 Layer2
Extra:
Menus and chapters
Still pictures in 704x480,352x240
So as VCD seems to accept PROGRESSIVE 23.976 fps streams, this will be your friend:
Avisource("25fpspalsource.avi")
Assumefps(23.976, true)
SSRC(44100)
Otherwise IF you got combing .... add the pulldown selectevery(...)-line at the end to archive the 29.97fps also VCD copatible stream.
Mucho exito.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.