[MPlayer-users] Replacing audio stream in avi file

D Richard Felker III dalias at aerifal.cx
Wed Dec 17 21:56:06 CET 2003


On Wed, Dec 17, 2003 at 10:55:29AM -0200, romildo at uber.com.br wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> Hello.
> 
> I have the same movie in two different file formats:
> 
> 1) avi, with an English audio stream, and a very
>    good quality video stream
>    
> 2) ogm, with a Brazilian Portuguese audio stream,
>    but with a not so good video stream.
> 
> I want to replace the audio stream in the avi with
> the one in the ogm file, recoded to mp2 (later I
> will convert to SVCD). For that purpose I have
> extracted the ogg audio stream from the ogm file:
> 
> $ ogmdemux -a 1 -nv -nt panteras.detonando.ogm
> 
> Then I have decoded the ogg audio stream:
> 
> $ oggdec panteras.detonando.ogm-a1.ogg
> 
> Then I have encoded it to MP2:
> 
> $ toolame -b 224 panteras.detonando.ogm-a1.wav
> 
> Now I want to replace the audio stream in the avi
> with this one. What is the command for that
> using mencoder?

You don't use mencoder for this. Just use ogmtools to merge the two
files (the original avi and ogm), and tell it which streams to keep.

Actually what you described is roughly possible, too, although there's
MUCH more danger of A/V desync when you split audio and video and put
them back together later like this.

Rich



More information about the MPlayer-users mailing list