How can I stream on LAN???

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
Ibrahim Dwaikat`
New Cone
New Cone
Posts: 8
Joined: 09 Sep 2007 22:44

How can I stream on LAN???

Postby Ibrahim Dwaikat` » 10 Sep 2007 18:13

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

bobbook
New Cone
New Cone
Posts: 6
Joined: 03 Jan 2007 04:43
Location: Taiwan

Re: How can I stream on LAN???

Postby bobbook » 11 Sep 2007 10:39

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.

Ibrahim Dwaikat`
New Cone
New Cone
Posts: 8
Joined: 09 Sep 2007 22:44

Re: How can I stream on LAN???

Postby Ibrahim Dwaikat` » 11 Sep 2007 20:33

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

bobbook
New Cone
New Cone
Posts: 6
Joined: 03 Jan 2007 04:43
Location: Taiwan

Re: How can I stream on LAN???

Postby bobbook » 12 Sep 2007 04:15

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.

Ibrahim Dwaikat`
New Cone
New Cone
Posts: 8
Joined: 09 Sep 2007 22:44

Re: How can I stream on LAN???

Postby Ibrahim Dwaikat` » 21 Sep 2007 01:16

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.

bobbook
New Cone
New Cone
Posts: 6
Joined: 03 Jan 2007 04:43
Location: Taiwan

Re: How can I stream on LAN???

Postby bobbook » 28 Sep 2007 07:54

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

Ibrahim Dwaikat`
New Cone
New Cone
Posts: 8
Joined: 09 Sep 2007 22:44

Re: How can I stream on LAN???

Postby Ibrahim Dwaikat` » 07 Oct 2007 21:50

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:

thewebnsoft
New Cone
New Cone
Posts: 1
Joined: 09 Oct 2007 09:39

Re: How can I stream on LAN???

Postby thewebnsoft » 09 Oct 2007 13:28

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

Ibrahim Dwaikat`
New Cone
New Cone
Posts: 8
Joined: 09 Sep 2007 22:44

Re: How can I stream on LAN???

Postby Ibrahim Dwaikat` » 11 Nov 2007 00:12

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:

divx118
Blank Cone
Blank Cone
Posts: 95
Joined: 22 Jun 2006 18:19

Re: How can I stream on LAN???

Postby divx118 » 11 Nov 2007 08:40

Maybe your port 1234 is blocked by your router on the server or on the client or by a software firewall.

Maurice 8)

Ibrahim Dwaikat`
New Cone
New Cone
Posts: 8
Joined: 09 Sep 2007 22:44

Re: How can I stream on LAN???

Postby Ibrahim Dwaikat` » 12 Nov 2007 22:57

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)


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 8 guests