Combine Mjpeg and PCM audio streams

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
smokeyjohnson
New Cone
New Cone
Posts: 3
Joined: 30 Jun 2009 12:47

Combine Mjpeg and PCM audio streams

Postby smokeyjohnson » 30 Oct 2009 13:47

Hi,

I'm trying to use vlc to combine a http MJpeg video stream and http pcm (Wav) audio stream. The server creating the http streams is my own creation in C# so I have control over the streams if I need to change anything.

Seperately, VLC recognises them fine and I can successfully transcode and stream output in flv format however I need to try and combine these streams into a single streamed output. I'm currently trying to use the --input-slave feature which looked like it should work however I'm finding the following:

If I treat the M-jpeg stream as the main stream and the PCM as the slave, vlc just gives me lots of "demux doesn't like demux_get_time" errors.
If I treat the PCM as the main stream and the M-jpeg as the slave I get a split second of audio after a while but then vlc basically looks like it stops accepting the input streams and everything grinds to a halt (I can see this as the console on my http server shows it isn't outputting any data).
If instead of using a PCM http stream as the slave I use a local audio file it seems to work fine so what is it about a second http input that vlc doesn't like.

I'm sure there is a whole host of things I'm not taking into account and am probably looking at it too simplistically however I don't know any other way of trying to combine two streams in vlc. Would anyone happen to have any suggestions?

I'll add the vlc output in the next message of this post to save making this first post too long.

Thanks,

Neil.

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Combine Mjpeg and PCM audio streams

Postby VLC_help » 30 Oct 2009 20:07

input-slave is ATM more work in progress stuff, and it won't work correctly in most cases (like when you try to mux with it).

smokeyjohnson
New Cone
New Cone
Posts: 3
Joined: 30 Jun 2009 12:47

Re: Combine Mjpeg and PCM audio streams

Postby smokeyjohnson » 04 Nov 2009 16:58

Hi There,

Thanks for the reply. I've now solved my problem by using vlm and the bridge functions.

I can now take the seperate mjpeg and pcm streams, combine them using a bridge, transcode them to flv and then stream them over http.

I ended up writing a little wrapper for libvlc so I could run vlm and vlc from c#. I'm not the best coder in the world and was amazed how easy it was once I'd found out about the vlm functionality.

VLC is awesome!

VLM command file to run vlm with this configuration manually is:

#mjpeg (or whatever) video stream
new video broadcast
setup video input http://192.168.0.12:10001
setup video output #transcode{vcodec=FLV1,vb=256,scale=1,acodec=mp3}:bridge-in{delay=400}:standard{access=http,mux=ffmpeg{flv},dst=192.168.0.12:10003/LiveVideo/combined.flv}
setup video enabled

#pcm audio (or whatever) stream
new audio broadcast enabled
setup audio input http://192.168.0.12:10002
setup audio output #transcode{acodec=mp3,ab=32,samplerate=11025,channels=1}:bridge-out
setup audio enabled

control video play
control audio play


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Bing [Bot] and 22 guests