Click here to Skip to main content
15,888,733 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
package us.sosia.video.stream.agent;

import java.awt.Dimension;
import java.net.InetSocketAddress;

import com.github.sarxos.webcam.Webcam;

public class StreamServer {

/**
* @author kerr
Java


*/
public static void main(String[] args) {
Webcam.setAutoOpenMode(true);
Webcam webcam = Webcam.getDefault();
Dimension dimension = new Dimension(320,240);
webcam.setViewSize(dimension);

StreamServerAgent serverAgent = new StreamServerAgent(webcam, dimension);
serverAgent.start(new InetSocketAddress("localhost", 20000));
}

}
Posted
Comments
Sergey Alexandrovich Kryukov 24-Mar-14 18:39pm    
Usually streaming part is considered as server...
—SA
Saahyl 25-Mar-14 9:51am    
Sergey do you have a solution for streaming video from a webcam and displaying it in a window at some other client or atleast in the localhost.
Sergey Alexandrovich Kryukov 25-Mar-14 11:36am    
Before thinking at the solution, it's good to understand your problem. And even now you not explaining the scenario you want to have...
—SA
[no name] 24-Mar-14 21:31pm    
This is just a largely unformatted code dump, not a question. Maybe the author "kerr" could answer any questions about his code that you might have.
Sergey Alexandrovich Kryukov 25-Mar-14 11:35am    
Good catch...
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900