digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: How to Convert 60fps video to 25fps? (http://www.digitalfaq.com/archives/avisynth/10309-avisynth-how-convert.html)

digitall.doc 06-15-2004 10:10 AM

Avisynth: How to Convert 60fps video to 25fps?
 
Sorry if the answer is too obvious.
I have a small clip a friend of mine did with his digital photo camera.
It's in .mov format, 60 fps.
I managed to convert it to .avi format, still 60fps.
I thought I could apply the 60fps to 24fps, and then convertFPS(25.000).
Do you suggest a better way?.
Thanx, TIA

Dialhot 06-15-2004 10:55 AM

No that's the only (and so better) way.

incredible 06-15-2004 11:13 AM

Are these 60fps full height?? :?

In regular 60fps is outputted out of a FULL fieldrate deinterlacer!

IF its a Video (which I shure assume) than the best would be in mov to avi conversation to use the avisynth way OR even better

Load that .mov into TmpgEnc where you did copied the needed QTreader plugin into TmpgEncs directory, ... do assign the right priority in the "environmental settings" .... do import that mov into tmpgencs source filed.
Watch the framerate and do set it manually "back" to 29.97.Now you use TmpgEnc NOT to encode that video BUT to export it as Huffyuv ... the output will be an 29.97 avi.

So 60 fps as source avi makes no sense ... if you already got it, do put a "selecteven()" line behind the "avisource()" line.
That would at least result in 30fps ... but still not mpeg conform in the mpeg way we want to encode! ;-)

Now to mencoder .... and that answer youll find in your "mencoder forum" posted thread ;-)

digitall.doc 06-15-2004 01:02 PM

Thanx a lot pals for your help and your fast answers.
The TMPGenc way is the one I used to convert the 60fps mov to 60fps avi.
I didn't dare to change the framerate 'cos I didn't know if it would screw the video.
Now I redid the process and have got a 29.97fps avi file :) .
... and now I proceed to mencoder thread... :D

BTW, I guess the answer, but I ask: if I select in TMPGenc 25fps instead of 29.97fps... yes, bad conversion way. But as I'm in PAL land, and I'm not used to framerate conversions, I wondered...

Thank you again.

Dialhot 06-15-2004 01:13 PM

It's so easy to doa 25 from a 24 fps video that you should focus on obtaining a correct 24 fps first.

digitall.doc 06-15-2004 01:23 PM

How then, Phil?.
As I suggested in first post, with avysinth, 60fps to 24fps, and then convertFPS?.
As you can see, I'm lost in this issue (well, and so many others :oops: )
:)

Dialhot 06-15-2004 04:02 PM

As I told in my first post also : "yes,n it's the best way to do that :-))".
Even if you can use a simple "assumeFPS" but you will have to modify the speed of the audio part also (no need in case on convertFPS).

digitall.doc 06-15-2004 04:24 PM

Phil, I forgot to mention that, as it was shot with a photo camera, it has no audio, just video. So no audio out of synch problems.

