Log in

View Full Version : Loading mp3/ac3 audio in AVISynth


Cheech
29th May 2006, 03:51
I can get my wav source loaded using:

audio=WAVSource("Conan 25 PID 044 T01 3_2ch 384Kbps 48KHz.wav")
AudioDub(video,audio)

But I can't get my LAME mp3 to work. I would also like to the same for AC3.

Guest
29th May 2006, 04:36
Get NicAudio.dll here:

http://www.avisynth.org/warpenterprises/

Cheech
29th May 2006, 05:52
Get NicAudio.dll here:

http://www.avisynth.org/warpenterprises/
What are ya stalking me? Answer your PM's if you want to really help me out ;) And thanks for the answer. Still need to know about MP3 support tho.

Guest
29th May 2006, 06:27
Still need to know about MP3 support tho. Have you tried MPASource() or NicMPASource()? What is the result?

Cheech
29th May 2006, 07:16
Have you tried MPASource() or NicMPASource()? What is the result?
MPEG Layer III is not yet supported when I used the NicMPASource, and MPASource gave me a non function error.

Guest
29th May 2006, 07:30
MPASource gave me a non function error. What do you mean by that? What is the exact error and please post your script.

Cheech
29th May 2006, 07:42
LoadPlugin("C:\Documents and Settings\Administrator\My Documents\Why_does_DG_hate_me\DG MPG Decode\DGDecode.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\NicAudio.dll")
video=MPEG2Source("Conan 25.d2v")
audio=NicMPASource("Conan 25 PID 044 T01 3_2ch 384Kbps 48KHz.mp3")
AudioDub(video,audio)
SeparateFields()
selecteven()
LanczosResize(width,height,8,2,-0,-10,6)

http://www.nonyaz.com/temp/images/albums/random/DG_hates_me.jpg


LoadPlugin("C:\Documents and Settings\Administrator\My Documents\Why_does_DG_hate_me\DG MPG Decode\DGDecode.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\NicAudio.dll")
video=MPEG2Source("Conan 25.d2v")
audio=MPASource("Conan 25 PID 044 T01 3_2ch 384Kbps 48KHz.mp3")
AudioDub(video,audio)
SeparateFields()
selecteven()
LanczosResize(width,height,8,2,-0,-10,6)


http://www.nonyaz.com/temp/images/albums/random/DG_Still_hates_me.jpg

Guest
29th May 2006, 07:47
Get MPASource here:

http://www.avisynth.org/warpenterprises/

That should work, but as a last resort try DirectShowSource().

Cheech
29th May 2006, 08:10
Get MPASource here
It works! Hey do you by chance know a place where I can get support on this program called DGIndex? I'm having some issues loading TP streams that I think the creator should know about, I'm not sure where I should post them.

Guest
29th May 2006, 08:20
Don't push your luck, Cheech. Try the DVD2AVI/DGIndex forum.

Cheech
29th May 2006, 08:28
Don't push your luck, Cheech. Try the DVD2AVI/DGIndex forum.
Good call, I completely missed that sub-forum! Once again, you rule! :goodpost:

gameplaya15143
30th May 2006, 23:50
there is always the cheater's solution too :)

audio = directshowsource("anyaudiofilethatdirectshowcanplay.ext")

Robertus
13th August 2010, 16:38
hi. i try mpasource and nicdll without success, because:

if i load with mpasource , my video is totally white, but audio is loaded, anyway whn i save with virtualdub, i can't see video, but i can hear audio.

same with nicdll

this is my avs script:

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mpasource.dll")
directshowSource("G:\_PROVIAMO\originale.avi", audio=false)
MPASource("G:\_PROVIAMO\audio.mp3", normalize = false)


i hope that someone can help me.

note: mp3 in VBR

sneaker_ger
13th August 2010, 17:34
Only the last source filter is used. You have to use the "AudioDub()" function:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mpasource.dll")
video=directshowSource("G:\_PROVIAMO\originale.avi", audio=false)
audio=MPASource("G:\_PROVIAMO\audio.mp3", normalize = false)
AudioDub(video, audio)

Robertus
13th August 2010, 17:47
Only the last source filter is used. You have to use the "AudioDub()" function:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mpasource.dll")
video=directshowSource("G:\_PROVIAMO\originale.avi", audio=false)
audio=MPASource("G:\_PROVIAMO\audio.mp3", normalize = false)
AudioDub(video, audio)


oh nice thanks!

but, how is possible direct stream copy? because when i save a new avi, virtualdub re-encode video.

Nick
13th August 2010, 19:08
I don't quite get why you're frameserving via avisynth at all if you want a direct stream copy. :confused:

If all you're trying to achieve is an avi with the video from originale.avi but the audio from audio.mp3, then load originale.avi in virtualdub, select 'Direct Stream Copy' in the Video menu and 'Audio From Other File' in the Audio menu. When prompted, browse for the audio.mp3 file and you're good to go.

Or have I misunderstood what you're trying to achieve?

Robertus
13th August 2010, 20:36
I don't quite get why you're frameserving via avisynth at all if you want a direct stream copy. :confused:

because avi source is already encode....


If all you're trying to achieve is an avi with the video from originale.avi but the audio from audio.mp3, then load originale.avi in virtualdub, select 'Direct Stream Copy' in the Video menu and 'Audio From Other File' in the Audio menu. When prompted, browse for the audio.mp3 file and you're good to go.

Or have I misunderstood what you're trying to achieve?

....yes.....thanks.... but I wish it on a bat, to automate all operations in just a click

Nick
14th August 2010, 20:12
Sorry, I still don't get what you wish to achieve with Avisynth.

You have video, you have audio, you do not want to re-encode either but wish to add the audio to the video via batch file.
Avisynth does not do this. You need a commandline AVI muxer.

A forum search for "batch avi muxing" brought up this thread: http://forum.doom9.org/showthread.php?t=124626&highlight=batch+avi+muxing
Is this any use to you?