Host a streaming webcam on website with VLC/Red5 or whatever - java

I currently have a website that i am running at my home based on Java/SpringMVC web server.
I want to stream my webcam to my website so i can connect to it where ever i am from a browser and see my room.
Does anyone know an easy solution/server to use to do this and how to capture this in HTML.
Maybe a guide or sample project or something. I cant find anything useful/straight forward on Google.
I have already tried Red5/VLC as a media server but have had no luck so far capturing the video on a webpage. (using html5 video tags on chrome.)
I need to have this embedded in my home website. So it has to be browser based
I have decent Enterprise Java skills but streaming video is kind of new to me.
Thanks

Yes, you can stream a webcam to a website via multiple ways.
use Windows media Server/ Flash media Server. Push your webcam to the server by Windows Media Encoder or flash media encoder, and use the server live link to link with your website via any suitable player (like jwplayer).
Use Windows Media Encoder to stream your webcam to anyone without a server involved. when your encoder starts, you will get a URL to view your stream, which you can use to publish in your site.
use third party streaming services, where they give you a publishing point to publish your webcam stream, and use the link provided by them to show it on your website. (check with brighcove or Mogulus by LiveStream
Hope this helps.

Related

What is the technique behind live streaming from security camera to web pages when using Java?

I have done researches on Google, many posts and answers gave me ready-to-use packages or the example is not in Java. I am not looking for solutions to this question.
I want to understand how live streaming from security camera on the web pages can be implemented and in Java.
First of all, there is no video file recorded beforehand because it is about live streaming from security camera. But one should be able to watch the video later on as well.
My questions are:
Do I always need to record the video first and use that video on the web page so that video can be live-streamed and can be watched later on? Or live streaming and video recording/saving in a file can be in two separate processes?
Is WebSocket Server the only solution to push video data to the web browser continuously?
In case of WebSocket Server pusing video data to the web browser, what kind of data should be pushed to the web browser?
On the web page, must I use the <img> tag to show the live-streaming video?
Solution 1: From the post below, the Java WebSocket Server pushes the ByteBuffer object containing byte data to the web browser. But this solution first takes video data from the web browser (client), sends the data to the WebSocket Server and then just receives the converted version of data back. It is like a round trip.
https://javawebsocketsvideo.blogspot.com/
Solution 2: And this code sample shows that Java Server sends DatagramPacket object containing byte data to its client. But this solution works with existing video file (not live-streaming) and its client is not a web page.
https://github.com/ramanbuttar/video-streaming/blob/master/Server.java
That's why these solutions did not clear my questions.

How to prevent 'Packet Capture' from getting url of video play using exoplayer library in android app

I am using the exoplayer library in an android app to play video hosted on a server. I found that anyone can get and download video easily.
If I use a token and send as header, it can be captured by the 'Packet Capture' app.
Is there any way to prevent such data leaks.
No.
If your data (video in your case) is hosted on a server, the server should ensure that the requesting party (your application) is correctly identified.
If this is a static identification (your token), it will always be available a way or another.
The only solution to protect such content is authentication (either of the user, or the application) but once you are authenticated and authorized to retrieve the data, you lose control over it.
The solutions which were developed to solve the problem of data in the wild are called DRM (Digital Rights Management) and are more or less effective. In any case in the simple case of your video being played by a player for everyone using your application you will not be able to protect it easily.

How to download images from mobile application using webdriver\appium?

How to download images from mobile application using webdriver\appium?
for example: whatsapp, amazon
If the sole purpose of your task is to download some images that are coming in through a Native app like Amazon or Whatsapp, you don't need a high level framework like Appium or web driver. You can accomplish that task through network layer.
To start with, While browsing through the images that you are interested in hook up Fiddler or Charles proxy, enable SSL proxying, install root cert etc. to see what are the HTTP requests that are giving the images.
You can mimic the exact same thing using network requests in your favorite programming language.
I suggest you look at HtmlUnit library.
After you added the library, the code will looks like:
File fileToSaveImage = new File(dirToSave, normalizedName);
HtmlImage elementHtmlImage = (HtmlImage) pageWithImage.<HtmlImage>getFirstByXPath(X_PATH_FOR_IMAGE);
elementHtmlImage.saveAs(fileToSaveImage);
Of course you have to care about X_PATH_FOR_IMAGE, but I am sure it can be generalized by some site-specific pattern.

How do I upload a file(picture) from android and save to the blobstore using GAE and google endpoints?

Sorry if this is a little general. Hopfully I can get pointed in the correct direction.
I have an android app that includes instant messaging. I want to add the functionality to send photos in messages as well. My backend is built on GAE and cloud endpoints and is written in Java.
So far, I've looked into google cloud storage, the blobstore, java servlet pages, etc. But a clear solution (or example using endpoints) has been impossible to find.
So, as the question states, how can I send and serve images from the blobstore using android and GAE endpoint backend?
Edit: This question is only regarding the back end. In android, I can do the http post easily enough. I'm just lost when it comes to doing this in endpoints
I suggest the following approach to implement what you require:
Pass the image data as base64 encoded text from your client.
On the server side, you can extract out the image content and then use one of many options that are available, which include Blobstore, Google Cloud Storage, etc. I suggest that you go with Google Cloud Storage because that is the recommended approach. If you prefer the Datastore, keep in mind that the data is limited to 1 MB in size, so you might hit that limit depending on the size of images that you are dealing with.
A SO question and answer here contains lot of relevant code that you could utilize: Sending images as a base64 string to a google cloud endpoint from cms
Why not using a simple HTTP POST to handler for image upload?
When I use the blobstore I typically have a pair of handlers one for uploading and one for serving images.
So, in your case I'll rather do a post to a URL sending the image file and some parameter than can link it to the proper place in the datastore (i.e. user ID).
Then, using endpoints I'll have the same linking key and display the image using the serving handler with the given parameter.
If you are already using endpoints you can follow #Romin 's suggestion and send the images as Base64 or upload your images in 2 steps using the blobstore/GCS service, first get the Upload URL (via endpoints) and then post your image to that URL.

Java RTSP get contents

Can I download the contents from an RTSP url in java? Just like we can get contents of an HTTP url as an InputStream...
Thanks
Chris
Java uses "protocol handlers" to determine how to retrieve the resource identified by a URL. It's not limited just to the HTTP/HTTPS.
Apparently the Java Media Framework API can access RTSP resources. I don't know if it installs a protocol handler for RTSP or if it uses some different strategy. Google for Java Media Framework RTSP for all the details.

Categories

Resources