I am a bit confused, is it possible to receive UDP / RTSP Streams with the Android SDK? I've searched for some solution, but obviously they are just forwarding the request to the android native player or vlc. I would like to playback a video-feed in a surface-view for example.
Is it possible to receive streams without using third-party api's like ffmpeg?
Yes, you can use e.g. the android.media.MediaPlayer class to do this. See http://developer.android.com/guide/topics/media/mediaplayer.html for more information about how to do it.
Related
folks
I have an Android app that streams videos to Wowza Server. Right now, I am using libstreaming (https://github.com/fyhertz/libstreaming) in the Android app to livestream audio and video to Wowza.
It works fine, but I am building an open source solution and I would like to stop using Wowza (since it is a payed product) and start using nginx-rtmp-module (https://github.com/arut/nginx-rtmp-module). The problem is that libstreaming does not work with rtmp protocol, and, as much as I researched, I still couldn't find a good solution on the Android side to livestream to nginx.
Does anybody know any solution to do that? Did anybody already implemented it? Thanks in advance!
You can probably use ffmpeg to convert RTP into RTMP on server side.
e.g. Pipe UDP input to FFMPEG
I'm working on a radio Android app in which I'd like to have options to rewind/fast-forward/back to live the audio stream.
It seems that it's not possible with Mediaplayer (I can't find any method to do that), so how can I do that?
The developer of the iOS version of the app is using the RadioKit SDK. Is there anything similar for Android?
I found this link that goes over some of the reasons why HTTP streaming isn't well-supported on Android. You can write your own HTTP streaming client and insert it as a proxy between the MediaPlayer and the media source, but that is the only way as far as I am aware. As far as trick mode, there is no real fast-forward or rewind protocol built into HTTP streaming. You have to simply request the correct byte from the server (see here for a little more info). The good news is it should be much easier to estimate the byte to request given a time position for audio than video (I've seen some pretty ridiculous algorithms for video).
I have to develop an application in android for audio/video conferencing. Which is the most efficient way of implementing this? While my research, I came across Android's SIP API. Can it be used for implementing the audio as well as video conferencing ? And If yes, what shall I use to stream the videos in real time? Shall I use any RTSP library for this?
Please Guide me.
Thanks,
Rupesh
Okz for my practical project i used Spydroid which use rtsp protocol sdp less. you can customize it for audio use only. i will prefer spydroid because it uses pure java in which it reads camera packets and right them to linux socket and read them from there by rtsp server.
on other hand if i am not wrong sip uses c/c++ codes too
We have enabled multicast streaming in one of our machines using VLC server. We use the following URL for streaming the multicast data.
rtp://239.1.2.11:5004 & udp://239.1.2.11:1234
But when we pass these links to the VideoView or mediaplayer in android, we get the message as "Sorry, the video can not be played".
Is it the case that multicast streaming is not supported in android? (Though multicastsocket class is present in library) or are we missing anything?
The links play well on the VLC client so we don't think there is any issue in VLC server.
We are using android v2.3 for development.
I am not at all an expert in video encoding, but I think the problem is not with the streaming, I think it is with the encoding of your videos. You should have a look at Android Supported Media Formats and make sure that your video encoding,format,resolution meet the recommendation specified there.
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.