This project is read-only.

Separated Audio and Video streams.

Topics: Windows 8 Xaml
May 15, 2014 at 1:11 AM
Hello, i'm not sure if it was asked before but let's say i have a stream of a video without audio and then i have another stream of the audio in a different language or whatever. Is there a way to load both streams and synchronize the audio to the video? both the audio and video have the same lenght of course.

Thanks in advance.
May 16, 2014 at 11:30 PM
I'm also looking for an answer to this question.
May 17, 2014 at 9:21 PM
You will probably want to take a look at MediaStreamSource for WP8 or WinRT/WinPRT starting with version 8.1.

For Windows 8, you would probably need to muck with the media foundation pipeline at a pretty low level: Writing a Custom Media Source.
May 25, 2014 at 4:39 PM
Edited May 25, 2014 at 5:03 PM
Thank you very much henric. I will check it out and work in a solution later... in the mean time i've solved the problem myself using a secondary instance of the MediaElement for the audio stream which i manually synchronize taking in consideration position, buffering state and others to avoid loop or out of sync issues between video and audio. So far is working flawlesly but i will eventually replace it with a proper method later(obviously a temp solution). Also i noticed that if you play a video and a audio file using two instances of the Framework Media Player the position of both get out of sync after a while even if you synchronize them. Wondering why that happens as if both players are playing at the same position and time i see no reason why one should go ahead in its position(milliseconds).