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

This forum is about all development around libVLC.
Titanic
Blank Cone
Blank Cone
Posts: 33
Joined: 14 Sep 2010 10:12

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

Postby Titanic » 08 May 2012 10:03

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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

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

Postby Rémi Denis-Courmont » 08 May 2012 10:18

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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Titanic
Blank Cone
Blank Cone
Posts: 33
Joined: 14 Sep 2010 10:12

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

Postby Titanic » 08 May 2012 10:20

Thx for the quick answer. Seems like I've to find a different solution.

Titanic
Blank Cone
Blank Cone
Posts: 33
Joined: 14 Sep 2010 10:12

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

Postby Titanic » 08 May 2012 10:37

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?

jichi
New Cone
New Cone
Posts: 3
Joined: 30 Jun 2011 09:58

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

Postby jichi » 29 May 2012 10:39

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.

Titanic
Blank Cone
Blank Cone
Posts: 33
Joined: 14 Sep 2010 10:12

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

Postby Titanic » 29 May 2012 10:45

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.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 7 guests