Help - Search - Members - Calendar
Full Version: Replace audio stream in avi file
Hydrogenaudio Forums > Misc. > Off-Topic
yourtallness
I have a music video in avi format, encoded with DivX 5.05.
The audio stream is a 160 kbps mp3. I have the same song
encoded with LAME at 192 kbps, and I wanna replace the
original audio with this mp3.

I suppose I have to demux the audio from the video and then
mux the video with the other mp3. Which tool can do this?
Does this require re-encoding of the video stream, or will the
video quality stay the same?

I have downloaded VirtualDub 1.5.6, VirtualDubMod 1.5.4.1
and Avi-mux 1.14, but I've never fiddled with avis b4, so I
could use some advice.
sthayashi
This sort of question would easily be answered on doom9.org
  1. Open the video file in VirtualDubMod.
  2. Under video, click on Direct Stream Copy
  3. Under Streams, click on Stream list.
  4. Delete any other streams you may see under there (if you want to save the stream, click demux).
  5. Click on add, then select the mp3 you want to add in.
  6. Finally save your new file.
Take care. One problem you may quickly discover is that sometimes Artists release a slightly different song with their music video than they did with their album. Metallica's One is a perfect example.
fragtal
AFAIK .avis cannot handle VBR audio streams. Tell me if I'm wrong wink.gif.
getID3()
AVIs don't handle VBR audio very well, but it can certainly be done. VirtualDubMod makes it easy.
yourtallness
QUOTE
Under video, click on Direct Stream Copy


Will this have any impact on video quality?

QUOTE
This sort of question would easily be answered on doom9.org


I know, but I thought this question would be too trivial to ask at doom9...
fragtal
QUOTE(yourtallness @ Oct 16 2003, 12:08 PM)
QUOTE
Under video, click on Direct Stream Copy


Will this have any impact on video quality?

Nope! The video stream isn't affected at all!
yourtallness
Is there also a way to do this with mpeg videos, without having to re-encode
the video stream?

I've got some mpeg videos with awful sound and I would like to replace the
audio stream...
sthayashi
Yes, it's possible. You'll have to get TMPGENC. The part you'll want is free.

Here's the procedure for doing it:
  1. Close down any wizards that start when you start the program. You probably won't care about them anyways.
  2. Under File, Click on Mpeg Tools...
  3. Go to Simple De-Multiplex. Select the video in Input, then choose a name for the video-only stream in Video Output. Hit Run.
  4. Go to Simple Multiplex. Select the video-only file that you just created in Video Input. Pick the mp3 that you want for the Audio Input. Choose a name for the output, and hit run.
I think Mpeg-1 System (automatic) should be sufficient for your needs. Regretfully, I don't fully understand the differences between the settings. The above should do what you've asked though.
yourtallness
Thanx man, I'll check it out.
mp3chan
Is it possible to use matroska container for this purpose? I don't how far had matroska been developed.
yourtallness
QUOTE
# Go to Simple Multiplex. Select the video-only file that you just created in Video Input. Pick the mp3 that you want for the Audio Input. Choose a name for the output, and hit run.


There doesn't seem to be an option to set the delay between audio and video as in
VirtualDubMod... Not very handy...
yourtallness
Sth else: while muxing a video stream with an audio stream,
I got an "buffer underflow" error, and a warning that the video file
might not play back correctly. However all videos played back
smoothly, without any problem... What's this all about?
Why would there be a buffer underflow during multiplexing?
getID3()
I've only noticed that error when the audio bitrate is higher than the video bitrate - what audio & video bitrates are you muxing?
yourtallness
QUOTE
I've only noticed that error when the audio bitrate is higher than the video bitrate - what audio & video bitrates are you muxing?


This is not the case, the video bitrate is way higher than the audio bitrate
(~192kbps).
Jasper
@mp3chan: Yes, it is definitely possible to "convert" an AVI to a Matroska file. Just use VirtualDubMod to read the AVI and then save as a Matroska file (make sure to use Direct Stream Copy for the video). Alternatively I think you can use mkvtoolnix, but I have no experience with the program (available from http://www.bunkus.org/videotools/mkvtoolnix/).
xmixahlx
mkvtoolnix is actually quite effective, play around with it and be sure to read all the docs first, cuz you'll be surprised as to what it can do.


later
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.