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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 17th February 2013, 20:33   #1  |  Link
BlockABoots
Registered User
 
Join Date: Dec 2012
Posts: 156
Speeding Up A Certain Section Of A Video??

I have a part of a video capture that i want to speed up (the end credits), the starting frame on the section i want to speed up is 18898 and the last frame is 48075. I know the command changefps but im not sure if this can be applied to a certain section of a video clip. Is there a command for this?
BlockABoots is offline   Reply With Quote
Old 17th February 2013, 21:01   #2  |  Link
Rumbah
Registered User
 
Join Date: Mar 2003
Posts: 453
Just trim your video to two parts (start-18897 and 18898-end) and only speed up the second part. Then just put them together again (part1+part2).
__________________
x264 full help - x264 --fullhelp r2345
Cuttermaran HCEnc provider - Support for HCEnc in Cuttermaran
DualDVDRB - Dual core support for DVD-RB free
Rumbah is offline   Reply With Quote
Old 17th February 2013, 21:34   #3  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,168
You will also need to set the final FPS of part2 to match part1 i.e. part1++part2.AssumeFPS(part1)
IanB is offline   Reply With Quote
Old 17th February 2013, 21:59   #4  |  Link
BlockABoots
Registered User
 
Join Date: Dec 2012
Posts: 156
I am still relatively new to Avisynth, infact im actually using AvsPmod. So what script do i need to use if im wanting to speed frames 18898 to 48075 up, there is a total of 49408 altogether. This is what i currently have....

video=AVISource("E:\CAPTURES\My Records\amarec(20130217-1858).avi")
video1=fadein(video,50)
video2=fadeout(video1,50
video3=lanczos4resize(video2,1920,1080)
video4=converttoRGB32(video3,matrix="rec709")

Return video4

What do i need to add to that script?
BlockABoots is offline   Reply With Quote
Old 17th February 2013, 22:29   #5  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,168
Code:
video=AVISource("E:\CAPTURES\My Records\amarec(20130217-1858).avi")
video=Trim(video, 0, 18897)++Trim(video, 18898, 48075).ChangeFPS(9.99).AssumeFPS(video)++Trim(video, 48076, 0)
video1=fadein(video, 50)
...

Last edited by Wilbert; 17th February 2013 at 22:31. Reason: added a dot
IanB is offline   Reply With Quote
Old 18th February 2013, 20:28   #6  |  Link
BlockABoots
Registered User
 
Join Date: Dec 2012
Posts: 156
That works a treat thanks, can you explain how that actually works, what do the '.' mean/do?. Is it anything before the '.' and after is applied to each other?? So for the script above we have determined a section of frames (18898 and 48075) and the added a '.' and the changeFPS, so because we have added a '.' to the scripted then the 2 are added together??
BlockABoots is offline   Reply With Quote
Old 19th February 2013, 07:47   #7  |  Link
ajk
Registered User
 
Join Date: Jan 2006
Location: Finland
Posts: 126
The dot indicates that a filter is "chained" to act on the previous item on the same line.


Code:
return AVISource("something.avi").ChangeFPS(...).AssumeFPS(...)
is the same as

Code:
AVISource("something.avi")

ChangeFPS(...)
AssumeFPS(...)

return last
or you can use names for the clips

Code:
video = AVISource("something.avi")

return video.ChangeFPS(...).AssumeFPS(...)
Code:
video1 = AVISource("something1.avi")
video2 = AVISource("something2.avi")

video1 = video1.SomeFilter(...)

video2 = video2.AnotherFilter(...)

return video1 + video2
Check the Avisynth Mediawiki for instructions on the syntax. You can't really use or make effective scripts unless you understand the basics
ajk is offline   Reply With Quote
Old 30th May 2013, 20:23   #8  |  Link
BlockABoots
Registered User
 
Join Date: Dec 2012
Posts: 156
Ok i have done this but noticed after the section i have speeded up the audio is out of sync, so the audio didnt keep up with the video, how to i sync the audio?
BlockABoots is offline   Reply With Quote
Old 30th May 2013, 20:37   #9  |  Link
paradoxical
Guest
 
Posts: n/a
Quote:
Originally Posted by BlockABoots View Post
Ok i have done this but noticed after the section i have speeded up the audio is out of sync, so the audio didnt keep up with the video, how to i sync the audio?
You need to resample it.
  Reply With Quote
Old 30th May 2013, 21:26   #10  |  Link
BlockABoots
Registered User
 
Join Date: Dec 2012
Posts: 156
Ok, how do i do that, within avisynth?
BlockABoots is offline   Reply With Quote
Old 30th May 2013, 22:04   #11  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,168
ResampleAudio() or TimeStretch()
IanB is offline   Reply With Quote
Old 30th May 2013, 22:10   #12  |  Link
BlockABoots
Registered User
 
Join Date: Dec 2012
Posts: 156
This is my current script, how would i add that in?...

video=AVISource("E:\CAPTURES\My Records\amarec(20130529-2131).avi")
video1=lanczos4resize(video,1920,1080)
video2=trim(video1,0,18270) + trim(video1,18270,22150).ChangeFPS(2.88).AssumeFps(video1) +trim(video1,22151,48518) +trim(video1,53024,0)
video3=fadein(video2,50).fadeout(50)
return video3
ConvertToYV12()
BlockABoots is offline   Reply With Quote
Old 30th May 2013, 23:43   #13  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 5,791
I think maybe this part may need a little extra

Code:
    AssumeFps(video1,sync_audio=true)
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is online now   Reply With Quote
Old 30th May 2013, 23:48   #14  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,168
Code:
... ++ trim(video1,18270,22150).ChangeFPS(2.88).AssumeFps(video1, True).ResampleAudio(AudioRate(Video1)) ++ ...
IanB is offline   Reply With Quote
Old 31st May 2013, 00:14   #15  |  Link
BlockABoots
Registered User
 
Join Date: Dec 2012
Posts: 156
Quote:
Originally Posted by IanB View Post
Code:
... ++ trim(video1,18270,22150).ChangeFPS(2.88).AssumeFps(video1, True).ResampleAudio(AudioRate(Video1)) ++ ...
That sorted it, thanks.
BlockABoots is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 13:18.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.