I need to stream RTSP links within a VideoView, and in the case of RTSP links with a .mov output such as rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov work fine. However, this one RTSP link I got from someone confidential has a h264 output according to what VLC Player says.
TL;DR how do you implement the streaming of these type of RTSP links and if there's no clear way to code it, are there any external libraries for Android Studio that easily this because I'm kinda at my loss here.
EDIT: Changed title. Streaming can be interpreted differently as in sending RTSP videos from your Android. That's NOT what I want to accomplish. A lot of examples on GitHub are heavily focused on the SD Card Storage and sending it outward, but I am still looking a way to play RTSP videos with h.264 output in my application.
Try to use MediaPlayerSDK from VXG. That is the only one that seems to be working and is open source.
https://github.com/VideoExpertsGroup/MediaPlayerSDK
However as per some posts this can be done using libFFMPEG as well. I didnt try it, but you can give it a try.
I have spent enough time searching for a solution but I am not sure which way I should go. That is why I am asking question here.
I want to make an application from where I can record a video and same video will be shown live on any other device connected to the network or it can be on web using JWplayer or some thing like that.
Now I have done enough R&D and we are not considering WOwza server (as it is paid) . So on web side we have already implemented in which web cam in recording video and which can be seen on our web site and also on android and iphone browsers live.
But problem with red 5 is that is does not give support to RTSP (it only supports RTMP) unlike Wowza which handles RTSP internally and convert it into RTMP.
I have found few links who suggested client side RTMP handling what so far no success.
Convert video Input Stream to RTMP
This links explains lot of things but I am not sure which way I should spend my time or it is possible to convert RTSP into RTMP for red 5 server.
https://play.google.com/store/apps/details?id=air.Broadcaster
this guy has achieve this functionality I guess but we are looking for the native application.
Please suggest me in the right direction I should go and invest my time live record and watch video stream.
We can use other servers which are open source rather than red 5 , if it fulfill my needs on both iOS, android and web else I ll have to go with wowza which I dnt want for now.
Did anyone manage to save a rtsp video stream (h264 mpeg) using Jcodec?
Could you please give me an example?
Also any other method of saving a rtsp stream on an android device would be of great help.
Please don't include any solution that requires device specific compilation ( ffmpeg, by example, is not ok, because it needs to be compiled for the specific arm version).
So I need a pure java solution, if not Jcodec.
I had the same problem!
I'm using ffmpeg on my server and save all video.
Next I save the video on the device calling it to server.
I'm trying to play video file on a remote server. Video format is flv and server is Flash Media Server3.5.
I'm going to connect to server over RTMP and to implement the palyback of video file using Android Media Player.
Really,is it possible? Any help is my pleasure.
http://www.aftek.com/afteklab/aftek-RTMP-library.shtml
I found this one, but haven't had much luck, there are very few docs and after jigging it to try and support Video (no examples as i can see) i found that the core method RtmpStreamFactory.getRtmpStream(); failed.
This one has also cropped up, but i haven't looked at this yet.
http://code.google.com/p/android-rtmp-client/
It looks like that for me i'll be looking at getting the media server to deliver rtsp instead and this is supported by android. You may also find that later versions of Android i.e. 3> support rtmp.
Closed. This question needs to be more focused. It is not currently accepting answers.
Closed 1 year ago.
Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
I've seen plenty of info about how to stream video from the server to an android device, but not much about the other way, ala Qik. Could someone point me in the right direction here, or give me some advice on how to approach this?
I have hosted an open-source project to enable Android phone to IP camera:
http://code.google.com/p/ipcamera-for-android
Raw video data is fetched from LocalSocket, and the MDAT MOOV of MP4 was checked first before streaming. The live video is packed in FLV format, and can be played via Flash video player with a build in web server :)
Took me some time, but I finally manage do make an app that does just that. Check out the google code page if you're interested: http://code.google.com/p/spydroid-ipcamera/
I added loads of comments in my code (mainly, look at CameraStreamer.java), so it should be pretty self-explanatory.
The hard part was actually to understand the RFC 3984 and implement a proper algorithm for the packetization process. (This algorithm actually turns the mpeg4/h.264 stream produced by the MediaRecorder into a nice rtp stream, according to the rfc)
Bye
I'm looking into this as well, and while I don't have a good solution for you I did manage to dig up SIPDroid's video code:
http://code.google.com/p/sipdroid/source/browse/trunk/src/org/sipdroid/sipua/ui/VideoCamera.java
I've built an open-source SDK called Kickflip to make streaming video from Android a painless experience.
The SDK demonstrates use of Android 4.3's MediaCodec API to direct the device hardware encoder's packets directly to FFmpeg for RTMP (with librtmp) or HLS streaming of H.264 / AAC. It also demonstrates realtime OpenGL Effects (titling, chroma key, fades) and background recording.
Thanks SO, and especially, fadden.
Here is complete article about streaming android camera video to a webpage.
Android Streaming Live Camera Video to Web Page
Used libstreaming on android app
On server side Wowza Media Engine is used to decode the video stream
Finally jWplayer is used to play the video on a webpage.
I am able to send the live camera video from mobile to my server.using this link
see the link
Refer the above link.there is a sample application in that link. Just you need to set your service url in RecordActivity.class.
Example as:
ffmpeg_link="rtmp://yourserveripaddress:1935/live/venkat";
we can able to send H263 and H264 type videos using that link.
Check Yasea library
Yasea is an Android streaming client. It encodes YUV and PCM data from
camera and microphone to H.264/AAC, encapsulates in FLV and transmits
over RTMP.
Feature:
Android mini API 16.
H.264/AAC hard encoding.
H.264 soft encoding.
RTMP streaming with state callback handler.
Portrait and landscape dynamic orientation.
Front and back cameras hot switch.
Recording to MP4 while streaming.
Mux (my company) has an open source android app that streams RTMP to a server, including setting up the camera and user interactions. It's built to stream to Mux's live streaming API but can easily stream to any RTMP entrypoint.
Depending by your budget, you can use a Raspberry Pi Camera that can send images to a server. I add here two tutorials where you can find many more details:
This tutorial show you how to use a Raspberry Pi Camera and display images on Android device
This is the second tutorial where you can find a series of tutorial about real-time video streaming between camera and android device