x42x4b Posted September 10, 2008 Share Posted September 10, 2008 Hi,I'm in the middle of creating some simple app to chat over net. Due to I didn't found solution on the forum I posting some code, maybe someone would be looking for it.0. Webcam1. Install Windows Media Encoder 9 Series and SDK.2. Make sure that WMEncEng.dll is registered (if no just run: RegSvr32 "C:\Program Files\Windows Media Components\Encoder\WMEncEng.dll")3. ^C, ^V the code4. Run it5. Open WMPlayer with URL: http://localhost:8010Dim $WMENC_VIDEO = 2 Dim $WMENC_AUDIO = 1 Dim $WMENC_PROTOCOL_HTTP = 1 $object = ObjCreate("WMEncEng.WMEncoder") if @error then msgbox(0, "Error", "Couldn't create object! Exiting...") else $SrcGrpColl = $object.SourceGroupCollection $SrcGrp = $SrcGrpColl.Add("SG_1") $SrcVid = $SrcGrp.AddSource($WMENC_VIDEO) $SrcAud = $SrcGrp.AddSource($WMENC_AUDIO) $SrcVid.SetInput("DEVICE://Default_Video_Device") $SrcAud.SetInput("DEVICE://Default_Audio_Device") $ProColl = $object.ProfileCollection $lLength = $ProColl.Count For $i = 0 To $lLength - 1 $Pro = $ProColl.Item($i) If $Pro.Name = "Windows Media Video 8 for Local Area Network (384 Kbps)" Then $SrcGrp.Profile = $Pro Exitloop EndIf Next $Broadcast = $object.Broadcast $Broadcast.PortNumber($WMENC_PROTOCOL_HTTP) = 8010 $object.Start while 1 sleep(100) WEnd $object.Stop wEndTIP: There is a lot of samples in VB, try google some. Now it is just to write local proxy and push traffic across some server to bypass firewalls.BTW: delay of displaying stream is caused by WMPlayer settings.BTW2: looks really nice on WM6 cheers! 1. RTFM | /dev/LOL2. RTFS | /dev/OMG3. FGI | /dev/WTF4. /dev/BBQ :) Link to comment Share on other sites More sharing options...
DW1 Posted September 10, 2008 Share Posted September 10, 2008 Can a mod move this to Example Scripts please? BTW, nice script AutoIt3 Online Help Link to comment Share on other sites More sharing options...
cyanidemonkey Posted September 10, 2008 Share Posted September 10, 2008 (edited) interesting, we use WME to stream mofo fm, i just have a script that opens it and loads the stream settings file and starts the encoding, but will have to look at this, looks cool. could be a possible way for me to add streaming to the radio automation software. thx 4 sharing. Edited September 10, 2008 by cyanidemonkey My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now