How to add dummy audio output for Media Element

About encoding, codec settings, muxers and filter usage
SteveO
Blank Cone
Blank Cone
Posts: 32
Joined: 01 Dec 2011 22:46

How to add dummy audio output for Media Element

Postby SteveO » 21 Mar 2012 21:22

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.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: How to add dummy audio output for Media Element

Postby Jean-Baptiste Kempf » 22 Mar 2012 12:22

The simplest would be to use a input-slave of a dummy.wav file.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

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

Re: How to add dummy audio output for Media Element

Postby Rémi Denis-Courmont » 22 Mar 2012 14:43

I don't think it will work without a new dedicated dummy-audio-source plugin, due to synchronization problems.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

SteveO
Blank Cone
Blank Cone
Posts: 32
Joined: 01 Dec 2011 22:46

Re: How to add dummy audio output for Media Element

Postby SteveO » 22 Mar 2012 21:43

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...

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

Re: How to add dummy audio output for Media Element

Postby Rémi Denis-Courmont » 22 Mar 2012 23:01

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

SteveO
Blank Cone
Blank Cone
Posts: 32
Joined: 01 Dec 2011 22:46

Re: How to add dummy audio output for Media Element

Postby SteveO » 23 Mar 2012 14:22

Thank you - the feed back is very helpful.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 17 guests