Live online video publishing

I want to program a script that publish from a camera and show the video live …

But I don need to use the sites that provide such technologies , I want to program it myself because I need so many specifications in it …

From where can I start ???

Or I can ask my question programatically :

I want to know how to handle the camera by javascript or JQUERY and capture the video stream , send it instanlty to the server , and how php will manage it ?

Does anyone have an idea ? or toturial ?

Many thanks for any trial to help …
Dr Mostafa