2

I am trying to use avs2yuv to pipe avs output to ffmpeg for further conversion.

  • My video file is called "sample.avi" (No sound, just video)

  • My audio file is called "sample.wav"

  • My avs file(s) is called sample.avs, and looks like this:

V = AviSource("sample.avi")
A = WavSource("sample.wav")
AudioDub(V ,A)

or

V = DirectShowSource("sample.avi")
A = DirectShowSource("sample.wav")
AudioDub(V ,A)
  • Here is how I pipe:
avs2yuv sample.avs - | ffmpeg -y -f yuv4mpegpipe -i - output.mp4

Now here is the PROBLEM: No matter what files I try as an input, there is NO SOUND in my output. I do not understand what I am doing wrong, and why my audio does not make it to the output. If anyone has experience with avisynth and avs2yuv, your help would be GREATLY appreciated.

Thank you!

Razor
  • 359
  • 2
  • 11
  • Even like this is do not get any audio: A = WavSource("sample.wav") AudioDub(BlankClip() ,A) – Razor Dec 12 '11 at 17:50

3 Answers3

0

Try makeAVIS.exe from the ffdshow package:

wine makeavis.exe -p -i example.avs -a output.wav
Konstantin
  • 2,983
  • 3
  • 33
  • 55
0

I would try to play your avs file with ffplay in order to check your avs file.

And you can also try to build some GRaph with GraphEdit in order to do something like that

A = DirectShowSource("sample_audio.grf", video=false)
V = DirectShowSource("sample_video.grf", audio=false)
AudioDub(V ,A)

With DirectShow you can add several parameter like fps, frame-count etc... sometime it helps.

Good Luck

Kurt
  • 57
  • 7
  • Thanks for the response. I can play my avs in Windows Media Player, and it works fine. But, sure enough, my .avs won't play with ffplay. I get: [avs @ 0000000001C4B960] AVIFileOpen failed with error -2147221164sample.avs: Operation not permitted – Razor Dec 12 '11 at 17:09
  • @Razor I've got the same problem, did you find a solution? my avs plays fine with smplayer and I can encode with x264 but I can't get ffmpeg to work, always end with that error. – kaefert Aug 07 '13 at 11:44
0

As per this link:

Avs2YUV is a command-line program, intended for use under Wine, to interface between Avisynth and Linux-based video tools.

avs2yuv.exe only handles the video stream which it output in a YUV color-space. It is that simple: the audio stream is ignored.

Here are some ways to process both audio and video streaams in .avs. These methods work in Linux using wine, and do of course work in Windows:

  • Encode in Avidemux via AvsProxy (AvsProxy ships with Avidemux)

  • Use VirutalDub as the encoder gui

  • otherwise encode the audio seperately, then mux in the video in a seperate step.

I believe avs2pipe can handle both video and audio streams fron a .avs, but I haven't tried it yet. Here is a link to some info about avs2pipe

Summary: Using avs2yuv mainly makes sense in a Linux/Unix environment.

Peter.O
  • 6,696
  • 4
  • 30
  • 37