When I take a look at the video, it looks like there's only a change in the picture every about 6 frames (?). It's really a extrange thing. Its resolution is 320x240. So I even thought I could interlace frames (is that possible?) as it they where fields, and obtain a 320x480 30fps film (am I telling non-senses?, I'm afraid yes).

Well, I tried the convert 60fps to 24fps way (used parameters (2,0), taken from a post by kwag, but don't really know how it works), and it worked. But when I then added convertFPS(25.000) in the end, I get an avisynth error: "ConvertFPS: new frame rate too small. Must be greater than 167772160. Increase or use 'zone='" :(
I'm afraid I'd better make some reading before asking so much, but I've got so many to do (well, we all I suppose), and I'll just need this knowledge once, that I feel laaaazy.

May interleave/weave the frames as if they were fields, and obtain a 320x480 video, 30fps?.
What parameters are advised for convert60ito24p (yes, I know, bufff)?.
Why is convertFPS complaining?.
Which team will win the European Football Cup?. :wink:
Thanks.

EDIT: I know now what I was doing wrong: I was deinterlacing first with smoothdeinterlace (doublerate=true) when my video is progressive. After removing the deinterlacer, it worked well, and now is 25fps, and seems to play well. The problem is that I see some blendings...
I also tried weave, but it has no effect sinve my 60fps avi is frame and not field based :( .

incredible 06-15-2004 05:00 PM

As I do see now you just got a small clip out of that camera which by 95% is progressive! Now we dont know which framerate was exactly choosen by the camera when recording.

So the best would be installing the Quicktime Reader and watch under STR-i whats aboz the REAL fps of the source.

I assume that mini clip got something like 15fps or so.

And now its clear WHY TmpgEnc first choosed 60fps (cause of unrecognisable header but 240 height).

Dont use CovertFPS if not REALLY needed, as that command messes up your frames totally (not the framerate).
ConvertFPS is really though as it duplicates frames where afterwards the fields will be dynamically shifted. That would enbd up in an interlaced stream and maybe also including blendings 8O
(JUST IMHO)

BUT if your source will be originally 15fps Progressive then its really needed but including the disadvantages as explained above.

IF that stream REALLY gots 23,976 then do the pitch up of the video and if you want to keep the "tone" of the audio add the "Timestretch()" comamnd of avisynth which prevents the tone of the audio while shorten its length.

digitall.doc 06-15-2004 05:08 PM

Inc,
I was editing while you were posting.
Quote:

Originally Posted by incredible
So the best would be installing the Quicktime Reader and watch under STR-i whats aboz the REAL fps of the source.

Is QuickTime reader the plugin for TMPGenc I used?. And what's that STR -i you talk about?. Again I understood less than half you posted :lol: .
Related to framerate, maybe you're right since I see that every 4-6 frames are almost identical.
And yes, I do see the blendings you post. But I also see that maybe I'll have to live with them :( .
No problem with audio, since there's no audio.
What else can I do?.

incredible 06-15-2004 05:49 PM

Sorry by using the word "quicktime reader" I meant the regular Quicktime version for downloading, that one you can get at quicktime.com
Its the only one which is able to parse mov file correctly.

Open there in Quicktime the mov and hit the key combination "Control + i"
(The german keyboard gots "STRG" thats why I mentioned that ;-) )

digitall.doc 06-16-2004 11:01 AM

Inc,
you were right! (you already knew that :wink: )
here's the info:
Code:

Format: photo-JPEG 640x480
FPS film: 15
FPS when playing: 15
Speed data: 582.9 KB/sec
Normal size: 640x480
Actual size: 320x240 (half)

I hope this info wil help you to help me :lol:
But, no, it isn't 60 fps, but 15 fps.
What am I to do?. Doubleweave and double frame rate, and then convertFPS(25.000)?. Convert again to .avi but at 15fps, and then doubleweave...?
Brrr,... if it wasn't that it's my son video,...
Well, with you're help I'll get it.

Boulder 06-16-2004 11:08 AM

It's going to be very hard to get a 25fps video out of that one without jerky motion or ultra-fast video. Motion Perfect is one tool you could try, it can extrapolate missing frames but don't expect a perfect result.

Did you try ChangeFPS(25.000) already? Maybe the jerkiness won't be that noticable as the framerate is already extra weird.

incredible 06-16-2004 11:51 AM

Well you can try doin something like a "mini" telecining...

Safe the little mov in quicktime as avi (that should work, but no compression IMHO is selectable!? - test it)
OR the TmpegEnc HuffYUV way using THOSE correct Values out of the Quicktime information window, means orig 640x480 AND 15fps


InputVideo = Avisource("CameraVideo.avi")
SmoothDeinterlace(tff=true, doublerate=true)
BilinearResize(352, 288) # Upsizing at that source Qual. makes NO sense
ChangeFPS(50.00)
SeparateFields()
SelectEvery(4, 1, 2)

Maybe you have to change the Selectevery(4, 1, 2) to Selectevery(4,0,3), so try it.

You can also use DgBOB() or BobMatcher() instead of Smoothdeinterlace() as they do output an even better quality. A full fieldrate "smart" deinterlacer is used here EVEN the source is not interlaced (thats a nice beside-effect we do gain from at our workout here)

digitall.doc 06-16-2004 12:27 PM

Thanx, Boulder and Inc.
@Boulder,
looking for info about changeFPS in the web (since avisynth.org is down now)I came across a script that is quite similar to what Inc proposed...

@Inc,
your script is working now, and playback is as good as I'm afraid it can be. Is working really well, good hint pal :wink: .
But it outputs a 352x144 video ( :) ), as it is missing a weave. I'm using this script:
Code:

Avisource("D\...\video1.avi")
SmoothDeinterlace(tff=true, doublerate=true)
BilinearResize(352, 288)
ChangeFPS(50.00)
SeparateFields()
SelectEvery(4, 0, 3)
Weave()

... and preview in TMPGenc is good, no blends, some interlacing artifacts, that I'm sure won't be noticeable when playing.

You've been very helpful, with this difficult task.
I'll feed mencoder with this.

incredible 06-16-2004 12:36 PM

YEP! Weave was needed! Right :)

Thats the advantage of ChangeFPS in combination with a Full-Fieldrate state of the source. The rest results in a dnymical phase shift on the video.
AND THATS why it "looks" smooth on your TV later. (well I do hope ;-) )
Thats also the reason why telecined streams out of 23.976 to 29.97 do "look" smooth even if fames are doubled. If you would just use a simple ChangeFPS(25), that would result in a "jerky" video as Frames have been processed. ConvertFPS(25) also works fieldbased BUT adds blendings! And that would be VERY difficult to restore in the future to its real 15fps progressive again. Where on that Stream where u used the script as above a telecide and decimate using specific settings can handle that much easier


All times are GMT -5. The time now is 11:49 PM  —  vBulletin Jelsoft Enterprises Ltd

Site design, images and content © 2002-2022 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2022 Jelsoft Enterprises Ltd.