I saw VLC media player which is very very good
I need to stream audio on the LAN using C# (ASF format) as in VLC Player (the wizard)
I dont know how to write the required code for that... plz help me
Code: Select all
Code: Select all
Code: Select all
Private Sub Connect_Command_Click()
Dim opt() As Variant
Dim connect_string As String
connect_string = "C:\\test.avi"
opt() = Array(":sout=#transcode{vcodec=WMV2,vb=512,scale=1,acodec=mpga,ab=64,channels=2}:duplicate{dst=display,dst=std{access=http,mux=ts,dst=192.168.9.144:1234}}")
VLCPlugin1.addTarget connect_string, opt(), VLCPlaylistMode.VLCPlayListReplaceAndGo, -666
End Sub
Code: Select all
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Variant V("":sout=#transcode{vcodec=WMV2,vb=512,scale=1,acodec=mpga,ab=64,channels=2}:duplicate{dst=display,dst=std{access=http,mux=ts,dst=192.168.9.144:1234}}"");
char *connect_string;
connect_string = "C:\\test.avi";
VLCPlugin1->addTarget(WideString(connect_string), V, 12, -666);
VLCPlugin1->play();
}
I only have VB and BCB Sample.
You can see and try by it.
VB6BCB6Code: Select all
Private Sub Connect_Command_Click() Dim opt() As Variant Dim connect_string As String connect_string = "C:\\test.avi" opt() = Array(":sout=#transcode{vcodec=WMV2,vb=512,scale=1,acodec=mpga,ab=64,channels=2}:duplicate{dst=display,dst=std{access=http,mux=ts,dst=192.168.9.144:1234}}") VLCPlugin1.addTarget connect_string, opt(), VLCPlaylistMode.VLCPlayListReplaceAndGo, -666 End Sub
The vcodec, acodec and access setting you can get by VLC mdeia player in "stream/save" function.Code: Select all
void __fastcall TForm1::Button1Click(TObject *Sender) { Variant V("":sout=#transcode{vcodec=WMV2,vb=512,scale=1,acodec=mpga,ab=64,channels=2}:duplicate{dst=display,dst=std{access=http,mux=ts,dst=192.168.9.144:1234}}""); char *connect_string; connect_string = "C:\\test.avi"; VLCPlugin1->addTarget(WideString(connect_string), V, 12, -666); VLCPlugin1->play(); }
There are "Outputs", "Encapsulation Method" and "Transcoding options" that you can try.
The IP and Port ypu can change by your own setting.
Code: Select all
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim opt As Object
Dim connect_string As String
opt = ":sout=#duplicate{dst=display,dst=std{access=http,mux=ts,dst=192.168.0.144:1234}}"
connect_string = "C:\\test.AVI"
AxVLCPlugin1.addTarget(connect_string, opt, AXVLC.VLCPlaylistMode.VLCPlayListReplaceAndGo, -666)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
End Class
Thanx for your response....
Dude, can I ask you a question?
In broadcasting over the LAN (network) the only thing that known is the server IP address with the Port, this means that the client(s) IP(s) is (are) unkown....
Are you understanding me??
the code you sent does not broadcase (or maybe i cant use it!!!)
I put it in VB button and I run the application and i click the button, everything is OK without any exceptions, the sound goes from the speakers of the server!!!
I start another PC and I start Windows media Player and i open URL, i put the IP of the server with the written port (1234) but it tells me that there is no thing to open or the server is busy or not responding...
Maybe your port 1234 is blocked by your router on the server or on the client or by a software firewall.
Maurice
Users browsing this forum: No registered users and 8 guests