View Full Version : how do I extract audio from avi with 2 audio streams?
Midnight Tboy
12th November 2002, 00:37
hey there, hope you can help me,
I've converted plenty of divxs and dvds now so am fairly competent at using the various methods and software.
However, I've now come across wanting to convert to CVD the divx film UHF which has 2 audio streams per disc too, one being the audio commentary.
I know that dvd2svcd doesn't support them directly....so what I was looking at trying to do was to extract the 2 audio files to wav, then create a new avi file with only one wav attached on it, then once dvd2svcd has made the cvd file(making it a smaller size for modification), then manually use bbmpeg to add both encoded audio streams onto it so I have a 2 track CVD file.
Anyways, the problem I'm having is I can't seem to extract the audio at all, it plays fine in windows media player (nimo and ace mega codec pack installed) and can flick between the 2 audio tracks....however, in virtuadub it won't let me extract either track....I've selected to use nandub too as I knew that was supposed to allow track extraction, but it doesnt seem to let me touch the 2nd audio track (the 1st I 'think' it allowed me to extract, but its in ac3 I think as can't check it in winamp
anyways, can anyone tell me how I can extract the 2 audio tracks from the avi file using them progs or any alternate program that will let me choose the track to extract to a file, whether its reprocessed ass a pcm wav, or whether kept as ac3 I don't mind, as they'll get plexed back with the avi vid portion.
cheers,
Tuck
htc10825
13th November 2002, 15:37
read the following thread to extract ac3 form avi(1st track):
http://forum.doom9.org/showthread.php?s=&threadid=18187
For 2nd audio track, the Ndub should do it. It is very strange what you say. Is the avi a ogg media file?
As long as the mediaPlayer can play the avi, you can use graphedit to render the 2nd audio track:
load the .avi into graphedit(render media file), delete the connections for video and audio1, change the output for the 2nd audio from DirectSoundRenderer to WaveDest(or file writer).
For software and guide go to the Domm9 homepage.
RadicalEd
13th November 2002, 22:58
Originally posted by htc10825
Is the avi a ogg media file?
you do realize that's an oxymoron don't you ;]
htc10825
14th November 2002, 16:12
I mean someone had renamed the ogg file to .avi(so you see only the .avi filename extension), or someone muxed a .avi video with a ogg-vobis audio via Nundub(such file has also .avi but need a secial codec(not the directShow filter which just for playing back) to be installed to open it in Nundub). So there is no oxymoron.
I had really hoped that you give more constructive tips to newbie other than grumble about minor deteils. Remember: forum is a place to solve problems(give tips, get tips, discuss to search solutions), bu not for grumbling.
RadicalEd
14th November 2002, 22:28
I mistook you, maybe I put a little too much faith in the fact that people aren't doing stupid things like muxxing vorbis into avi.
And I'm pretty well versed in dealing with newbies. Next time lecture someone after you're searched though some of their posts :/
htc10825
15th November 2002, 19:14
maybe I put a little too much faith in the fact that people aren't doing stupid things like muxxing vorbis into avi.The Ogg media format is much newer than the Vobis audio compression codec. In the early of 2001 implemented Nando the funktion in Nundub because at that time there was no tool/utility to be able do that. Some mediafiles in inet came from that time. Many monthes later other programmers develeped the Oggmuxer/OggMachine etc. and introduced the Ogg media format. So today no one will do such things, but that was just a contemporary history. Only a veteran of video encoding know such things. I've made avi/mpeg1 encoding since 1995(with TV-capture card Pinnacle DC-20(for $900,- at that time) to convert VHS to CD). Ignorance is not a bad thing, but perhaps grumbling.And I'm pretty well versed in dealing with newbies. Next time lecture someone after you're searched though some of their postsIf you really want to help someone you dont need to wait utill I've searched though some of their posts. So far your posts are mainly short and useless thing. I'll see if that will change in the future. I repeat:
Helping instead of grumbling!
poopity poop
15th November 2002, 22:37
graphedit should eb able to do this. Just off the top of my head:
Insert file>demux into morgan stream switcher>direct sound device>wav Dtest>file writer. Two branches of the same thing from morgan stream switcher.
RadicalEd
16th November 2002, 05:15
You should go to amv.org. Everyone there is a newbie to the kind of hardcore video encoding/editing that most of us doom9ers do and there are only about 5 or so other people over there (out of a good many hundreds) who have the kind of experience that, again, most of us doom9ers do. Sorry if you've only heard me grumble (generally I shy away from agressive acts such as grubling) because 99% of the time my posts are helpful. Not to mention I have a guide under my belt and am developing some programs that should be of much use in the future (no details, I'll talk about them when they're ready for release)
I'm not trying to say I'm better than anyone, including you, in any way. I'm no better than most of the people here who post often (except maybe n00bs). I'm just trying to point out that I do have redeeming qualities and I'm sorry you havent seen any of them. I'm also sorry I mistook your comment about ogg in avi, I didn't mean to sound grumblie.
Midnight Tboy
18th November 2002, 18:55
cool, thanks guys, I still have a couple of problems though
I managed to extra the audio to wav for each channel using the graphedit tool by deleting the paths to the other audio and video and setting it to wav write to a file like yous suggested.
However, if I go to plex the files back with vdub, I notice that the new wav files are at 23.980fps whereas the video is at 23.976. The original ac3 file was at 23.976. so when I go to encode this to CVD in dvd2svcd later the sound is out.
took me a while to make this attempt as have been busy, but next I'm going to try using besweet to convert the audio and change the fps, however my past tests have rarely proved successful in having it rematch the audio with the video properly when I've tried that (but fingers crossed)
Could anyone tell me if theres a way to just directly take the ac3 files out of the avi using graphedit (or other) without modifying them, so I can just run them through heada3che later or directly remux them in vdub.
cheers
poopity poop
19th November 2002, 10:03
sure:
1. load your .avi into vdub
2. file>save .wav
3. rename extention to ac3
:)
That's it!
Midnight Tboy
19th November 2002, 19:37
poopity poop.... yeah I know how to extract the ac3 in general....but from this one remember its a multiple stream avi file, so in nandub it will only let me extract the first stream.
If I try to extract the 2nd stream it always crashes nandub.
so only way I have at moment to extract that 2nd track (they're both ac3) is using graphedit to render it to wav. but then it makes the fps on the audio 23.980 instead of 23.976 so it goes way out of synch.
I tried besweet setting the option to change fps from 23980 to 23976 but as usual it has never seemed to change it successfully for me, it would have taken like 90mins to do a 60minute sound, and then when I played the sample there was only silence.
So basically, I ideally need (in graphedit?), to either a) load up the avi and delete the references to the 1st audio and vid stream, then save the 2nd audio stream to any output format, but the output file still needs to be the exact film length at 23.976 and not the new 23.980 that it created, so like a direct stream copy inside that perhaps. Or b) to just delete the 1st audio stream, repoint that for the 2nd stream, then save the entire vid and audio directly in it as direct stream.
any advice please?
cheers,
Tuck
htc10825
20th November 2002, 13:28
If you only have the problem with a/v syncron, just use "Steinberg WaveLab" to do the timebase correction. I allway use it for all frame rate conversion(audio part). It is very, very precision and very, flexible. Absolute HQ.
If you in GE only delete the 1st audio, the redering(audio track to wave file) time will be so long sa the playback time of the movie. So I've never used it for a rip. But you can test it. The resault may be also asyncron.
Abond
20th November 2002, 14:16
@Midnight Tboy
I am sure you tried everything to extract the second ac3 with Nandub, but I have one mad idea, not sure if it will work. When load the avi in Nandub, set the first audio - no audio, the secondary track - ac3. Select direct stream copy also for video. Click File-Save avi (not save wav). If it works you will have an avi with only one ac3. Then you know already how to do this.
The other idea is to use VirtualDubMod, it also support ac3 (oh, I don't remember exactly). The idea is to convert the avi to ogm (File-Save as ogm). Then in VDubMod there is ogm demuxer - try to demux the tracks. I'm not sure if it works either. Good luck!
Midnight Tboy
21st November 2002, 02:00
Abond....thanks, I'll give them both a try tomorrow to see if I can get anywhere with it. I did try to select no audio for the 1st stream and just to direct stream the 2nd audio then save wav, but never tried direct stream with the vid and saving the avi too....just would always crash nandub before.....but fingers crossed. As to the virtualdubmod idea I'll have to look at that as have never tried to get that app, but if it works then hell...why not.
htc10825..... I generally use cool edit for audio editing, though mainly for fixing glitches n clicks in mp3s and general use. I did notice that soundforge seemed to potentially be better as you can set an exact film length in it. so does steinberg wavelab allow you to actually change the FPS of the audio directly then resave?? if so I'll certainly put that bac on to give a try
Midnight Tboy
27th November 2002, 17:08
hiya...I finally got round to getting it to work
using graphedit cos of the framerate change always would cause the sound to drift out of sync slowly.
the way I managed to extract it, only in nandub.
1) I opened nandub, and the avi file (with 2 x ac3 tracks).
2) Chose Direct stream for video
2) Like Abond and others mentioned, I went to audio and chose No Audio for 1st stream, and chose avi audio for secondary stream. and direct stream copy.
3) Instead of choosing save wav (which would give an error), I chose to save the avi. It then in its status you couls see it working on the 2nd stream and the vid stream in the file, giving a resulting file about 70mb less than the original file cos it was minus one ac3.
however, playing this new file in windows media player, cos there was no primary stream, had no sound on it, and couldn't be switched.
BUT, dvd2svcd read the file and read that 2nd audio track this time :D
so
4) converted away in dvd2svcd (making the bitrate cd size about 90mb smaller to allow for the 2nd audio (809mb I chose).
5) once the encode was complete, yet again the audio was a bit of out of sync..for now....so I kept the pulldown encoded mpv file, and also the encoded audio.mp2 file seperately to work with later.
6) Then repeated the nandub steps, but choosing no audio for 2nd stream and direct stream avi audio for first.
7) Then I went and loaded the film with the primary only stream into dvd2svcd, and started that to encode, but stopped it at the point it went to encode the video, so I had the newly encoded audio.mp2 file which I renamed to main.mp2 (too lazy to do the audio manually - plus it ensured it was still at same bitrate, etc :P)
8) so I was mainly left with the pulldown_encoded.mpv file, and 2 .mp2 files for each audio.
9) I plexed the files together then manually in bbmpeg.
The audio was still out of sync just like with the original encode.
However, I noticed that the audio was out of sync all the way through and it wasn't a casual drift when I did this.
so
10) deleted the plexed mpg file.
11) reloaded up Bbmpeg, but this time I changed the default delay for the 2 audio streams from 180 to 400 (or was it 450 - I tried a few)
the new file played perfectly :D:D:D
so finally 12) built the cue and bin in vcdeasy :D
I did the same steps for cd2 of the movie, however this time, I did not have to change the delay on the plex of the film as it was in perfect sync.
Odd......but hope this helps if anyone is about to try to make their own conversion from 2channel avi files :)
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.