Log in

View Full Version : Need Advise on Joining


Hipster Doofus
5th October 2011, 07:46
G'day Guys. Trying to join some files & am running into trouble. Never done it before. Still a noob at all of this. Trying to take a shortcut so as not to covert the mp4s to avi then using virtualdub to join them. Although I'm trying that at this time.

This script>

FFIndex("01.MP4")
AudioDub(FFVideoSource("01.MP4"), FFAudioSource("01.MP4"))
subtitle("4th October 2011-XJR1300X(08)Neerim-Princes Hwy via Jindivick-GoPro R3",
font="arial", size=28, first_frame=400, last_frame=750, align=5)
Trim(350,9170)

AVISource("SlowMo.avi")

FFIndex("01.MP4")
AudioDub(FFVideoSource("01.MP4"), FFAudioSource("01.MP4"))
Trim(9000,13437) +trim(17232,33500)

FadeIn(350)
FadeOut(350)

Plays only the last file. Not to sure about where the fadein goes either.

Any clues?

Dogway
5th October 2011, 09:21
Try this, although I dont know what chunk you wanted to fade in, frame 350, or frame 9000:

FFIndex("01.MP4")
AudioDub(FFVideoSource("01.MP4"), FFAudioSource("01.MP4"))

a=subtitle("4th October 2011-XJR1300X(08)Neerim-Princes Hwy via Jindivick-GoPro R3",font="arial", size=28, first_frame=400, last_frame=750, align=5)
a=a.Trim(350,9170)

b=AVISource("SlowMo.avi")

c=Trim(9000,13437)+Trim(17232,33500).FadeIn(350).FadeOut(350)

a+b+c

Hipster Doofus
5th October 2011, 11:37
Thanks Dogway. That got it going.

I've added more to the script. I changed from mp4 to the edited avi. The fadein/fadeout is now taken care of. What I wanted though was the first 350 frames to fadein & the last 350 frames to fadeout.

The new script:

AVISource("01.avi")

a=subtitle("4th October 2011-XJR1300X(08)Neerim-Princes Hwy via Jindivick-GoPro R3", font="arial", size=28, first_frame=400, last_frame=750, align=5)

b=AVISource("SlowMo.avi")
AssumeSampleRate(12000)
AssumeFPS(12.5)

c=AVISource("03.avi")

a+b+c

With the b part I want to slow it down but as it is nothing happens. It keeps playing at full speed, 50 fps.

Thanks for getting me a step closer. :)

Dogway
5th October 2011, 12:07
hey thats more than joining! : )
both assume are being applied to the "free" AVISource("01.avi"). You need to reference it to "b" variable. Anyways a, b, and c need to be with the same framerate. So with "b" you can duplicate every frame to make it x2 slower, or interpolate the frames by 2 using functions like interframe(), but as you see things get more complicated. To stretch audio use timestretch.

b=AVISource("SlowMo.avi")
baudio=b.TimeStretch(tempo=50)
b=interleave(b,b).assumefps(last)
b=audiodub(b,baudio)

Hipster Doofus
5th October 2011, 12:39
Beautiful. Many thanks. One more question. If neccessary how do you kill the audio on b. Sometimes it might be better with no sound.

As I only do basic editing uncomplicated is a GOOD thing. :D Brain can't handle any more.

Hipster Doofus
5th October 2011, 12:57
OK that wasn't my last question.

I went back to the first script:

FFIndex("01.MP4")
AudioDub(FFVideoSource("01.MP4"), FFAudioSource("01.MP4"))

a=subtitle("4th October 2011-XJR1300X(08)Neerim-Princes Hwy via Jindivick-GoPro
R3",font="arial", size=28, first_frame=400, last_frame=750, align=5)
a=a.Trim(350,9170)

b=AVISource("SlowMo.avi")
baudio=b.TimeStretch(tempo=50)
b=interleave(b,b).assumefps(last)
b=audiodub(b,baudio)

c=Trim(9000,13437)+Trim(17232,33500).FadeIn(350).FadeOut(350)

a+b+c

I'm back to the fade issue. What do I need to add for the first 350 frames to fadein & the last 350 frames to fadeout? [Just noticed the FadeOut is working not the FadeIn]

Hipster Doofus
5th October 2011, 13:02
Got the FadeIn. Moved .FadeIn(350) to here. a=a.Trim(350,9170).FadeIn(350) All working great. :)

So all I need is to know how to kill the audio on this:

b=AVISource("SlowMo.avi")
baudio=b.TimeStretch(tempo=50)
b=interleave(b,b).assumefps(last)
b=audiodub(b,baudio)

Dogway
5th October 2011, 13:21
b=AVISource("SlowMo.avi", audio=false)
b=interleave(b,b).assumefps(last)

Gavino
5th October 2011, 14:11
b=AVISource("SlowMo.avi", audio=false)
b=interleave(b,b).assumefps(last)
This gives no audio track at all on b.
However, to join with a and c, you will need to add a compatible silent audio track, by adding:
b = AudioDub(b, BlankClip(b, audiorate=AudioRate(a)))

Hipster Doofus
5th October 2011, 15:09
Big thanks to you both. It was still giving me trouble but I ended up with this:

b=AVISource("SlowMo.avi")
baudio=b.TimeStretch(tempo=50)
b=interleave(b,b).assumefps(last)
b=audiodub(b,baudio)
b=AudioDub(b, BlankClip(b, audio_rate=AudioRate(a))) #[Added _ to audiorate]

Removes the sound from the avi file & playback is great. Cheers.

Gavino
5th October 2011, 15:52
Sorry, I forgot about the '_' in audio_rate.

You can delete the lines
baudio=b.TimeStretch(tempo=50)
and
b=audiodub(b,baudio)
since the second AudioDub completely replaces the audio track.

Hipster Doofus
5th October 2011, 22:29
OK. Did that & all is well. Thanks Dogway. Thanks Gavino. Hopefully what I know now will fill my needs for avisynth.