I am using IP Cam (an app for android phones) to stream live video. It basically functions as a basic IP camera. It gives me a URL where the feed is. It looks like this http://192.168.2.32:8080/ when I'm connected to my WiFi network. The video stream is at http://192.168.2.32:8080/videofeed.
I want to capture the video feed of the camera which is at http://192.168.2.32:8080/videofeed and embed it in an HTML5 player (the one I plan to use is Video JS) or a Flash player if the HTML5 doesn't work (prefer HTML5 though). The HTML5 player is asking me for a source file (such as .mp4, webm, mov, etc) but at http://192.168.2.32:8080/videofeed there is no source file. It's just HTML stream.
My question is how to I embed that video stream into my HTML5 player and post it on my website.
From what I could see, the streaming is already made by the app to a webpage and this page has the video for you to see. So you want to stream something that's already streaming.
You could try to signup for a dynamic dns like www.no-ip.com to get a url for your network, change your router to accept incoming connection on port 8080 and then use an iframe on your website with the dynamic dns url.
I used to stream a lot of live concerts to websites, but I had a camera connected to a computer and using Adobe Flash Media Streaming (free) connected to a server running Wowza streaming.
You need to get the data that camera is capturing decode it to some common format.
RGB or YUV2 or whatever. Encode it to Vp8/webm or thora/ogg . h264/Mp4 wont do it as it needs a special header in the mp4 file called mdat(unless it is fragmented mp4).
Client video tag makes the request to your phones ip/where you handling the http GET for that app hold that http connection and start streaming to it. This is sort of like long polling.
Most IP cameras have a way to get the raw stream of video. Using RTSP or RTMP
I suggest you get the steeam URI for the «camera», which would be something like rtsp://<camera-ip>:<some-port> or rtmp://<camera-ip>:<some-port>. That is a common feature of IP cameras, even those emulated on a phone, so probably it is mentioned on the docs or can be enable/set on the app configuration.
If there is no documentation, you can do some research by using Chrome to access the feed on the webpage and open the developer tools to see the actual code for the page, the URI may be visible on the embedded player they provide.
Once you get it, open that stream with VLC and see the properties (encoding, framerate, size, etc) and with that you can choose a compatible embedded player for your site.
Hope it helps!
///Pablo
Related
I'm making a Cordova app for Android and iOS which needs to embed and record streaming video from an IP camera. I'm testing with a D-Link DCS-4701E.
An <img> tag can show the mjpg source, but a <video> tag cannot. Nor will it when set to H.264 mode.
I've found several solutions which will open the stream in the native player, but I need it embedded.
These IP cameras also need to be secured and I don't know how to authenticate. Putting it in the src attribute like http://{username}:{password}#{ip}/{whatever} doesn't work on Android or Chrome, though it does in Firefox. That doesn't seem like good security anyway.
I've looked at some other web cam streams and on Android they either give me a direct link to an rtsp:// to open in the native player, or the don't work at all.
So to sum up I have three problems:
I need to authenticate a connection to an IP camera stream.
I need to display that video.
I need to record that video.
A good solution would make it work in a <video> tag because then I can use video.js and plugins to record.
Thanks
I searched a lot over the web for the below requirement but didn't get any sample code or correct solution.
Basically I want to connect my android mobile to a linux desktop via USB and want to live stream a video that i play in my mobile(i m gonna use video view that loads a video from a weblink/assets folder).
if I play a video from my mobile that should be get played on desktop at the same time.
I would be grateful if u provide an API or source code with example/reference links.
I want to create a live-stream by using vlc on rtp, (preferably) rtsp or http protocols and I want to play this stream with android 2.3.4 based cell phone. I have tried starting from scratch and tried to advance step by step. I have created an html5 based offline streaming page, and it worked. However, I have some trouble with live streaming issues. I have noticed that live-streaming with html5 will be painful. So, I wanted to get the stream directly from vlc.exe to the media player on the phone. However, I couldn't decide what to do because vlc for android is in development right now, and couldn't find a suitable player which allows me to enter the address of the vlc server.
What should I do? Should I continue trying on html5, or should I try to find a suitable application for rtsp streaming on android? Should I try Wowza or another service? (BTW, I don't want to mess with socket stuff on the server side.)
I have solved this problem by streaming the content from vlc on rtsp from the PC and created a very basic html page which gives only a link to the rtsp stream. Then, I clicked the link from that html page using the phone (actually I can carry out this step by simply writing the ip address of the server to the streaming player on the phone also) and it forwarded me to choose an external media player to play the content. In this step, choosing any streaming media player (RealPlayer, MX Player etc.) can be used to play this content. There we go! We have a live-streaming from PC to Android :)
I want to know is it mandatory to use any of the streaming servers like Darwin,Wowza or VLC to stream an RTSP live stream video? I am receiving an RTSP link from my client and it tends to change everytime. I can successfully play it in the VLC player but on phone I cant see anything. I tried playing a sample link having .3gp extension and it worked fine. But my links dont have an extension. They look like this rtsp://122.166.229.151:1950/1346a0cf0ef7c2. Please help me.If its compulsory to use an extension or a server, I will continue working in that direction.
A streaming server (as you describe) isn't strictly necessary - as long as you can pull RTSP from whatever your source is, you should be able to see it. Most IP cameras have onboard RTSP servers (although I wouldn't put too many connections on it). If you can see it in VLC, the phone should be able to consume it as well, given that the codec used to encode is one supported by the android device (in most cases, if you're doing H.264 Baseline 3.0 with AAC, you should be good to go).
A streaming server like Wowza can make that stream available to a wider audience than pulling directly from the source device, but if you're not intending to broadcast to a wide audience, it's not required for streaming to Android devices.
Newer versions of Android (Gingerbread and later) are also able to consume Apple HTTP Live Streaming.
I would like to develope a application for viewing a IP camera , DVR video feeds from my own application. Can anyone please tell me the best possible way to achieve it so that the delay is as minimum as possible. What all servers are required to stream the video the formats etc..
androidfan , I believe you need to setup a media server to send & receive video streams.
Red5 will be a good option in your case.
Red5 is an Open Source Flash Server written in Java that supports: Streaming Video , Audio & RTMP protocols.