PDA

View Full Version : Having trouble loading .WAV audio into video


pinkshiro
28th April 2010, 06:41
Hi,

I'm new to AviSynth. Have tried to find the answer to my questions by searching the forums and using the avisynth wiki, but I can't seem to locate the answer to my problem.

I am creating a slideshow of images + audio. But when trying to use AviSynth to mix the video and audio together, the resulting video comes out with no audio. Info below....does anyone have any idea what I am doing wrong?

The audio I will be receiving is in mp3 format, so I used FFMPEG to convert the mp3 to WAV using:

ffmpeg -i "stjohn/file.mp3" "stjohn/file.wav"

This is my AviSynth:

Video1=ImageSource("stjohn/1.jpg", end = 104, use_DevIL=false)
audio=WavSource("stjohn/streamsidecousrt.wav")
AudioDub(Video1, audio)


Using avs2avi.exe, this is the Command Line code I am using:

C:\Users\Mike\Downloads\AVS2AVI>avs2avi example.avs test2.avi -w -c "null"

Below is a Gspot Screenshot of both the original MP3 and the WAV.

http://www.flipsidedesign.co.nz/images/gspot-mp3.jpg

http://www.flipsidedesign.co.nz/images/gspot-wav.jpg

Gavino
28th April 2010, 08:20
avs2avi only outputs video, the audio stream from your script is ignored. Use another encoder, eg VirtualDub.

Also:
- why convert to wav? Avisynth can read mp3 files with DirectShowSource (or NicMPG123Source from the NicAudio plugin);
- your video is about 4 secs long, but the audio is about 25 secs; is this what you want?

pinkshiro
28th April 2010, 08:59
Hi and thanks for your reply.

I did not know that avs2avi doesn't output audio. That's disappointing.

I am actually building a system which will use avisynth on a command line level, so virtual dub wouldn't be appropriate in my case.

Is there another command line way of executing an AVS file which will generate a video with audio? I can always use FFMPEG to add the audio and video streams together, but I was wanting to use AviSynths "MixAudio" function to mix two audio files together (a voice over, and a background music track).

To answer your questions:

- I was converting to WAV because I originally thought the problem was with the MP3 file not being added properly - but I am mistaken and the problem lies with avs2avi.

- The length of the audio and video is not an issue. I had 6 more images to be added to the video, dissolved together, which would take up the remaining audio time. But for the sake of testing I stripped it down to one 104 frame long video.

Thanks again.

smok3
28th April 2010, 10:29
c:\>vdub
VirtualDub CLI Video Processor Version 1.9.7 (build 32661/release) for 80x86
Copyright (C) Avery Lee 1998-2009. Licensed under GNU General Public License

This application allows usage of VirtualDub from the command line. To use
the program interactively, launch VirtualDub.exe directly.

Usage: vdub.exe ( /<switches> | video-file ) ...
vdub.exe /? for help

pinkshiro
28th April 2010, 12:46
Did not know that!

Thanks so much :thanks: