VideoHelp Forum
+ Reply to Thread
Results 1 to 2 of 2
Thread
  1. i have a small audio file, and I wanted to test out the AudioTrim function on AVIsynth. I can't seem to get the fade option to work. Here is my command:

    B2=B2.AudioTrim(0,100).FadeOut(50)

    I wanted to test out at the halfway point, but I am not hearing any changes.
    Quote Quote  
  2. FadeOut only works when there's video preset so you have to go about it in a convoluted manner.

    I started with a clip containing video and audio and turned it into an audio only clip for this example. The duration of the audio is 20 seconds. Obviously if you already have an audio-only source you'd just use that.

    Code:
    Audio = FFMS2(SomeVideo.mkv, atrack=-1).KillVideo().AudioTrim(0.0, 20.0)
    Then I added the audio to a blank clip with a duration of 20 seconds. I used a frame rate of 25fps for the blank clip so each frame has an exact duration of 40ms.
    20 seconds * 1000 / 40 = 500 frames
    If you reduced the duration of the blank clip it'd reduce the length of the audio by the same amount, so you can cut the end of the audio that way rather than with AudioTrim() if it's easier.
    For a 7 second fade out it's 175 frames (7 seconds * 1000 / 40 = 175 frames)

    Code:
    BlankAudio = AudioDub(BlankClip(fps=25, length=500), Audio).FadeOut(175)
    Code:
    return BlankAudio
    or for just the audio, kill the video.

    Code:
    return BlankAudio.KillVideo()
    or in one step, using a frame rate of 100fps so you can work in 10ms increments.

    Code:
    AudioDub(BlankClip(fps=100, length=2000), Audio).FadeOut(700).KillVideo()
    Last edited by hello_hello; 12th Jun 2024 at 14:18.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!