Page 1 of 1

Combine video (from DShow) and audio (from RTP stream)

Posted: 08 May 2012 10:03
by Titanic
Hi everybody,

Does somebody know a way to comine a video input from DShow and an audio input from a RTP stream (mp4a) to a single network stream? I've tried with the MRU dshow:// (video device set to my video source and audio set to none) and the option input-slave (:input-slave=rtp://10.0.3.109:5555) for the audio stream but I only get a network stream containing the video but no audio.

Any help would be much appreciated.

Re: Combine video (from DShow) and audio (from RTP stream)

Posted: 08 May 2012 10:18
by RĂ©mi Denis-Courmont
VLC would not be able to synchronize the two streams, since they intrinsically use different reference clocks.

I don't see how this could possibly work, sorry.

Re: Combine video (from DShow) and audio (from RTP stream)

Posted: 08 May 2012 10:20
by Titanic
Thx for the quick answer. Seems like I've to find a different solution.

Re: Combine video (from DShow) and audio (from RTP stream)

Posted: 08 May 2012 10:37
by Titanic
Perhaps using VLC to transcode my DShow video source to a network stream and then combine it with the audio stream would work? I know that this will for sure kill the sync between audio and video but to be honest: The timing is already out of sync when I'm accessing the two sources so it doesn't make a big difference if it even gets a little bit more out of sync as it already is. Could such a solution be made with a single player instance or do I have to create a chain of player to achive this goal?

Perhaps somebody can think of a different and/or even better solution than this one?

Re: Combine video (from DShow) and audio (from RTP stream)

Posted: 29 May 2012 10:39
by jichi
If you are using C++, I suggest you to look into the source code of live555. Especially how it deals with two streams together demuxed from a MKV file. As live555 is under lgpl, I think u could just grab the code you want. I have done similar things before in live555 even without VLC.

Re: Combine video (from DShow) and audio (from RTP stream)

Posted: 29 May 2012 10:45
by Titanic
I've now used VLM to playback both streams (DShow and UDP) and combine them with the bridge framework (:bridge-in and :bridge-out). Works perfectly fine and by using the caching parameters for the playbacks, the sync can also be restored pretty easiely.