Quantcast Avisynth: How to Convert 60fps Video to 25fps? - digitalFAQ.com Forums [Archives]
Go Back    digitalFAQ.com Forums [Archives] > Video Production Forums > Avisynth Scripting

Reply
 
LinkBack Thread Tools
  #1  
06-15-2004, 10:10 AM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
06-15-2004, 10:55 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
No that's the only (and so better) way.
Reply With Quote
  #3  
06-15-2004, 11:13 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
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
Reply With Quote
  #4  
06-15-2004, 01:02 PM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
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...

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.
Reply With Quote
  #5  
06-15-2004, 01:13 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
It's so easy to doa 25 from a 24 fps video that you should focus on obtaining a correct 24 fps first.
Reply With Quote
  #6  
06-15-2004, 01:23 PM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
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 )
Reply With Quote
  #7  
06-15-2004, 04:02 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
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).
Reply With Quote
  #8  
06-15-2004, 04:24 PM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
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?.
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 .
Reply With Quote
  #9  
06-15-2004, 05:00 PM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
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
(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.
Reply With Quote
  #10  
06-15-2004, 05:08 PM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
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 .
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?.
Reply With Quote
  #11  
06-15-2004, 05:49 PM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
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 )
Reply With Quote
  #12  
06-16-2004, 11:01 AM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
Inc,
you were right! (you already knew that )
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
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.
Reply With Quote
  #13  
06-16-2004, 11:08 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #14  
06-16-2004, 11:51 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
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, 28 # 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)
Reply With Quote
  #15  
06-16-2004, 12:27 PM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
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 .
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.
Reply With Quote
  #16  
06-16-2004, 12:36 PM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
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
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth: How do I convert 25FPS TO 29.970 FPS to burn on dvd? WOWIEGURL Avisynth Scripting 16 06-25-2005 11:00 AM
Avisynth: Converts 60fps Video into 24fps? kwag Avisynth Scripting 10 09-10-2004 01:13 AM
Mencoder: Can be the 60fps to 25fps conversion done within mencoder? digitall.doc Video Encoding and Conversion 4 06-15-2004 02:21 PM
Converts 60fps Video into 24fps sgz13 Conversão e Codificação de Vídeo (Português) 0 03-12-2004 05:09 PM
Convert 60fps to 23.976 for VCD or DVD? pacodoni Video Encoding and Conversion 1 10-15-2002 07:20 PM




 
All times are GMT -5. The time now is 09:55 PM  —  vBulletin © Jelsoft Enterprises Ltd