Yes, jagabo. I saw it.
@Gavino.
I had considered this whole thread solved before test your example. But now, putting it on the desk, your example has no sound at all.
What is wrong here?
P.S.: And, with some situations, AvsPmod crashed miserably...Code:v1=DirectShowSource("D:\work\test1.mp4") #v=ffmpegsource2("D:\work\test1.mp4", atrack=-1) #v = FFVideoSource("D:\work\test1.mp4", atrack=-1) #selectevery(last, 2) #selectrangeevery(v, 5, 1, audio=true) v=SelectEvery(v1, 10).AssumeFPS(v1) a=TimeStretch(v1, tempo=500) #a = FFAudioSource("D:\work\test1.mp4") #AssumeFPS(30000,1001) AudioDub(v,a)
+ Reply to Thread
Results 31 to 39 of 39
-
Thank you.
-
Thank you.
-
Yes, my mistake - I meant 1000.
I tried your example code and it worked OK (used AvsP to launch MPC as a player).
What are you using to play the script?
You could try adding ConvertAudioTo16Bit() at the end.
TimeStretch delivers float audio, which some players might not like, but the Avisynth VfW interface converts this to 16 bit anyway, so it shouldn't make a difference unless the player is using the Avisynth API directly.
EDIT: Ah, I see it was a false alarm. I'll leave the info there as it might be useful in future searches about TimeStretch(). -
Yes, my friends, this long walk didn't reach its end...
I keep creating challenges, trying to make different scripts to better understand that infinite thing called avisynth.
For the most of you, of course, the end is nearby, but for me... journey just began.
Maybe I'm asking basic lessons, but it's because I already searched and tried too much and could not find an answer.
So, how to make a script to get some normal pieces of the same video and put inside it a speedup one? Let's say:
1 - normal speed
2 - normal speed
3 - fast
4 - normal speed
And keep the corresponding audios?
I'm trying something like this:
Code:v1=DirectShowSource("D:\work\test1.mp4") v2=trim(v1, 120, 180) v3=trim(v1, 1860, 2160) v4=trim(v1, 3000, 4049) v5=trim(v1, 4050, 8460) a2=AudioTrim(v1, 120, 180) a3=AudioTrim(v1, 1860, 2160) v6=SelectEvery(v5, 5).AssumeFPS(v5) a=TimeStretch(v5, tempo=500) v=v2+v3+v4+v5+v6 a=a2+a3+a4+a5+a6 AudioDub(v,a) ConvertAudioTo16bit()
At page of Trim, it states:
Prior to v2.60, to trim an audio-only clip, you may not just set a fake frame rate with AssumeFPS. Instead, you must make a BlankClip, use AudioDub, trim that, and then KillVideo. Otherwise, AviSynth makes an error message "cannot trim if there is no video".
I'm not sure how to use Audiodub, if it can be used twice...
And about concatenate audio like a1+a2...
Confused...
Scratching the head...
Any help?Thank you. -
There is no need to separate out the video and audio.
Just do this:
Code:v1=DirectShowSource("D:\work\test1.mp4") v2=trim(v1, 120, 180) v3=trim(v1, 1860, 2160) v4=trim(v1, 3000, 4049) v5=trim(v1, 4050, 8460) v6=SelectEvery(v5, 5).AssumeFPS(v5) v6=TimeStretch(v6, tempo=500).ConvertAudioTo16bit() return v2+v3+v4+v5+v6
Last edited by Gavino; 26th Apr 2012 at 10:36. Reason: Info on AudioTrim
-
Thank you.
-
Gavino's script works fine here (on a random AVI file). DirectShowSource() may be your problem. Was it your intent to repeat section 5? Once at normal speed, once at 5x?
Last edited by jagabo; 26th Apr 2012 at 11:11.
-
Holy jagabo! Yes! My mistake again!
Section 5 must stay out of v1+v2...
return v2+v3+v4+v6
Not v5!
I confess I try, but programming is not my talent...
Thank you.
Similar Threads
-
Time Lapse Video from existing WMV file
By willboss in forum Newbie / General discussionsReplies: 5Last Post: 17th Sep 2013, 02:35 -
Time-Lapse Video Does Not Play Smoothly
By radardetector in forum Newbie / General discussionsReplies: 16Last Post: 17th May 2011, 10:21 -
Trying to make a time-lapse video (speeding up original footage): How?
By maskingtape in forum EditingReplies: 30Last Post: 15th Jul 2010, 23:39 -
using a webcam, plus time-lapse software, to make a normal speed video..
By snafubaby in forum Capturing and VCRReplies: 2Last Post: 27th Apr 2008, 01:38 -
time-lapse video setup
By snafubaby in forum Newbie / General discussionsReplies: 3Last Post: 11th Dec 2007, 13:42