converting multiple audio streams
Hi all, I have a XviD coded AVI, which I need to convert to DivX. But the movie have 2 audios (both AC3) . Tried a simple "-oac copy", but this only copies one of the two streams. Using "-aid #" allowed me to choose which of the streams to copy, but I want both of them. Searching a little, I saw that this is a limitation of mencoder. Is this right? If not, how can I do it?
José Queiroz wrote:
Hi all,
I have a XviD coded AVI, which I need to convert to DivX. But the movie have 2 audios (both AC3) .
Tried a simple "-oac copy", but this only copies one of the two streams. Using "-aid #" allowed me to choose which of the streams to copy, but I want both of them.
Searching a little, I saw that this is a limitation of mencoder. Is this right?
yes
If not, how can I do it?
use some other tool: if I remember correctly avidemux2 and avimerge should do the job -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: ShopMon: la rete che fa bene! * Con la tua opinione ShopMon dona 1 ad Amref ed Unicef Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3667&d=16-9
On Friday, 16 September 2005 at 05:06, José Queiroz wrote:
Hi all,
I have a XviD coded AVI, which I need to convert to DivX. But the movie have 2 audios (both AC3)
Hm. I'm not sure what you're trying to accomplish here. Both XviD and DivX are implementations of MPEG-4. It's like trying to convert an Opel to a Vauxhall. It's still an Opel, even though the name is different.
Tried a simple "-oac copy", but this only copies one of the two streams. Using "-aid #" allowed me to choose which of the streams to copy, but I want both of them.
Searching a little, I saw that this is a limitation of mencoder. Is this right?
If not, how can I do it?
I'd recommend using another container format, like Matroska. This has the added benefit that MPlayer can switch audio streams on the fly when playing Matroska files. R. -- MPlayer RPMs maintainer: http://rpm.greysector.net/mplayer/ "I am Grey. I stand between the candle and the star. We are Grey. We stand between the darkness ... and the light." -- Delenn in Grey Council in Babylon 5:"Babylon Squared"
On Saturday 17 September 2005 01:24, Dominik 'Rathann' Mierzejewski wrote:
It's like trying to convert an Opel to a Vauxhall. It's still an Opel, even though the name is different.
But the wheel is usually on the other side! :) Shouldn't bother anyone who's even remotely capable of driving, though.
Hm. I'm not sure what you're trying to accomplish here. Both XviD and DivX are implementations of MPEG-4. It's like trying to convert an Opel to a Vauxhall. It's still an Opel, even though the name is different.
I thought I needed this. Fortunately, I was wrong. I bought a DVD player, and tried to watch some movies I downloaded. For an unlucky coincidence, two of them got problems, and both was XViD. So I came to (the wrong) guess that my player did not support XViD, only DivX. After posting here, I had a "flash" to try it again... and it worked. ¬_¬ By the way, the question is still valid; even not recoding the video stream, I could possibly need to convert the audios, in example, or just cat the two pieces of the movie. I think that's interesting that MPlayer can handle the multiple audio, but MEncoder not.
2005/9/19, José Queiroz <zekkerj@gmail.com>:
By the way, the question is still valid; even not recoding the video stream, I could possibly need to convert the audios, in example, or just cat the two pieces of the movie.
As far I know, mencoder can only process one video stream and one audio stream at a time because it work like mplayer, but not displaying the result in the screen. It sends tha output to the encoder and it to the disk. Then it can only process one audio stream at a time. There is an easy way to do what you want. You can use mplayer to dump one of the audio streams to an mp3 or ac3 file. Then once you recompressed the file with the other audio stream, you can use avimerge (from transcode) to add the missing stream that you want. By the way, it may be good to re-encode the xvid stream to divx because many hardware divx players drops many frames when playing xvid. It may be an unefficient implementation of the decoder or a slow cpu in the player, but the problem is there and can ve avoided by using lavc's divx instead of xvid. -- Alejandro Vargas
On Monday, 19 September 2005 at 11:52, Alejandro Vargas wrote:
2005/9/19, José Queiroz <zekkerj@gmail.com>:
By the way, the question is still valid; even not recoding the video stream, I could possibly need to convert the audios, in example, or just cat the two pieces of the movie.
As far I know, mencoder can only process one video stream and one audio stream at a time because it work like mplayer, but not displaying the result in the screen. It sends tha output to the encoder and it to the disk. Then it can only process one audio stream at a time.
There is an easy way to do what you want. You can use mplayer to dump one of the audio streams to an mp3 or ac3 file. Then once you recompressed the file with the other audio stream, you can use avimerge (from transcode) to add the missing stream that you want.
By the way, it may be good to re-encode the xvid stream to divx because many hardware divx players drops many frames when playing xvid. It may be an unefficient implementation of the decoder or a slow cpu in the player, but the problem is there and can ve avoided by using lavc's divx instead of xvid.
Just to clarify (again): libavcodec's mpeg4 codec does not produce "DivX" files. All of these (XviD, DivX and lavc's mpeg4) are implementations (varying in completeness) of the MPEG-4 standard, but they're not the same. The best you can do for set-top players is to use MPEG-4 profiles (present in recent xvidcore beta, coming soon to lavc) and set FourCC to something that your player will recognize. R. -- MPlayer RPMs maintainer: http://rpm.greysector.net/mplayer/ "I am Grey. I stand between the candle and the star. We are Grey. We stand between the darkness ... and the light." -- Delenn in Grey Council in Babylon 5:"Babylon Squared"
participants (5)
-
Alejandro Vargas -
Dominik 'Rathann' Mierzejewski -
Jan Knutar -
José Queiroz -
Nico Sabbi