Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
![]() |
#82 | Link |
Moderator
![]() Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
Both false and true will result in cfr. The difference is that setting it to false, it will load the video with fps=25. If the frame rate is different, or variable, you will get video and audio which is not in sync. When setting it to true it will add/delete frames (to match the specified fps), with the result that the video and audio is in sync.
Since asf is vfr, yes, you should use it. |
![]() |
![]() |
![]() |
#83 | Link | |
Registered User
Join Date: Jul 2007
Location: Durban, South Africa
Posts: 11
|
Quote:
![]() Code:
DirectShowSource("test.asf") |
|
![]() |
![]() |
![]() |
#84 | Link | ||
Moderator
![]() Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#85 | Link |
ангел смерти
![]() Join Date: Nov 2004
Location: Lost
Posts: 9,555
|
It uses whatever framerate the splitter reports back. Since directshow is based on timecodes, there's no harm in returning totally off-the-wall framerates, or one framerate for everything, so some do. Others will report the average duration, the framerate muxed into the container (which can anything for the same reason, but muxers are better in this respect), the duration of the first frame, and so on. Obviously a completely unreliable value, you're better off never trusting the splitter.
|
![]() |
![]() |
![]() |
#86 | Link |
Registered User
Join Date: Mar 2007
Posts: 6
|
avisynth + vdm
i'm looking to use a built in filter (logo, specifically) from vdm, in avisynth. is there a way i can do that? (i'd use donald graft's logo 1.34a but it doesn't give me the intended results)
thanks in advance! |
![]() |
![]() |
![]() |
#91 | Link |
Registered User
Join Date: Dec 2008
Posts: 5
|
AVIsynth help
I have been developing software for use on PSP: PSP_Converter
This software automatically performs the following tasks via AVIsynth: > automatic resizing of video clips to a maximum size of 480x272, but retains their original aspect ratio > If framerate contains more than 3 decimal places, it is rounded (ex. 23.976043 to 23.976) and converted to that rate. > If framerate is above 30 fps, it changes it to 29.970 fps > Loads any file that can be converted in ffmpeg without that video codec being installed I have two problems: > Cannot handle variable framerate video files. Audio is very far out of sync. Is there a way to tell avisynth to change the framerate to one that is in sync with the audio before it is rounded? > Cannot convert any input file which uses DAR, SAR or PAR in it's display. Is there a way to retrieve one of those values in order to calculate the output video size? Below is my script. I have included brief explainations along with each section. I am a developer. This script must work for ANY input file and cannot be engineered for specific files. #Load necessary plugins LoadPlugin("FFmpegSource.dll") LoadPlugin("Autocrop.dll") #Load and crop input clip Input_Clip = FFmpegSource("C:\Users\Jim\Videos\Clip.avi", vtrack=-1, atrack=-1).autocrop(mode=0) #Calculate video width and height based on the autocropped Input_Clip and a maximum output resolution of 480x272 i_width = Input_Clip.Width i_height = Input_Clip.Height d_a_r = float(i_width) / float(i_height) p_o_height = (d_a_r < 1.7647058823529411764705882352941) ? 272 : 480/float(d_a_r) p_o_width = (d_a_r < 1.7647058823529411764705882352941) ? 272*d_a_R : 480 #Sets output width and height to numbers divisible by 4 p2_o_width = Round(p_o_width/4)*4 p2_o_height = Round(p_o_height/4)*4 o_width = Round(float(p2_o_width)) o_height = Round(float(p2_o_height)) #Retrieve framerate of input_clip, multiply by 1000 (this will be framerate denominator) and round it to a whole number first = Input_Clip.Framerate*1000 second = Round(Float(first)) FPS_oi = int(second) #If the rounded framerate is greater than 30.000fps, then set it equal to 29.97 fps FPS = (FPS_oi > 30000) ? 29970 : FPS_oi #Output is input clip, changed to the desired framerate numerator (whole number) and a denominator of 1000. The clip is also resized maintaining aspect ratio. Output = Input_Clip.changefps(int(FPS), 1000).LanczosResize(o_width,o_height).converttoyv12() Return Output I'm a noob, I'm probably missing something obvious. |
![]() |
![]() |
![]() |
#92 | Link |
Guest
Join Date: Jan 2002
Posts: 21,906
|
You're breaking two rules with this post.
1. You can't repost an issue that was closed for a rule violation in another thread. That's a 16 strike. http://forum.doom9.org/showthread.ph...05#post1224905 2. You shouldn't be posting in this thread. Didn't you get the idea when I moved your other posts? This thread is for discussion of FAQs, not for specific problems. That's a rule 3 strike. http://forum.doom9.org/showthread.ph...36#post1053536 Do not bring up this issue again. You can't change history. And don't start debating me here either. Send a PM if you want to challenge a moderating decision. Last edited by Guest; 17th December 2008 at 05:09. |
![]() |
![]() |
![]() |
#93 | Link |
Guest
Posts: n/a
|
period precedence
Hi,
The avisynth documentation mentions operator precedence, but does not say anything about the '.' operator. I mean, experience shows that v1+v2.bob() means v1+(v2.bob()) and not (v1+v2).bob() but is this actually a defined behaviour ? thanks, Peter |
![]() |
![]() |
#94 | Link | |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,430
|
Quote:
'.' is not really an operator (what would its right operand be?), just a syntactic element, but in effect it binds more tightly than any operator. http://avisynth.org/mediawiki/The_fu...ar#Expressions |
|
![]() |
![]() |
![]() |
#96 | Link |
Registered User
Join Date: Sep 2008
Posts: 365
|
I guess this question does not need it's own thread, but fits right into this one.
Is there a bug with the behavior of Eval()? This works: Code:
Clip Eval("filter_string") Code:
Clip.Eval("filter_string")
__________________
(i have a tendency to drunk post) |
![]() |
![]() |
![]() |
#97 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
Eval is a little strange, it parses the expression in place where the eval call is. So case 1 is
Code:
Last=Clip Filter(Last, _string) # Implicit last handling for Arg[0] Code:
Last=Clip Filter_string # Implicit last not required for Arg[0] And for case 2 Code:
Filter(Clip, _string) # Explicit Clip as Arg[0] The implicit last handling can make thing a little tricky e.g Code:
BlankClip(Height=420) BlankClip(Height=240).Eval("Subtitle(String(Height()))") Code:
Last=BlankClip(Height=420) BlankClip(Height=240).Subtitle(String(Height(Last))) |
![]() |
![]() |
![]() |
#98 | Link |
Registered User
Join Date: Sep 2008
Posts: 365
|
So it's not a bug, but "intended" behavior.
btw, the Eval entry in the wiki could probably use a little more documentation, it basically only says "Eval evaluates a string as if it was part of the script. " and gives a example...
__________________
(i have a tendency to drunk post) |
![]() |
![]() |
![]() |
#99 | Link | |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,430
|
Quote:
Just like any other use of the '.' notation, clip.Eval(filter_string) is the same as Eval(clip, filter_string). This can never be correct since Eval does not have a clip argument. The original intent can be achieved by writing Eval("clip."+filter_string) |
|
![]() |
![]() |
![]() |
#100 | Link |
Registered User
Join Date: May 2012
Posts: 66
|
multi-lined vs single line with a .
What is the difference between putting two functions in two lines vs in one line with a period/dot (.)
!? For an example, crop(0,10,0,-10) Spline64Resize(1280,720) vs crop(0,10,0,-10).Spline64Resize(1280,720) Performance-wise differences, And differences in Qulaity and Lossyness... ![]() |
![]() |
![]() |
![]() |
Tags |
avisynth, faq |
Thread Tools | Search this Thread |
Display Modes | |
|
|