Keiyakusha
4th October 2020, 21:23
Hey guys. I am looking for a way to play the same video with 2 different audio streams. I have some concepts in mind, but not really sure how to make this possible.
The requirement is that the video should be controlled in such a way that no matter what I do (play, pause, stop, seek, subtitle change), audio remains in sync. At the same time, it is NOT required for an audio to come from the same player or even the same device, as long the sync is maintained.
So first I am thinking of preparing a custom 4.0 audio stream where instead of side channels would be proper front stereo channels with a different language. And then I just plug-in two pairs of headphones at the back of my PC. This could work, but I would rather have a more elegant solution and this method won't work on a laptop...
Then I am thinking of creating some custom directshow graph where a source filter will pull 2 audio streams from a container instead of one and then will feed them to different audio renderers that are connected to different audio devices. Say front and back panel. This is possibly an improvement over the first idea but still not perfect.
How do I make this work on a laptop though... playing one stream through laptop speaker and another through headphones is good enough, but so far I am not sure I can separate these hardware devices to perform as 2 audio outputs.
The only possible alternative I can think of is a some sort of streaming. Say I have a server that can provide the same video stream and two different audio streams to two separate devices. For example, if I can launch one movie on a PC or laptop and another on my android phone (or just an audio for that matter), that would be good enough of a solution, as long as the original requirement of staying in sync will be met. Maybe this can be done with something like Emby/Jellyfin?
Any ideas on what I can try?
The requirement is that the video should be controlled in such a way that no matter what I do (play, pause, stop, seek, subtitle change), audio remains in sync. At the same time, it is NOT required for an audio to come from the same player or even the same device, as long the sync is maintained.
So first I am thinking of preparing a custom 4.0 audio stream where instead of side channels would be proper front stereo channels with a different language. And then I just plug-in two pairs of headphones at the back of my PC. This could work, but I would rather have a more elegant solution and this method won't work on a laptop...
Then I am thinking of creating some custom directshow graph where a source filter will pull 2 audio streams from a container instead of one and then will feed them to different audio renderers that are connected to different audio devices. Say front and back panel. This is possibly an improvement over the first idea but still not perfect.
How do I make this work on a laptop though... playing one stream through laptop speaker and another through headphones is good enough, but so far I am not sure I can separate these hardware devices to perform as 2 audio outputs.
The only possible alternative I can think of is a some sort of streaming. Say I have a server that can provide the same video stream and two different audio streams to two separate devices. For example, if I can launch one movie on a PC or laptop and another on my android phone (or just an audio for that matter), that would be good enough of a solution, as long as the original requirement of staying in sync will be met. Maybe this can be done with something like Emby/Jellyfin?
Any ideas on what I can try?