View Full Version : Frame Rate Convertion (from 30 fps to 24)
Cunhambebe
11th April 2007, 20:52
Hi everyone! It's been a long time, but I keep reading the tutorials and also my wonderful AviSynth. BTW, I was reading a tutorial at Creative Cow the other day.
Tutorial (http://forums.creativecow.net/cgi-bin/page_wrapper.cgi?forumid=2&page=http://www.creativecow.net/articles/kramer_andrew/fps/index.html)
One of the guys there named Andrew Kramer (who wrote a plug-in) uses After Effects 7.0 to make frame rate conversions: NTSC from 30 to 24; from 24 to 30; 29,97 to 23,976 (NTSC Film) and vice-versa, as well as NTSC to PAL too. Well, but that's After Effects and this is another story I can't pay for it.
Since a have a bunch of targa files that play correctly at 30 fps, I was just wondering if I could resample (smootly) from that rate to 24 fps with AviSynth. I know VirtualDub may do this kind of conversion but the outcome is not perfect (too slow). Can I do it with AviSynth? That'd be great if anyone could help me with this! Thanks so much in advance.
Mark.
wonkey_monkey
11th April 2007, 23:25
This is not the thread you're looking for... oh wait, it is!
http://forum.doom9.org/showthread.php?t=113256
David
Cunhambebe
12th April 2007, 02:07
Thanks for the encyclopedia... I'll read it all. In fact I was thinking about something easier :)
Thanks a lot. Any more ideas? (My files are Targa *.tga sequence files and not MPEG2s, neither AVIs).
Mug Funky
12th April 2007, 02:29
imagesource will load a tga sequence no problem.
are the files interlaced or progressive? if it's interlaced you'll get much better results by bobbing the video up to 60 fields per sec, then using motion compensation to push and pull the frames into 24fps. use a motion adaptive deinterlacer (tdeint is a good place to start), and one of the motion compensated framerate converter scripts floating around (see the "closest to alchemist" thread. should be on this page still).
it'll be slow, but depending on the script it'll be faster than after effects, and no matter which script you use it'll be better than after effects (it's motion compensation is piss-poor).
Cunhambebe
12th April 2007, 16:37
Thansk so much for taking time to help, Mug Funky.
As you may know, I am a newbie with AviSynth and some work as this one is a bit difficult for me. Thanks.
are the files interlaced or progressive?
-Those are progessive Targa files (TGA 32) rendered at 30 fps, so I guess tdeint will not be necessary here.
...and one of the motion compensated framerate converter scripts floating around (see the "closest to alchemist" thread. should be on this page still)
-Thank you, I'll search for that one (but please understand it's not an interlaced sequence) and I hope you can help me with the script. Now a good question (and maybe a pathetic one): Will the outcome be an uncompressed AVI or still a TGA sequence? Thanks in advance.
Cheers,
Mark
Leak
12th April 2007, 17:00
Will the outcome be an uncompressed AVI or still a TGA sequence? Thanks in advance.
That totally depends on your script and the program you use it with...
In case of TGA files, you might want to read up on "ImageWriter" in the AviSynth documentation and use something like AVS2AVI in null mode, Media Player Classic with the Null Renderer or VirtualDub's preview mode to do the conversion...
np: Jel - All Around (Soft Money)
Cunhambebe
18th April 2007, 01:46
Thanks for taking time to respond, Leak. But I am a newbie and that seems a bit difficult. Might I post at that thread??
http://forum.doom9.org/showthread.php?t=113256
I hope some people will not complain about double posting.
Thanks - Mark
Cunhambebe
22nd April 2007, 13:56
Leak,
Thanks again for the suggestion, but I can't load my tga sequence files in AviSynth with the followitn scripts:
Imagesource("D:\Nova pasta\FightersFinal_FFN0000.tga",0,0300)
ConvertToYv12()
ConvertFPS(24)
It doesn;'t work at all;
Neither this one - it says: first picture found cannot be decoded..
LoadPlugin("C:\avs_plugins\ImageSequence.dll")
CoronaSequence("C:\FightersFinal\FFN0000.tga",sort=1)
ConvertToyuy2()
ConvertFps(24)
I've read the documentation on ImageWriter, but it seems I do have some difficulty writting the scritp. I don't know too much about AVS2AVI, but I'll certainly use VirtualDubMod to rewrite the sequence.
Some other people have suggested to try using the SmoothFPS AVISynth function, changing the frame rate from 30 fps to 120 fps. This would create 3 intermediate frames between each frame of the original video. Then I would have to use a decimate function to reduce that to 24 fps. Any comments on this, please? Thanks in advance!
Guest
22nd April 2007, 16:01
Post links to some of your TGA files, so we can find out why you can't load them with Avisynth.
Cunhambebe
22nd April 2007, 19:00
Thanks for taking time to respond, neuron2. I'll do it.
Boulder
22nd April 2007, 19:15
Check scharfis_brain's page out : http://home.arcor.de/scharfis_brain/ It contains the old but still valid "Convert60ito24p" function.
There's also a MVTools-based script with a similar idea. MVTools' documentation also contains some sample scripts regarding framerate conversion.
foxyshadis
22nd April 2007, 20:26
There are a number of .tga extensions - not as many as tiff, which is a vast and deadly swamp of vendor-proprietary extensions, though - and one of them is probaby causing DevIL to bail. What created the targas? If it's something you have to use, you might have to consider a batch-converter (like xnview, or its command-line module nconvert) to change them to standard png/tiff.
Cunhambebe
22nd April 2007, 21:50
Thanks to both of you for the input, Boulder and foxyshadis!
Anyway, here's the link for some of those TGA files as requested by neuron2:
TGA files (http://rapidshare.com/files/27387416/fighters_doom9.zip.html)
Boulder: the sequence is not interlaced so that means, I guess, it isn't 60i.
foxyshadis: those tga files are TARGA 32 rendered in Lightwave 8.0
wonkey_monkey
22nd April 2007, 22:38
When calling imagesource(), you have to use a placeholder where the digits in your filename are. In your case, you need:
Imagesource("D:\Nova pasta\FightersFinal_FFN%04d.tga",0,0300)
It's the same way you'd print a leading-zeroes integer in C with printf, if you're familiar with it. There doesn't seem to be anything wrong with the files themselves - they loaded fine in VDub and AVS for me.
Hmm... while we're on the subject, is this a mistake in the AviSynth docs?
# Read files "00.bmp" through "50.bmp" bypassing
# AviSynth's internal BMP reader.
ImageSource("D:\%01d.bmp", end=50, use_DevIL=true)
Should be %02d, surely?
Some other people have suggested to try using the SmoothFPS AVISynth function, changing the frame rate from 30 fps to 120 fps. This would create 3 intermediate frames between each frame of the original video. Then I would have to use a decimate function to reduce that to 24 fps. Any comments on this, please? Thanks in advance!
You can use Smoothfps to go straight to 24fps - the result will be the same.
David
zambelli
23rd April 2007, 00:45
Check scharfis_brain's page out : http://home.arcor.de/scharfis_brain/ It contains the old but still valid "Convert60ito24p" function.
Is there any advantage to using his function versus just simple ConvertFPS(23.976)? Both methods require a 59.94 progressive source and employ blending. I guess the only question is how they blend.
ChiDragon
23rd April 2007, 02:39
Well as the page shows, with scharfi's you can choose what tradeoff between clean frames (jerkier motion) and blended frames (smoother motion) you want. ConvertFPS doesn't give that option.
Cunhambebe
23rd April 2007, 06:20
One of my friends at VideoHelp, jagabo, rendered an AVI with the function SmoothFPS. The result is very good. Here's what he said....
SmoothFPS worked better than I expected:
function smoothfps(clip source, float fps) {
fp=fps*100
backward_vec = source.MVAnalyse(isb = true, truemotion=true, pel=2, idx=1)
# we use explicit idx for more fast processing
forward_vec = source.MVAnalyse(isb = false, truemotion=true, pel=2, idx=1)
cropped = source.crop(4,4,-4,-4) # by half of block size 8
backward_vec2 = cropped.MVAnalyse(isb = true, truemotion=true, pel=2, idx=2)
forward_vec2 = cropped.MVAnalyse(isb = false, truemotion=true, pel=2, idx=2)
return source.MVFlowFps2(backward_vec,forward_vec,backward_vec2,forward_vec2,num=int(fp),den=100, idx=1,idx2=2)
}
AVISource("original.avi")
smoothfps(119.88)
changefps(23.976)
http://rapidshare.com/files/27420337/SuperSlowMotion.avi.html
Now, since davidhorman taught how to load the files (thank you very much for the explantion, david!) - I'll try to do it.
Instead of AVISource I'll write "Imagesource("D:\Nova pasta\FightersFinal_FFN%04d.tga",0,0300)"
Let's see if it works - thanks a bunch.
Mark
wonkey_monkey
23rd April 2007, 09:32
You need to add:
...,fps=30)
as a parameter to imagesource, otherwise it defaults to 24fps.
If you can suffer a .1% difference in playback speed, you will get slightly nicer results by doing:
smoothfps(24)
assumefps(23.976)
That way, every fourth frame will be an unaltered frame from your source. With your code, practically all frames will be a blend of two frames.
None of this will beat re-rendering the sequence at 24p, but I assume you're asking all this because that's not an option :)
David
Cunhambebe
23rd April 2007, 14:46
Thank you very much, David. I'm working now. Please let me get back home to test all of this. Thanks again for your attention.
Cheers,
Mark
Edit:
Here's how it worked
#AVS script
function smoothfps(clip source, float fps) {
fp=fps*100
backward_vec = source.MVAnalyse(isb = true, truemotion=true, pel=2, idx=1)
# we use explicit idx for more fast processing
forward_vec = source.MVAnalyse(isb = false, truemotion=true, pel=2, idx=1)
cropped = source.crop(4,4,-4,-4) # by half of block size 8
backward_vec2 = cropped.MVAnalyse(isb = true, truemotion=true, pel=2, idx=2)
forward_vec2 = cropped.MVAnalyse(isb = false, truemotion=true, pel=2, idx=2)
return source.MVFlowFps2(backward_vec,forward_vec,backward_vec2,forward_vec2,num=int(fp),den=100, idx=1,idx2=2)
}
ImageSource("D:\Nova pasta\FightersFinal\FFN%04d.tga", 0000, 0300, 30) # Nova pasta means new folder in Brazilian Portuguese
AssumeFPS(30) #shouldn't need this but didn't work right without it
ConvertToYV12()
smoothfps(24)
LanczosResize(640,480)
Files: all from 30 fps to 24.
1) From Targa to XviD thru AviSynth and VDMod:
jagabo's file (http://rapidshare.com/files/27387416/fighters_doom9.zip.html)
2)From Targa to Targa> MPEG2> DGindex> Script>AviSynth> VDMod> XviD
MPEG2XviD (http://rapidshare.com/files/27605109/jagabo_final.zip.html)
Cunhambebe
27th April 2007, 06:25
One more (two, in fact) important information:
The script for AviSynth works 100% well when the source is video at 29,97 to 23.976 (Xvid, AVI uncompressed, DV or whatever) - maybe 30 to 24. AviSynth pops-up warning screens - errors, when the video is 29.97 and you insert the figure 30. Same thing happens with sequence files. It won't work at 30 if the sequence was rendered at 29.97, even if you insert this value; 29.97 to 23.976. Let's see some other interesting points on this subject:
This is the line for an AVI video file (input):
AviSource ("C:\folder\mymovie.avi") - that includes XviD;
If you have an MPEG2 (input), you'll have to change this part of the script and add this:
LoadPlugin("C:\fodler\dgmpgdec148\DGDecode.dll") # using DGIndex requires readig more about this application here or at VideoHlep serching for "TOOLS";
LoadPlugin("C:\Folder\ColorMatrix\colormatrix.dll")
MPEG2Source("C:\mymovie.d2v")
ColorMatrix(d2v="mymovie.d2v") # this paramet gives hints on colorimetry from the own source (there are others - you can red the guide that comes with the plug-in - it's all freeware).
Note for newbies: these # signals only give you information and are totally ignored by AviSynth.
For sequences of files (that was my case) Targa Files (.tga), PNG or whaterver you have; they must be 30 and not 29.97, as already explained above. I had some series here redered at 29.97 in Lightwave. Writting the scritp for those files, even changing respectively the FPS from 30 to 29,97 and 24 to 23,976, didn't work at all because this has generated an error that popped-up a screen while converting in VirtualDubMod thru AviSynth, with the following warning:
Avisynth read error:
Avisynth: caught an access violation at 0x0186e97c,
attempting to read from 0x059198a4
How to correct this:
Drop the sequence of files in Lightwave or whatever 3D application (Image Editor, in the case of LW). On "General Options Guide" (using Lightwave) change FPS to 30, this way you'll get a whole number and not something and a half of whatever. Use the same sequence as a background (Compositing Window) telling the application that is a sequence of files (beginning at 0 "zero" and finishing at 300 - for instance).
"Rerender" the files as NTSC 4:3 etc. or 16:9 - we are discussing NTSC here), and configure the 3D camera correctly. You won't configure anything on the "Render Guide", but the number of files that'll be rendered: no motion blur, no raytrace, nothing). Just tell the application the correct sequence (from 0 to 300 and not 0000 and 0300). After rendering, then you'll have a correct sequence to drop it in Avisynth, or better yet, for writting the script as that one sugggested by jagabo). Note: Ligtwave wil create a correct sequence of digits. That's all.
If you still have a weird sequence of files (now, pay attention please; starting at 0 - one digit, and finishing at 0800 - 4 digits) you can use Manono's guide located on this topic (page one) that shows clearly how to fix this, corecting this time the number of digits, outputting the sequence files from VirtualDubMod in mode Fast Recompress - that in fact will always be used to ouput the converted sequence files at the desired framerate.
The part of the script that refers to the number of digits is on this line:
ImageSource("D:\your folder\subfolder\rb%03d.tga", 000, 150, 30) # %03.d refers to three digits.
Well, besides jagabo, I would also like to thank Manono (as well as the other ones) for this - THANKS Manono. Hope you're making the most of it in Hawaii.
Cheers,
Mark
Here's the topic at VideoHelp:
Frame Rate Convertion (http://forum.videohelp.com/viewtopic.php?t=327121)
Cunhambebe
28th April 2007, 19:57
Hi there, unfortunately, I still have some *.TGA sequences that refuse to output correctly in VirtualDubMod through AviSynth. That's the same warning screen:
Avisynth read error:
Avisynth: caught an access violation at 0x0186e97c,
attempting to read from 0x059198a4 # figures for positions chance of course
Not even "rerendering" the sequence (that may be 29,97) in Lightwave at 30 FPS will fix some of those sequences. When you serve through AviSynth to VDMOd, you wind up with with the same number of files that were in the original sequence, that means; no 24 FPS convertion. I don't really know what may be causing this.
Any ideas, please? Thanks a lot:confused:
Wilbert
28th April 2007, 19:57
Hmm... while we're on the subject, is this a mistake in the AviSynth docs?
Code:
# Read files "00.bmp" through "50.bmp" bypassing
# AviSynth's internal BMP reader.
ImageSource("D:\%01d.bmp", end=50, use_DevIL=true)
Should be %02d, surely?
Yes, thanks. I appreciate if you send us a pm or file report at sourceforge the next time, since i could easily miss such posts.
Btw, we all do this stuff in our free time, so there might be more typos in the docs. I appreciate if you can report such stuff in a normal way the next time.
Wilbert
28th April 2007, 19:59
Hi there, unfortunately, I still have some *.TGA sequences that refuse to output correctly in VirtualDubMod through AviSynth. That's the same warning screen:
Avisynth read error:
Avisynth: caught an access violation at 0x0186e97c,
attempting to read from 0x059198a4 # figures for positions chance of course
Have all of them the same dimension?
Cunhambebe
28th April 2007, 22:13
Hi Wilbert,
Thank you very much for taking time to respond. Since you know I am a newbie, it's a little difficult to deal with some AviSynth functions. Converting from 30 to 24 is one of them, but both the application and MVTools do an excellent job.
Hmm... while we're on the subject, is this a mistake in the AviSynth docs?
Code:
# Read files "00.bmp" through "50.bmp" bypassing
# AviSynth's internal BMP reader.
ImageSource("D:\%01d.bmp", end=50, use_DevIL=true)
Should be %02d, surely?
-I guess this part of the scritp %01d.bmp or **.tga (that is may case); %02d.; %03d, 4, 5, etc; refers to the number of digits in the sequence, right?! Hope so.
-This is how I was writting this part of the scritp:
ImageSource("D:\Nova pasta\TBOLT1\TBFinal%03d.tga", 001, 150, 30) # I guess it doesn't matter if the name New folder is in Brazilian Portuguese (Nova pasta). Some sequences of TGA files do convert well, some others do covnert until AviSynth gets stuck and pops-up a warning screen showing the error mentioned before. Maybe if I try your way, let's see it: ImageSource("D:\%01d (# 2, 3, 4 etc).bmp", end=50 (# for instance?), use_DevIL=true)
Yes, thanks. I appreciate if you send us a pm or file report at sourceforge the next time, since i could easily miss such posts.
Btw, we all do this stuff in our free time, so there might be more typos in the docs. I appreciate if you can report such stuff in a normal way the next time.
-Sorry, I didn't know "the normal way" as you have put it. No problem at all, you're welcome. Next time I'll pm you. Anyway, I hope the convertion works for the other "stubborn" sequences :)
Have all of them the same dimension?
-No, they haven't. Those figures are related to the number of frames in the sequence (I suppose)... that means: figures are different.
Thanks,
Mark - let's see if I can convert some more sequences.
Edit:
ImageSource("D:\Nova pasta\TBOLT1\TBFinal%03d.tga", end=150, use_DevIL=true, 30)
Same thing - Warning:
AviSynth read error:
AviSynth caught an access violation at 0x0188e97c, attempting to read from 0x0593946e
Wilbert
28th April 2007, 22:40
-I guess this part of the scritp %01d.bmp or **.tga (that is may case); %02d.; %03d, 4, 5, etc; refers to the number of digits in the sequence, right?! Hope so.
Yes.
-Sorry, I didn't know "the normal way" as you have put it. No problem at all, you're welcome.
That comment was directed to davidhorman.
-No, they haven't.
They should (ImageSource assumes they are), otherwise you will have to load them one by one (and resize/crop them before you can add them). I will add something about this to the docs.
ChiDragon
28th April 2007, 23:11
-I guess this part of the scritp %01d.bmp or **.tga (that is may case); %02d.; %03d, 4, 5, etc; refers to the number of digits in the sequence, right?! Hope so.
Just to be clear, the "0" is to pad with zeroes instead of spaces, the 1/2/3/etc digit is the number of digits to pad to, and the "d" actually stands for decimal integer, not digits. You can read up on the "format" for C/C++ printf/fprintf/scanf/etc. for the full spec (Wikipedia has articles on them, or just Google the function(s) for reference sites).
Cunhambebe
29th April 2007, 08:07
Wilbert
That comment was directed to davidhorman.
-Oh, I see! Sorry.
Thanks to all of you for taking time to help. The only one way I could do the job with those stubborn sequences was rendereing them first as AVI uncompressed, then writting the script and loading it in VDMod. This way everything works OK for all files (even though there's a loss of quality, of course - color space convertion).
Some other interesting points here: fast motion on the screen - as warned before by some friends at VideoHelp - makes SmoothFPS produce some artifacts on the video. Here are the pics showing what it is... Thanks to all.
movmasty
30th April 2007, 14:25
Hi everyone! It's been a long time, but I keep reading the tutorials and also my wonderful AviSynth. BTW, I was reading a tutorial at Creative Cow the other day.
Tutorial (http://forums.creativecow.net/cgi-bin/page_wrapper.cgi?forumid=2&page=http://www.creativecow.net/articles/kramer_andrew/fps/index.html)
One of the guys there named Andrew Kramer (who wrote a plug-in) uses After Effects 7.0 to make frame rate conversions: NTSC from 30 to 24; from 24 to 30; 29,97 to 23,976 (NTSC Film) and vice-versa, as well as NTSC to PAL too. Well, but that's After Effects and this is another story I can't pay for it.
Since a have a bunch of targa files that play correctly at 30 fps, I was just wondering if I could resample (smootly) from that rate to 24 fps with AviSynth. I know VirtualDub may do this kind of conversion but the outcome is not perfect (too slow). Can I do it with AviSynth? That'd be great if anyone could help me with this! Thanks so much in advance.
Mark.
There is only one way to convert progressive content from 30 to 24fps, that is eliminate 1 pic out of 5,
That is the way which after effects and vdub operate too, but in Vdub you have to check 'convert to' not 'change to'
try with dos before of Vdub, pics shuld be numbred starting from 1 and nothing after the number.
open a dos window in your pic folder
type
move *0.tga yourdrive\yourpath
after finished type again
move *5.tga yourdrive\yourpath
and you are done, now load pics in Vdub and play at 24fps, if you dont like move pictures back again.
movmasty
30th April 2007, 14:36
Some other people have suggested to try using the SmoothFPS AVISynth function, changing the frame rate from 30 fps to 120 fps. This would create 3 intermediate frames between each frame of the original video. Then I would have to use a decimate function to reduce that to 24 fps. Any comments on this, please? Thanks in advance!
this is only to join together clips with fps both of 24 and 30 without to downsample 30 to 24,
its a weird way thought, downsampling 30 to 24 is quite fine just removing a pic every 5.
But in your case i would suggest to downsample to 15fps, 100% smooth and less size for the movie
dos script would be
move *0.tga yourdrive\yourpath
move *2.tga yourdrive\yourpath
move *4.tga yourdrive\yourpath
move *6.tga yourdrive\yourpath
move *8.tga yourdrive\yourpath
Cunhambebe
30th April 2007, 15:14
movmasty,
Thanks so much for your interest and for taking time to respond.
this is only to join together clips with fps both of 24 and 30 without to downsample 30 to 24, its a weird way thought, downsampling 30 to 24 is quite fine just removing a pic every 5.
-I agree with you, in spite of the fact that the final result is amazing if compared to what Vegas can do - Interpolation (the output is nothing, but a horrible image).
There is only one way to convert progressive content from 30 to 24fps, that is eliminate 1 pic out of 5. That is the way which after effects and vdub operate too, but in Vdub you have to check 'convert to' not 'change to'...
-I have tried all ways with VirtualDub/VirtualDubMod before, but the result was a jerky and unacceptable outcome.
of Vdub, pics shuld be numbred starting from 1 and nothing after the number.
open a dos window in your pic folder
type
move *0.tga yourdrive\yourpath
after finished type again
move *5.tga yourdrive\yourpath
and you are done, now load pics in Vdub and play at 24fps, if you dont like move pictures back again.
-Please don't LOL, but I don't know how to deal with DOS...lol Anyway, it must be much more simple than all the way I'm trying to do this. Thanks so much for the explanation. This Windows thing has almost closed all DOS courses around here :)
Cheers,
Mark
wonkey_monkey
30th April 2007, 16:22
dos script would be
move *0.tga yourdrive\yourpath
...
move *8.tga yourdrive\yourpath
That won't work. Virtualdub expects consecutive frame numbers. It's a lot easier to open the image sequence, go to the Frame Rate dialogue and decimate by 2, then resave the image sequence. But I don't think that's an option for Cunhambebe. Cutting 1 of 5 frames to go from 30 to 24 (which is only one way of many) also looks terrible.
Cunhambebe, have you tried salfps3 (http://forum.doom9.org/showpost.php?p=987212&postcount=112) from the Alchemist thread? It does a better job of avoiding artefacts than smoothfps. Alternatively, you could use smoothfps and replace the bad frames with the output from a simple convertfps script - however, this is only useful if you have a low percentage of bad frames :)
David
PS Nice graphics - a Babylon 5/Farscape xover? ;)
movmasty
30th April 2007, 17:06
That won't work. Virtualdub expects consecutive frame numbers. It's a lot easier to open the image sequence, go to the Frame Rate dialogue and decimate by 2, then resave the image sequence. But I don't think that's an option for Cunhambebe. Cutting 1 of 5 frames to go from 30 to 24 (which is only one way of many) also looks terrible.ya, forgot to rename pics and make an undo file....
Cunhambebe, have you tried salfps3 (http://forum.doom9.org/showpost.php?p=987212&postcount=112) from the Alchemist thread? It does a better job of avoiding artefacts than smoothfps. Alternatively, you could use smoothfps and replace the bad frames with the output from a simple convertfps script - however, this is only useful if you have a low percentage of bad frames :)
DavidBut really you think to make morphing for this job???
Then would be better to make an interlaced mpeg and decimate and merge fields if you think that erasing frames comes out ugly.
Cunhambebe
1st May 2007, 03:33
Thanks to both of you. David, tanks for the input on salfps3. Anyway, the number of frames showing artifacts are not considerably high. In fact some of these artifacts appear in a couple of frames or more, but nothing too bad to ruin everything.
David:
Alternatively, you could use smoothfps and replace the bad frames with the output from a simple convertfps script - however, this is only useful if you have a low percentage of bad frames
-And please tell me, how would you forecast to change exactly the right frames? The original sequence has 150 frames and the one converted with SmoothFPS has 119. :confused: Anyway, thank you very much for the hint on salfps3 ;)
wonkey_monkey
1st May 2007, 09:34
-And please tell me, how would you forecast to change exactly the right frames?
Oh, I just meant stepping through and making a note of the bad frames, then replacing them with blended frames. Off the top of my head, you could do something like this:
# note this function may fail when f=0 or f=1
function replace(clip one, clip two, int f) {
a=one.trim(0,f-1)
b=two.trim(f,f)
c=one.trim(f+1,0)
return a+b+c
}
source=imagesource(...fps=30)
smooth=source.smoothfps(24)
blend=source.convertfps(24)
smooth
replace(last,blend,4)
replace(last,blend,12)
replace(last,blend,81)
replace(last,blend,98)
smooth
David
Cunhambebe
3rd May 2007, 18:09
Thank you very much for your help, David. IŽll test that and post back the results as soon as I finish some other jobs here.
Thanks again!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.