I’m looking for a way to play two audio languages at same time each one in a different audio card.
I want to watch movies in the original language (English), but my wife likes to watch it dubbed in Portuguese. Then my idea is to use VLC (or other good video player) to play the English audio in the main Laptop audio card and the dubbed audio in the HDMI audio card.
Then I could use a headphone to listen the original audio track while she listen the dubbed audio in the TV over HDMI.
I didn’t find a solution yet, but found some interesting info:
https://wiki.videolan.org/Play_external_audio_track_with_video/
Also I could open two VLC instance and try to play each only using a different audio card, but it should be nice to have some automatic option.
Any suggestion is welcome!
Update: Someone faced this same issue about 7 (SEVEN!) years ago: http://forums.kmplayer.com/forums/showthread.php?t=12050
Hi Alan, I managed to prototype something for your use case with GStreamer:
# The number and order of the tracks must be known…
gst-launch-1.0 \
filesrc location=example.mkv ! decodebin name=decoded \
decoded.src_0 ! queue ! autovideosink \
decoded.src_1 ! queue ! audioconvert ! alsasink device=”hw:1,0″ \
decoded.src_2 ! queue ! audioconvert ! alsasink device=”hw:2,0″
I guess that with some code things can be made more robust and dynamic, but that’s a start.
I only tested with a couple of clips and the A/V sync looks reasonable, let me know if you find issues.
Ciao ciao,
Antonio
Hi Antonio,
It is amazing!!!
Thank you very much for this nice tip! I will test it soon.
Kudos to you!
Hi, I’m in the same situation as you and was wondering if you found a solution?