Page 1 of 1

How to add dummy audio output for Media Element

Posted: 21 Mar 2012 21:22
by SteveO
Dear Forum,

I have struggled long and mightily to get Microsoft Media Element to consistently accept an MMS stream containing transcoded .wmv content. The goal has been to have VLC accept a "real-time" input stream (e.g. Udp), transcode it to "wmv" format, and restream it via Mms and to do so virtually real-time, i.e. with virtual zero latency between input and output streams. This has been fairly straightforward with VLC. Where the problem has arisen is having this stream of a format acceptable to Media Element. After much experimentation it appears that Media Element requires the presence of an Audio stream and perhaps one with some sort of content. When audio content is present, Media Element plays the video stream properly, when it isnt, results are varied (occasionally plays immediately, sometimes after a varying length of time, sometimes not at all). Now I did encode the video specifying an audio track in the transcode string, but it appears if one is not present in the input stream then audio is not included in the output stream, and then as indicated play of that video in Medial Element is not consistent. How to address this variance in input stream format within Silverlight/Media Element is not obvious. Sooooooooooooooo my aim is to provide Media Element a stream with audio regardless of whether one exists in the input stream. In fact at this point the audio stream content is not important for my application; the video only is of interest.

My question is how can I specify in my VLC command string the inclusion of a dummy audio stream in the output regardless of presence of audio in the input stream.

Thx for any thoughts.

Re: How to add dummy audio output for Media Element

Posted: 22 Mar 2012 12:22
by Jean-Baptiste Kempf
The simplest would be to use a input-slave of a dummy.wav file.

Re: How to add dummy audio output for Media Element

Posted: 22 Mar 2012 14:43
by Rémi Denis-Courmont
I don't think it will work without a new dedicated dummy-audio-source plugin, due to synchronization problems.

Re: How to add dummy audio output for Media Element

Posted: 22 Mar 2012 21:43
by SteveO
Gentlemen, thank you for your responses...

I just want to make sure I understand correctly...

1) If I specify audio output in a stream to stream transcode but no audio is present on the input, an audio stream, though presumably empty, will not be created?

2) Secondly if there is audio content and I dont care what it is, I should be able to do that currently, right? I did combine video and audio with FFMpeg and then tried to stream that, but Media Element did not want to play it... Is the dummy audio source plugin you referred to needed to put a desired filler pattern in the audio of some sort, or would I need this to populate with any audio?

3) Generally speaking are there some relationships between a video and audio stream that I should be aware of? I would think there would not be in general beyond the timing being as desired such as having speech synced to lip movements, though a specific client such as Media Element very well may be hard coded for certain arrangements...

Re: How to add dummy audio output for Media Element

Posted: 22 Mar 2012 23:01
by Rémi Denis-Courmont
1) Yes.
2) In principles, you can add a slave input to provide the audio channel. But if it is not synchronized with the video input, it will probably not work correctly. The dummy audio input plugin does not currently exist; that was hypotethical.
3) They need consistent timestamps. You can mix the webcam video signal with a microphone signal. You cannot mix the same real-time video with a local music file for instance.

Re: How to add dummy audio output for Media Element

Posted: 23 Mar 2012 14:22
by SteveO
Thank you - the feed back is very helpful.