I am making an android application for streaming local video files to other android phones.
For this purpose, I found the libstreaming library, but it is designed to stream video from the camera phone.
How can I stream local video files using this library?
Are there any other libraries with which you can implement streaming?
I tried to use headless vlc but headless vlc does not exist in android.
I tried to use gstreamer (gst-launch) but MediaPlayer is required to sdp the file.
ffserver is not supported..
Related
In my project I need to implement an HLS (HTTP live Streaming) for an android device and it stream to an iOS device to play where android device will record the video and send it to server and iOS device will play the stream from the server using an m3u8 file. In the link below
Click Here
They have mention "Currently, the supported delivery format is MPEG-2 Transport Streams for audio-video".
Now problem is that in android you can record only in mp4 by default (correct me if i am wrong). Now I need some third party API or library like ffmpeg, Gstreamer, Xuggler, Jcodec to transcode recorded mp4 to ts files.
ffmpeg, jffmpeg and Gstreamer have a learning curve and to setup time and also need NDK. So I need some help because I don't have enough time to try one of these please refer me if you know any library which is easy to use and does not have a complex learning and setup time. Like Jcodec which is pure java base and plug and play type library but I don't think it can do this for me as they have mention in there documentation they support h262 codec support yet but i need h264 and ACC for audio.
FYI:
JJPMEG
It is a Java binding to FFmpeg and it have an android verison too. Maybe you can give it a try.
https://code.google.com/p/jjmpeg/
Or:
Maybe you can just record the video with supporting encoding and transcode the video in the server side?
I'd like to play a RTP stream in an Android VideoView. I create the stream with gstreamer on a linux machine and fire the rtp stream to a udp sink.
Is it possible to consume this stream in an Android VideoView without having a RTSP server?
I tried to set the video URI to "rtp://:#" but then I got an error "Video could not be played". I also thought about creating an SDP file and using that on the Android device. But I'm not sure if this works and how to create such a file.
Thanks
http://developer.android.com/guide/appendix/media-formats.html
Above link is first stop for what is support or no.
As it says rtp only in conjunction with sdp as per rtsp spec.
No can't do naked rtp stream in base android.
Try porting some lib like live555 if you must have naked rtp.
I am trying to play some video streams from mms and m3u8 inside my Android application. It seems that the MediaPlayer doesn't have support on this and from what I have read on FFMPEG it seems there isn't any easy way with that also. I am using Android 2.1 SDK.
Any ideas on what I should in order to make this work? There are some apps there in the store that already do this, but I don't know how.
You may try the Vitamio library, http://vitamio.org
Vitamio is a multimedia framework for all Android devices. Vitamio works like the Android's default MediaPlayer except that it includes much more powerful features. And it's absolutely free !
The following network protocols are supported for audio and video playback:
MMS
RTSP (RTP, SDP)
HTTP progressive streaming
HTTP live streaming (M3U8), for Android 2.1+
Is it possible to stream video to an Android device by using Windows Media Services? Which protocol should I use between RTSP and HTTP? Actually, I have a video file (MP4 format) at a server and I want to stream video files to an Andriod device.
Currently Android does not support adaptive streaming. I searched for some methods a while ago, but Android does not support any of them. No streaming via Windows Media Server, no support for Flash Media Server and HTTP Live Streaming also does not work. The last one would be the best solution since it does not depend on proprietary protocols - but unfortunately it uses a different container format MPEG-TS and a playlist file M3U8 which Android does not understand at the moment. There is an issue for this - you might want to stare it. ;-)
That said, I would recommend you to just upload the MP4 file to an HTTP server and play it via the HTTP url. If it doesn't play, you have to add some extra streaming information by hinting it - e.g. with MP4Box:
mp4box -hint <filename>
Have fun. :-)
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.