Thank you very much Manono, but it's not working. I've tried this morning. I'm working now.Let me gat back home to see what's really happening with my brains.
Edit: now I understand what you've said - thanks so much for the guide on outputting and correcting the sequence files with VirtualDubMod.
The thread at doom9 is here:
Doom9
Thanks,
Mark
+ Reply to Thread
Results 31 to 60 of 62
-
-
The only way you'll ever get "perfect" results is to rerender the animation.
Here's the ImageSequence() command that will open the TGA files from your samples:
ImageSource("FFN%04d.tga", 28, 40, 29.97)
Full AVS script:
Code:#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("FFN%04d.tga", 28, 40, 29.97) AssumeFPS(29.97) #shouldn't need this but didn't work right without it ConvertToYV12() smoothfps(23.976)
ImageSource("X:\PATH\TO\FILES\FFN%04d.tga",...
Actual output using this script:
23.976.avi -
I don't know how to thank you for this, jagabo. The result is perfect, amazing really.
The only way you'll ever get "perfect" results is to rerender the animation.
Is that what you did? Did you render the sequence first as an AVI Uncompressed at 29,97 progressive and then used the scritp to output to AVI uncompressed again in VDMod??? Well it can't be, since the script shows something different!
I fully understood what you said about files in different folders, a case that the full path must be supplied. But what about the MVTools? Its folder is in another one named avisynth-filtes on disc C. Should MVTools' folder to the AviSynth Folder?
Thanks again for rendering the video file. BTW, have you seen what's been discussed at Doom9? Thanks so much, let me try your script here - I 'll post back as soon as possible. Thank you!
Edit: I still cannot load the files... -
Originally Posted by Cunhambebe
Originally Posted by Cunhambebe
Originally Posted by Cunhambebe
Originally Posted by Cunhambebe -
Sorry jagabo, I was still editing my post when you responded - that's all OK.
I meant you would only get perfect results if you rerendered the sequence at the desired frame rate in Lightwave.
Now, if you're talking about rerendering again the whole thing (3D objects etc.... sorry, that's impossible for me (some objects parts of some scenes have been deleted).
I took a look early this morning -- that's how I got your TGA files.
I'm still wondering why I can't load the sequence files! -
Originally Posted by Cunhambebe
Originally Posted by Cunhambebe
Originally Posted by Cunhambebe -
Thanks again for taking time to respond, jagaboooo: now it's working! It works, It works! I (copy+paste) the MVTools dll in AviSynth's Plug-in Folder - that's all.
Anyway, first of all, my VDubMod gives me an error if I use your script the way it's been written; it encodes only 41% of the whole sequence of 300 frames. Changing those frame rates respectively from 29.97 to 30 and 23.976 to 24 has fixed this. You may know much better than me why this was happening.
Second of all:
The latest sequence was very short but if you look carefully you'll see weird motions in the stars near the edges of the space ships. There will also be weird distortions when objects move in and out of the frame.
if you're talking about rerendering again the whole thing (3D objects etc.... sorry, that's impossible for me (some objects parts of some scenes have been deleted).
-That's what I meant.
Dit you put the AVS script in the same folder as the TGA files? Do you have an old version of AVISynth?
Final question: what about if the output is Targa again in VDMod? I intend to load all the files in Vegas and then go > MPEG2 > DGIndex> AviSynth> VDMod> Xvid.
Jagabo, let me please upload the final file at Rapid Share, then you can tell me what you really think of this. Please notice that I have resized the output. Here's what I've modified in your script:
#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,backwar d_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 menas new folder in Brazilian Portuguese
AssumeFPS(30) #shouldn't need this but didn't work right without it
ConvertToYV12()
smoothfps(24)
LanczosResize(640,480)
I'm uploading in RapidShare and get back in a few moments LOL
THANKS A BUNCH! -
Here's the file:
jagabo's final file
-Did the camera get stuck when it turns to follow the fighters???? It is my eyes?
Edit: I guess everything works OK. Just one thing, re-rendering as targa I won't need converto to YV12, bu to RGB32() - according to the original sequence, or RGB24, depending on the input of the MPEG2 encoder. Will it work? Of course not. It must be YV12 or YUY2. If the original file is Targa 32, there will be a little convertion here = loss of quality. -
You can save from VirtualDubMod as a TGA sequence using File -> Save Image Sequence.
Unfortunately SmootFPS() doesn't work in RGB so you have to convert to YUY2 or YV12. You will lose the alpha channel, some color resolution, and some color accuarcy. -
But once again jagabo, as you have put it befeore, the result is more than you expected, isn't it? What a great job AviSynth can do. I guess Vegas would be so ashamed "looking" at the final results done in AviSynth
Of course there are many ways to edit the whole project, includding the one with AviSynth. Editing with AviSynth instead of reconverting the sequence to TARGA (and then using Vegas for editing) would give much better results because here we would be converting directly to YV12 - XviD, instead of going to MPEG2 (color convertion - loss of quality) and then doing the process DGIndex> Script> AviSynth (Colormatrix Included)> VirtualDubMod> and finally XviD. There's only one drawback (if we can put it this way) editing in AviSynth: the script would be much bigger and much more dificult to write. If I had some more freetime, I'd do it - and anyway, one day I will.
I'd like to thank jagabo once again - and the other ones - for their suggestions and valuable help. Thanks and I hope this can help some other people going from NTSC 30 FPS to 24 film.
As I have some freetime, I promise editing a video in AviSynth for jagabo, showing some birds from the Amazon as well as the region. Thanks for everything.
Cheers,
Mark
PS: here's the MPEG2 converted to XviD thru DGindex, AviSynth and VDubMod:
MPEG To XviD -
One more (two, in fact) important information:
Jagabo's 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
Edit: spelling and other errors -
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 -
I suspect you have a corrupt TGA file in the mix. Try opening the TGA sequence directly with VirtualDubMod. Maybe it won't crash.
-
Not at all, my friend. That's impossible; I mean, the problem is not with my files. The problem must be in AviSynth or MVTools. AviSynth crashes with some sequence of TGA (TARGA) files, but not all of them (and some crashes include even the sequences rerendered at a whole number of FPS; example: 30 fps - for .tga or any other sequence of files).
I guess, as a newbie with AviSynth (ohhhhh), there's only one way to fix this untill now: rendering those stubborn sequences as AVI uncompressed (not standard NTSC that is 720x486 - it won't work = error in AviSynth/MVTools), but only as NTSC DV 720x480. Then you write the scritp and drop it in VirtualDubMod, Fast Recompress Mode. This way you finally output the result as another sequence of files at 23,976 (in fact, VDMod points out 23,970).
Jagabo, as you have told me before, besides this drawback, there's only one problem with SmoothFPS - objects moving too fast on the screen might produce artifacts. When the video or the sequence is resampled, anyone can clearly notice them. But even with some artifacts (not too annoying), that's an amazing job, that both Vegas and AE cannot achieve at all. I have already reported this problem at Doom9. Let's see what they can do about that. Here are some pics showing artifacts when you get fast motion on the screen at 30 fps resampled to 23,976:
Cheers,
Mark -
Thanks so much Jagabo, but I fixed the problem rendering those sequences in my old Vegas as AVI uncompressed, dropping´em later in VirtualDubMod, reconverting it this time back to TGA again. Perfect? Well... it works.
Thanks for you help. Please let me finish next weekend your video on Brazilian Birds in AviSynth (man that is sooo great!!!!!!!!!!! the Amazon and the Atlantic Forest)and I´ll find a server to upload both files (XviD video and the problematic **.tga sequence).
Cheers,
Mark -
Jagabo,
Here's the XviD file I've promised (about 37.5 MB)... Enjoy it. Now let me find some more time to upload some 200 MB of targa files.
Cheers,
Mark
Edit: (Link was not working - I'm uploading the ZIP file to another server).
Edit: Here's a link that works. Size: about 41,5 MB; NTSC at 29,97, progressive (previously deinterlaced).
Note: This is a non-commercial file - only for testing purposes.
Brazil - Watercolor -
Jagabo,
My server will give me 2 GB of room next week. I guess this will be enough to send you a couple of sequence files so this way you might take a look if you want and find out what's happening (at this very own moment, I hanve't got too much room available).
Thanks and sorry for the late reply. -
Edit: content here was the same as above
-
Why don't you just upload one problematic sequence to start.
I saw your Brazil/Watercolor video. Nice. -
Glad to know you enjoyed the video. It's 1:34 am here now. I'll try to upload a sequence tomorrow morning. Edit: Friday
Cheers
Mark -
Jagabo,
Sorry for the late reply. I've just finished uploading the files. Both (they're split) are **.RAR files; 1st part is about 55 MB; 2nd one is about 11 MB. Please download both and click on the first one; both will be decompressed.
Please let me know when you finish your download so that I can delete both from the server.
Thanks, Mark
Thunderbolt:
1st part
2nd part
Edit: I'll delete the files tomorrow, on May 21st, 2007. -
Got the files. Here's what I've found:
SmoothFPS() doesn't seem to like a 486 line tall image. Sometimes it works, other times it crashes. Cropping it down to 720x480 fixed that problem.
The last line of the SmoothFPS() function calls MVFlowFps2(). That function takes the frame rate as two integer values, a numerator and a denominator. The input to SmoothFPS is a floating point value. Rather than discarding the digits to the right of the decimal point (or rounding), SmoothFPS() uses scaled (multiplied by 100) integers to increase the accuracy. For example, if you asked for 29.66666 fps, rather than dropping to 29 fps or rounding to 30 fps, the internal calculations are handled as 2966/100.
For some reason MVFlowFps2() screws up when those numbers become too big. I found that *50 works but *100 doesn't. To work around this problem I changed the SmoothFPS function a little. On the first line I changed "fp=fp*100", to "fp=fp*50". And on the last line I changed "den=100" to "den=50". I also tried using 10 instead of 50 and saw no difference (although I didn't compare very closely). Even 1 seemed to work.
The final script I ended up with was:
function SmoothFPS(clip source, float fps) {
fp=fps*50
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,backwar d_vec2,forward_vec2,num=int(fp),den=50, idx=1,idx2=2)
}
ImageSource("TBFinal%03d.tga", 1, 150, 29.97)
ConvertToYUY2()
Crop(0, 3, -0, -3) #if using YV12 you must use even numbers Crop(0, 2, -0, -4)
SmoothFPS(25.00) -
Jagabo,
First of all, thanks a bunch for this. So, you find out the problem! Lightwave encodes NTSC as classic NTSC at 720x486 (and not 480), it doesn't matter if it's the regular 4:3 or 16:9.
Second of all, will you please let me ask you some questions?
-After converting the files, did you encode them as MPEG2 or XviD?
-Did you see the artifacts that in fact is a kind of interpolation?
-Do you think is definitely safe to change the figures (100 to 50) - only to the series of files that the height is 486 or I can change for those that are at 480 too?
-Playing the clip, did you notice any variation on its smoothness (using 50 as the new figure)?
-What about encoding the AVI file (first converting from the "problematic" targa to AVI uncompressed as I was doing)? Do you see anything wrong with this (loss of quality)?
Third: I guess you forgot something:
ImageSource("TBFinal%03d.tga", 1, 150, 29.97)
ConvertToYUY2()
Crop(0, 3, -0, -3) #if using YV12 you must use even numbers Crop(0, 2, -0, -4)
SmoothFPS(25.00)
One more thing I've noticed. I'm encoding and resampling from targa to targa, aren't I? Why converting to YV12? Can a series of TGA (targa 32) be YV12 instead of RGB?????? Remember that I intend to drop those sequences for editing in Sony Vegas at 23,976
Edit: please, forget it - I forgot that SmoothFPS only works in YUY2 or YV12
Cheers,
Mark -
Not to change the subject, but I came across your nickname today in a Brazilian movie DVD, How Tasty Was My Frenchman (Como Era Gostoso o Meu Francês) by Nelson Pereira dos Santos:
http://former.imdb.com/title/tt0066936/
Evidently he was a real Tupinamba chief once upon a time. Your secret is out. -
LOL kkkkkkkkkk
How tasty was my frenchman - I never saw this movie, but I'd like to. Secret? What secret? I've already told around here who Cunhambebe was - what you seem to have found out just nowHe was an Indigenous Chief at the time the French founded a Colony (The Antarctic France) in Rio, before the foundation of the city known as Rio de Janeiro.
edit: spelling -
Jagabo,
It's funny because 100 seems to work here for this sequence
fp=fps*100 ; den=100
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,backwar d_vec2,forward_vec2,num=int(fp),den=100, idx=1,idx2=2)
}
ImageSource("D:\Nova pasta\TBOLT1\TBFinal%03d.tga", 001, 150, 30)
AssumeFPS(30)
Crop(0, 2, -0, -4) #if using YV12 you must use even numbers Crop(0, 2, -0, -4)
ConvertToYv12()
SmoothFPS(24) -
Originally Posted by Cunhambebe
Originally Posted by Cunhambebe
Originally Posted by Cunhambebe
Originally Posted by Cunhambebe
Originally Posted by Cunhambebe
Originally Posted by Cunhambebe
Originally Posted by Cunhambebe -
Hi Jagabo,
Thank again for your help!
About using the figures 100 or 50 on the script:
Jagabo wrote:
Yes, you can use 50 all the time if you want.
Cunhambebe:
-What about encoding the AVI file (first converting from the "problematic" targa to AVI uncompressed as I was doing)? Do you see anything wrong with this (loss of quality)?
Jagabo wrote:
Since TGA files are RGB, loading the sequence into VirtualDub then saving as uncompressed RGB will not cause any loss of quality, just bigger files (your TGA files are RLE compressed, a lossless compression scheme).
Cunhambebe wrote:
Can I change the value SmooothFPS to 24?
Jagabo wrote:
Yes, you can change it to any frame rate you want.
Cunhambebe wrote:
It's funny because 100 seems to work here for this sequence...
Jagabo wrote:
It might be a version difference. I download MVTools a year or two ago. You probably got a more recent version. 100 worked with the sequence you sent a few weeks ago.
This topic has been great thanks to you, jagabo - and of course the other ones who helped too.
Thanks again for your interest, your patience and your valuable help (includding the pics - thanks for taking time to make those screen captures, I really appreciated them).
Cheers,
Mark
Similar Threads
-
Frame rate question
By bergqvistjl in forum Video ConversionReplies: 2Last Post: 3rd Mar 2012, 17:09 -
Frame rate question
By janlafata in forum Newbie / General discussionsReplies: 1Last Post: 12th Jun 2009, 18:37 -
Simple bit rate question
By Bully9 in forum Newbie / General discussionsReplies: 5Last Post: 8th Jan 2009, 12:01 -
Video frame rate question
By Ramza126 in forum Newbie / General discussionsReplies: 4Last Post: 11th Jun 2008, 18:57 -
hd-dvd frame rate question
By ultraman36 in forum DVD RippingReplies: 6Last Post: 29th Dec 2007, 09:47