I searched a lot over the web for the below requirement but didn't get any sample code or correct solution.
Basically I want to connect my android mobile to a linux desktop via USB and want to live stream a video that i play in my mobile(i m gonna use video view that loads a video from a weblink/assets folder).
if I play a video from my mobile that should be get played on desktop at the same time.
I would be grateful if u provide an API or source code with example/reference links.
Related
I wanna build an app that will use android camera video and stream it to another android phone or on the web. I don't wanna do it through my Wifi, but i want the cam streaming to be broadcast live anywhere in the world.
Can anyone help me getting an overview of the android classes or APIs that will be helpful doing this task?
You can't stream live video from a phone directly to another phone, there are just too many possible differences between any two given devices.
To do this you will need to have a publicly accessible server, (that you have control of) running a streaming engine, such as Woza: https://www.wowza.com/products/streaming-engine The source phone sends video to the server, and the destination phone receives video from the server.
Can I send and show my multimedia content on two or more devices via DLNA
at the same time?
If yes how can I do it ? For example I want my tvs, tablets to play the same multimedia content of my smartphone( LG Nexus 4) at the same time.
If not, are there any other protocols(like wifi) to do this. Any approaches will be appreciated.
Best implementation for android devices as i think streaming your multimedia content from media server, then multiple devices can play at same time
DLNA didn't have android api yet How to make a DLNA android mobile application?
for streaming
Android video streaming example
http://developer.samsung.com/android/technical-docs/Android-Media-Streaming-Tutorial
for android to android streming via wifi
Live-stream video from one android phone to another over WiFi
I'm not sure about DLNA players etc, but I have tried streaming my content via Youtube. It's very easy to set up and use.
The only thing is make sure your battery is plugged in, or as long as it does not die. Youtube live stream takes up a lot of battery.
Some Useful Links
Youtube Guide / Link1
Youtube Guide / Link 2 support.google.com/youtube/answer/2853700?hl=en
Youtube Guide / Link 3 support.google.com/youtube/answer/6273849?hl=en
Good Luck!
AFAIK, DLNA doesn't support viewing synchronized content across multiple devices. The best solution I've found is VLC as a server streaming a video via RTSP. Multiple devices can view the stream via any video client that supports RTSP, like VLC. For Android devices VLC for Android Beta works well.
All clients viewing the stream will be synchronized.
Is there anyway to bypass the blocked videos on mobile? First I tried to fire up normal youtube intent, then I used WebView (using both video and iframe tags), and lastly I changed the user agent of WebView to a desktop client but none of the above mentioned way worked. I tried rtsp to stream the video using VideoView but it would only give me a low quality 3gp video, which is what Youtube API gives.
I am running out of options. Any help would be highly appreciated.
Thanks!
I ran into the same thing with some of our videos on YouTube and found out that only YouTube controls if it will be allowed to show on a mobile. We never found a work-around for it other than hosting the video on our server or using Vimeo. But as it stands,YouTube has control over mobile viewing. Also do you have that video monetized? Monetizing a video on YouTube can also cause them to not allow it on mobile especially if it has any content that YouTube is saying is a Third Party or Copyright infringement. They told us we had third party content when it was all shot by us. Further reading in that problem showed that YouTube's new digital fingerprint is the main culprit for creating a new wave of problems for users trying to upload their own videos they made and own. i.e., a user tried to upload a video of his backyard with birds in it and the birds were singing. When he tried to upload it, YouTube said it was Copyrighted! How do you Copyright bird chirps everyone is now asking!
So try Vimeo or use your own server to deliver the content. Sorry I can't offer more help.
I remember being able to bypass the block as a user by asking the desktop version of the YouTube site and then watching the video with the (not updated anymore) Flash Player for Android. So maybe you could try pretending to be the Flash Player when asking for the video from your app. Maybe use a network sniffer to see what it's doing.
User "OMA" gave an answer (use 'Desktop Mode'), that sometimes works and is easy to try.
Next up is this Site (or a similar one): http://www.mobileyt.com/ which accepts an URL, then shows your Video.
A Proxy Server might assist you with access, particularly if it is a 'Country Restriction' (for Mobile, but does not mention the Country Restriction only the Mobile one). Any ADs served to that Country may be poorly received (Language / Customs); so it is blocked.
You can try a Spoofing Application for your Mobile Browser (Hint: Spoof you Browse with the Opera Browser OR use Explorer 10 on WinXP they won't be ready for that).
Combining those techniques can assist in difficult cases. You can also resort to downloading the Video and playing it with MX Player or VLC (for Mobile).
Good luck, and if at first you don't succeed ...
I am using IP Cam (an app for android phones) to stream live video. It basically functions as a basic IP camera. It gives me a URL where the feed is. It looks like this http://192.168.2.32:8080/ when I'm connected to my WiFi network. The video stream is at http://192.168.2.32:8080/videofeed.
I want to capture the video feed of the camera which is at http://192.168.2.32:8080/videofeed and embed it in an HTML5 player (the one I plan to use is Video JS) or a Flash player if the HTML5 doesn't work (prefer HTML5 though). The HTML5 player is asking me for a source file (such as .mp4, webm, mov, etc) but at http://192.168.2.32:8080/videofeed there is no source file. It's just HTML stream.
My question is how to I embed that video stream into my HTML5 player and post it on my website.
From what I could see, the streaming is already made by the app to a webpage and this page has the video for you to see. So you want to stream something that's already streaming.
You could try to signup for a dynamic dns like www.no-ip.com to get a url for your network, change your router to accept incoming connection on port 8080 and then use an iframe on your website with the dynamic dns url.
I used to stream a lot of live concerts to websites, but I had a camera connected to a computer and using Adobe Flash Media Streaming (free) connected to a server running Wowza streaming.
You need to get the data that camera is capturing decode it to some common format.
RGB or YUV2 or whatever. Encode it to Vp8/webm or thora/ogg . h264/Mp4 wont do it as it needs a special header in the mp4 file called mdat(unless it is fragmented mp4).
Client video tag makes the request to your phones ip/where you handling the http GET for that app hold that http connection and start streaming to it. This is sort of like long polling.
Most IP cameras have a way to get the raw stream of video. Using RTSP or RTMP
I suggest you get the steeam URI for the «camera», which would be something like rtsp://<camera-ip>:<some-port> or rtmp://<camera-ip>:<some-port>. That is a common feature of IP cameras, even those emulated on a phone, so probably it is mentioned on the docs or can be enable/set on the app configuration.
If there is no documentation, you can do some research by using Chrome to access the feed on the webpage and open the developer tools to see the actual code for the page, the URI may be visible on the embedded player they provide.
Once you get it, open that stream with VLC and see the properties (encoding, framerate, size, etc) and with that you can choose a compatible embedded player for your site.
Hope it helps!
///Pablo
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 :)