[MPlayer-users] playing multiple audio tracks simultanously
Alexander Roalter
alex at roalter.it
Thu Nov 30 19:46:34 CET 2006
Ivan Kowalenko wrote:
>> (I'd like to watch multi-language movies with a friend that can only
>> understand english, while I can only understand italian. I'd like
>> not to use
>> subtitles. Instead, we'd use two headphones connected to two
>> different sound
>> cards on the same linux laptop)
>
> I have a possible solution. Try to start two simultaneous instances
> of MPlayer, one playing the video an an English soundtrack, and
> another with no video output -vo null or something, playing the audio
> soundtrack. Now, I'm not totally sure how to configure output for two
> separate cards, but it could be theoretically possible to use a
> surround sound audio card, and output one sound track to one set of
> channels, and the other sound track to the other set of channels.
> Just hook up headphones.
Since it seems there are two soundcards, no need for configuring the
surround.
Just start
mplayer video -ao alsa:device=hw=0.1
and
mplayer video -ao alsa:device=hw=1.1 -vo null
With enough speed it should work, but the problem here is a) sync, which
is not guaranteed to be kept over the entire movie, and b) if one
instance pauses, the other will go on, making it very difficult getting
in sync again.
OTOH it is also probably difficult accessing a DVD drive simultaneously
from two programs, (ok, maybe caching should do the trick here, as
almost the same sectors are read during one specific point in time).
*IF* there was a method for creating 4-channel audio, inputting one
soundtrack to the front channels and the other soundtrack to the rear
channels, one could remux the video again, and therefore keeping sync
over the entire movie, pausing every stream in parallel, and plugging
one headphone to the frontspeaker exit, one to the rear speaker.
And best it would be if there was a method doing this on the fly...
More information about the MPlayer-users
mailing list