1
Vote

Strem Audio with VLCDotNet , VLCControl.cs, C#

description

Hello everyone,
I'm new about VLCDotnet. I downloaded Vlc.DotNet solution in github ZeBobo5.
I want to make a multicast stream that capture sound from microphone and send to an IP. I Can not that.

RTP streaming requirement : MP3 codec
1) Codec : MPEG Audio Layer 1/2/3 (mpga)
2) Sample rate(Sample/sec) : 44100 Hz
3) Bitrate(Bit/sample) : 16, Bitrate(Bit/sec) : 128K
4) Channels : 2

My options code :
:sout=#transcode{vcodec=none,acodec=mpga,ab=128,channels=2,samplerate=44100}:rtp{dst=192.168.1.7,port=16400} :sout-keep
The other code:
  myVlcControl.myVlcMediaPlayer.SetMedia(new Uri("file:///C:/Users/Casper/Downloads/emer.mp3"), ":sout=#transcode{vcodec=none,acodec=none}:rtp{dst=192.168.1.7,port=16400} :sout-keep");
            myVlcControl.Play();
The other code:
myVlcControl.myVlcMediaPlayer.SetMedia("dshow://",":sout=#transcode{vcodec=none,acodec=none}:rtp{dst=192.168.1.7,port=16400} :sout-keep");
            myVlcControl.Play();
None of them is working. I have a problem with VlcControl class and its Play method.
it doesnt work.After run the winform and click play button. there is no reaction on the winform application.

I can make that stream with VLC Player and VLC Command Line. But I want to be special.
It will not need VLC media player. Namely embedded.


Please help me, I don't know what is the reason. Maybe Vlc.Dotnet and VlcControl does not support for stream. ????
maybe my syntax is wrong. ??
maybe version has some problems. ??

PLEASE HELP ME. THANKS IN ADVANCE.

comments

salihkaragoz wrote Feb 16 at 7:05 AM

I have solved that problems. It was about at syntax. But I can't do capture sound from microphone.

That mp3 is recorded. But I am looking real-time stream that captures sound from microphone.
myVlcControl.myVlcMediaPlayer.SetMedia("file:///C:/Users/Casper/Downloads/sting.mp3",":sout=#rtp{dst=192.168.1.7,port=16400}");