In Android, is there anyway to play a music/video file via another phone like Apple airplay?
I think vlc can create a media server via rtsp protocol for another phone to get the stream and play it. But perhaps only computer versions of vlc can create media server.
Related
I am working on a app that host a video(.mp4) from a primary
Android device.
Say in http://192.168.43.88:8080/*.mp4 and the secondary device
connected using wifi will be able to stream the video (with a MediaController object and MediaPlayer)
I am have trouble finding any such example codes for selecting a video and hosting it from the Android device.
Here are some question I looked at
Stream live video from phone to phone using socket fd
https://code.google.com/p/ipcamera-for-android/
it may be easier to have a webhost on your phone on said port that opens up to a flash player that plays whatever video you've linked or is in a specific folder. an ip camera would only broadcast your camera. to play or stream a video, you need a video player. either the host (your phone) would need to have a video player on a web server.. or the client's browser (your computer) would need an mp4 player, else the file would just download from your phone to the computer. for the flash player, you could make it full screen and thus make it look nice.
I have a music player in Android, which uses android.media.MediaPlayer to play music from the SD card.
I would like to add the ability to cast the music to a Chromecast device.
I have played around with the democastplayer demo app. Specifically I tried to get the MediaRouteSelector to work with a 'live audio' route, but the 'cast' action button didn't show (suggesting live audio is not supported perhaps?). I also tried a few other things, but had no luck getting democastplayer to send MP3 audio to Chromecast.
Is streaming/sending local SD MP3 files to Chromecast even possible? If so, are there any sample apps or open source projects I can refer to?
Thanks in advance.
You need to add/write a small web server to your android application so it can serve the local media. Then have your sender application send the url of the media (that your local server is serving) to chromecast so it can play the music directly served from your phone.
Yes, Possible to stream your MP3 files by sending file url to chromecast device you can be using remote media player to load the media file. Refer this sample https://github.com/ovingalafsal/ChromeCastSampleApp it might be helpful
I'm developing an app on android that can play videos streamed from a server (my PC) likes youtube. I'm new to this and I need some advices to get a right approach.
First, my app on android should have the ability to seek to a position that have been played. So, in the server side (my PC), what streaming server should I use?
Do I need to combine the streaming packets into a temporary file and play on this file in order to get seek-back?
Please confirm me one thing , can i able to configure my device as RTSP streaming server.
can this allow to play video from sdcard android
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.