sarxos / webcam-capture

The goal of this project is to allow integrated or USB-connected webcams to be accessed directly from Java. Using provided libraries users are able to read camera images and detect motion. Main project consist of several sub projects - the root one, which contains required classes, build-in webcam driver compatible with Windows, Linux and Mac OS, which can stream images as fast as your camera can serve them (up to 50 FPS). Main project can be used standalone, but user is able to replace build-in driver with different one - such as OpenIMAJ, GStreamer, V4L4j, JMF, LTI-CIVIL, FMJ, etc.
http://webcam-capture.sarxos.pl
MIT License
2.27k stars 1.11k forks source link

Unable to stream video over public Network #508

Open joginderMalik opened 8 years ago

joginderMalik commented 8 years ago

Hello I used https://github.com/sarxos/webcam-capture/tree/master/webcam-capture-examples/webcam-capture-live-streaming this link and its working properly when we do streaming on a private Network. Issue: i want to do live streaming from few webcams to a single machine. All machine are on public network and there is a router in between. To do this If i have a static public IP from ISP end and i have to forward port 20000 manually.

But if there is no static ip then this code doent work. I spent around 10 days on this but no luck yet. Finally expecting a smart idea from all of you. Thanks in advance joginder.malik20@gmail.com

sarxos commented 7 years ago

The only option I see is to stream from camera to some sink server in public network where stream is re-encoded and made public. However there is no such possibility with the existing implementation. Hopefully someone can implement this mechanism and share it to the community.

joginderMalik commented 7 years ago

Hey Thanks for your reply over. I have found a solution to stream over public network too, I used socket programming to achieve it.

Simply start a ServerSocket then we write buffered image into output stream and get buffered images into input stream on client side.

It is working now.

Thanks regards Joginder malik insan

On Tue, Nov 29, 2016 at 7:08 PM, Bartosz Firyn notifications@github.com wrote:

The only option I see is to stream from camera to some sink server in public network where stream is re-encoded and made public. However there is no such possibility with the existing implementation. Hopefully someone can implement this mechanism and share it to the community.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sarxos/webcam-capture/issues/508#issuecomment-263571872, or mute the thread https://github.com/notifications/unsubscribe-auth/AMKv4yXA-ZtjaBr81gdNDUQEOdvOsNwqks5rDCrLgaJpZM4KqfTs .

-- regards Joginder Malik 0783-69222-69

sarxos commented 7 years ago

That is great :) Thank you for the info!

rakkatak commented 7 years ago

@joginderMalik would it be possible to see some code samples? thank you! anita

joginderMalik commented 7 years ago

Hi, i do have a lot of code for different functionalities. We achieved the same in web app and standalone app as well. Going forward please mail me up your requirement that will help me in sharing the relevant/Exact code. download below zip file :-

Streaming.zip

email :- joginder.malik20@gmail.com