Log in

View Full Version : Speed part of the video for tutorial


Jeroi
6th December 2010, 21:12
I am trying to speed some part of video with no luck. Can somebody help me?

Here is my avs script:

video1 = directshowsource("md1.avi").trim(0,2000)
video2 = directshowsource("md1.avi").trim(4234,5941)
video3 = directshowsource("md1.avi").trim(7063,14756)
video4 = directshowsource("md1.avi").trim(16958,17894)
video5 = directshowsource("md1.avi").trim(17894,18840).assumefps(200, true)
video6 = directshowsource("md1.avi").trim(18840,19265)
video7 = directshowsource("md1.avi").trim(22170,22771)
video8 = directshowsource("md1.avi").trim(22771,24771).assumefps(200, true)
video9 = directshowsource("md1.avi").trim(24771,26815)
video10 = directshowsource("md1.avi").trim(26815,28273).assumefps(200, true)
video11 = directshowsource("md1.avi").trim(29721,31260)
video12 = directshowsource("md1.avi").trim(31260,35596).assumefps(200, true)
video13 = directshowsource("md1.avi").trim(35596,35777)
video14 = directshowsource("md1.avi").trim(39829,41802)

audio = directshowsource("01 - Bitmonx tausta.mp3", video=false)

result = video1+video2+video3+video4+video5+video6+video7+video8+video9+video10+video11+video12+video13+video14

audiodub(result,audio)

With this code, avisytnh says video sources framrate differ. How to speed some video source without affecting the framnrate of the video? Normal video framerate is 25.

Gavino
6th December 2010, 21:43
You need to use ChangeFPS to convert back to 25fps from 200fps (which will drop 7 out of every 8 frames), to match the rest of the video.

Two other points - (1) use AviSource instead of DirectShowSource, which is not always frame-accurate, and (2) call it only once at the start of the script. Plus, no point in using sync_audio=true in AssumeFPS when you later dub another audio track anyway. So,

video = AviSource("md1.avi")
video1 = video.trim(0,2000)
...
video5 = video.trim(17894,18840).assumefps(200).changefps(25)
...

Jeroi
6th December 2010, 22:48
thanks alot.

creaothceann
7th December 2010, 16:46
use AviSource instead of DirectShowSource, which is not always frame-accurate

Is DSS2 better/optimal with frame-accuracy?

IanB
7th December 2010, 21:24
use AviSource instead of DirectShowSource, which is not always frame-accurateIs DSS2 better/optimal with frame-accuracy?
It is DirectShow that is not always frame accurate. DSS2 uses a preroll algorithm and can get near frame accurate results in some cases where DSS does not. But if the DirectShow components in your graph are determined to be completely recalcitrant then you are screwed. In such cases you must copy the stream in a single pass to a lossless intermediate format.

Jeroi
8th December 2010, 21:19
It is DirectShow that is not always frame accurate. DSS2 uses a preroll algorithm and can get near frame accurate results in some cases where DSS does not. But if the DirectShow components in your graph are determined to be completely recalcitrant then you are screwed. In such cases you must copy the stream in a single pass to a lossless intermediate format.

Actually, with 120fps raws in anime scene, I have found the best method is to use directshowsource like this:

directshowsource("120fps.avi", fps=23.976, convert=true)

This will provide the best pal raw with audio synced. When used all the assumeftp, convertftp etc. filters with 120fps raw provide audio desync.