Page 1 of 1

How can I stream on LAN???

Posted: 10 Sep 2007 18:13
by Ibrahim Dwaikat`
Hi...


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

Re: How can I stream on LAN???

Posted: 11 Sep 2007 10:39
by bobbook
I only have VB and BCB Sample.
You can see and try by it.
VB6

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
BCB6

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(); }
The vcodec, acodec and access setting you can get by VLC mdeia player in "stream/save" function.
There are "Outputs", "Encapsulation Method" and "Transcoding options" that you can try.
The IP and Port ypu can change by your own setting.

Re: How can I stream on LAN???

Posted: 11 Sep 2007 20:33
by Ibrahim Dwaikat`
thank you for your response

I tried VB.NET code but it gives me an error while compiling

the error is about (VLCPlugin1)

form where I can download VLCPlugin??

i searched the site and the forum and the wiki and i didnt find it

plz help me

Re: How can I stream on LAN???

Posted: 12 Sep 2007 04:15
by bobbook
The code is for VB6 and BCB6.
In VB.NET 2005, you can add VLC by useing "Tools"->"Choose Toolbox Items"->"COM Components".
Add "VideoLAN VLC ActiveX Plugin" and press "OK".

Use the new icon for VLC in your form and you will see it name in properties.
Then you can change name in here.

Re: How can I stream on LAN???

Posted: 21 Sep 2007 01:16
by Ibrahim Dwaikat`
Thanx alot for your response

I tried this code but it streams only on my local machine (same PC)

I need to stream (broadcast) over the network, the destination address is unknown for me, I want to make something like (Radio Broadcasting) or (Radio streaming) (not peer to peer), this thing available with "VLC media player" software under (File -> Wizard) then stream to network using stream method "Http", I prefer Http but no problem if i use RTP multicast...


Waiting for any help


thank you

I only have VB and BCB Sample.
You can see and try by it.
VB6

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
BCB6

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(); }
The vcodec, acodec and access setting you can get by VLC mdeia player in "stream/save" function.
There are "Outputs", "Encapsulation Method" and "Transcoding options" that you can try.
The IP and Port ypu can change by your own setting.

Re: How can I stream on LAN???

Posted: 28 Sep 2007 07:54
by bobbook
Sorry.
I have a little busy.
Now I can stream on LAN.

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

Re: How can I stream on LAN???

Posted: 07 Oct 2007 21:50
by Ibrahim Dwaikat`
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...



:cry: :cry: :cry: :cry: :cry:

Re: How can I stream on LAN???

Posted: 09 Oct 2007 13:28
by thewebnsoft
Hi all,

I am new to php & videolan both. but just curious to play with some streaming (planing to get a youtube replica). Do anyone have some kind of sample code which is giving streaming vidoe output on internet. I hae my own server and i can setup the things on server just need the sample code..??

Thx a lot..

Re: How can I stream on LAN???

Posted: 11 Nov 2007 00:12
by Ibrahim Dwaikat`
Any other help??? :? :?

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



:cry: :cry: :cry: :cry: :cry:

Re: How can I stream on LAN???

Posted: 11 Nov 2007 08:40
by divx118
Maybe your port 1234 is blocked by your router on the server or on the client or by a software firewall.

Maurice 8)

Re: How can I stream on LAN???

Posted: 12 Nov 2007 22:57
by Ibrahim Dwaikat`
Maybe your port 1234 is blocked by your router on the server or on the client or by a software firewall.

Maurice 8)

I dont think, cuz Windows asked me to (Block) or (Unblock), i chose (Unblock)