I need to view mjpeg stream on android device. I found mjpegview and this library. But when I configured ip address and port on its async doRead method gets stream I can see its content when debugging. But not shows in the mjpegview. I download that apk of that library from playstore it also didnt do streaming.
This app plays my stream on same device.
Any idea for that? Or suggest something ?
Related
For a school project my partner and I are trying to push video from an android tablet (Nexus 7) to a server (as an ip webcam), pull from the server into OpenCV 2.4.6, process that, send it back to a server, and have the tablet display the feed in real or near-real time.
We arent using opencv for android because the goal is for a remote user to decide how to process the video (i.e. selecting a template to match or something from the stream).
Our question is this: we have managed to get the android webcam stream onto a server as an h264 rtsp stream. All the documentation for how to pull an rtsp stream is either outdated, really confusing, or altogether non-existent. We tried using a VideoCapture object and then tried using cvCreateFileCapture but neither seem to be working. How do we do this?
There is an open source project that does precisely this combination.
Android generating the content from front or rear camera
RTSP protocol for streaming
h264
https://code.google.com/p/spydroid-ipcamera/
I'm trying to stream video from the camera on my android device. I've just followed the code in this link: Android Camera RTSP/RTP Stream?
It seems the user had a problem with the YUV decoding, to solve this I've used:
parameters.setPreviewFormat(ImageFormat.RGB_565);
to obtain preview frames on rgb format.
The logs tell that the packets are sent with no error, so what i would like to do next is to play the data stream on VLC player located on a local pc. I introduce the local ip of my pc on the code, so the packets are sent to it. But how to play them????
I'm really newby at this point and any advice could help me a lot.
Thanks.
I believe that you want to publish a stream ip with your android, this part as you are saying it is working fine. While from the PC you can open this from VLC network stream. The missing part is to find out what is the address of this published stream, assuming that the PC has access to this android link by being connected together, same wifi network ...
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 've Set up wowza streaming server in my ubuntu box for RTSP streaming video files. The video gets stream perfectly when I 've Totem video player at client side. The same url or video is failing to work on android device and the application that tries to access that rtsp url breaks with Mediaplayer error (1,-1).
I recently also set up a Wowza streaming server, and had three things trip me up before I could get it to work. One or more of these may help you out.
Wowza Settings:
1) In the Vhost.xml file, make sure that <port>1935</port> is changed to <port> 1935,554 </port> (You may have to use ROOT to start the Wowza server after this. 554 is a reserved port for RTSP streaming).
2) In the Application.xml file make sure PlayMethod is set like this: <PlayMethod>none</PlayMethod>
In your Android Code:
3) In your Android code, the URL needs to follow the format rtsp://serverip/live/myStream.sdp
so NO port number in the URL. This is the one that tripped me up the longest.
After this, I was able to play my video by passing the url right to the MediaPlayer.
I'm trying to install a Wowza server on my Linux machine to enable the RTSP streaming for my Android application.
On Android client side what sort of changes do I need to make in my application? I'm using Videoview to simply play a video file stored locally.
Now I want to get the video content get streamed through the server that I've installed. If necessary I can move to any other streaming server as right now I'm doing a research on streaming servers.
For rtsp streaming you can also try following servers:
Darwin Streaming Server - linux package is available
Windows Media Services - can be installed on Windows Server Trial
VLC - standalone application
For testing purposes of your application i would also recommend you to use existing mobile video services like:
m.youtube.tv
m.wp.tv
You can extract video links from those sites and use them to test your application.
Try to follow Android ApiDemos, you can find video streaming player example at:
...android-sdk-windows\platforms\android-x\samples\ApiDemos\src\com\example\android\apis\media\MediaPlayerDemo_Video.java
VLC+Android Owns.
I used the following one-liner to stream video of our kittens to our cell phones.
We used the launchRTSP free app to leverage the built-in RTSP viewing capabilities of Android, to access the URL over the internet.
You may want to tweak the frame rate and such. As shown below, it's perfect for webcam streaming.
vlc -vvvvvvvvvvvvvvvvvvvvvvv -I dummy v4l2://:vdev=/dev/video:width=640:height=480:fps=2 --sout "#transcode{vcodec=mp4v,fps=5,vb=800,acodec=mpga,samplerate=8000,ab=64,deinterlace,channels=1,sfilter='mosaic:marq{marquee=%m-%d-%Y_%H:%M:%S,size=16,color=16711680,position=5,opacity=64}'}:rtp{sdp=rtsp://0.0.0.0:5858/kittens.sdp}"
WCS4 server can deliver WebRTC stream as RTSP.
So you can send WebRTC live stream from Android or desktop Chrome/FF browser and then connnect to this stream via VLC or Android by RTSP.