How can I stream videos from a server to an Android app? - java

My local church hosts a weekly show and upload the videos on Youtube. And I've been asked to develop an app for them, so far all is well, however, I have to implement a feature that will allow me to stream the show's videos unto the app.
I honestly don't have much of a clue how to go about it (still new to android programming)! I've looked around here and seen that a few people have already attempted to do this, but unlike what most people have done or tried to do, the videos are released on that day (not live streaming). For example the 10/02/13 video will be released on 10/02/13.
This link gives me an idea on how to stream a video on Android, but that shows that I have to explicitly put in the link for the video.
Is there a way to do the same thing, but instead of adding the link myself, the app should retrieve the videos from a server??
Thank you in advance for your help!

Is there a way to get the link but instead of adding the link myself, the app should retrieve the videos from a server??
To achieve this you need to make the webservice which help to communicate mobile and web server. When you send the request from mobile to server then make the web service which give you response which have link of video then you can stream the video.
To stream the video.
Read here.

Inside the API DEMOS you have on example.
API DEMOS >> Media >> Mediaplayer >> Play Streaming Video
You need to downloaded using the SDK Manager, and then inside eclipse you go throw create new project form existing sample, then you read the code and copy it inside your app.

Related

RTMP Streaming to Red5 using Xuggler

I have the following problem: in my application I am supposed to connect to a VNC server, grab the icoming images and both save them as a video file (this part works) and publish as a RTMP stream to Red5 server.
Most of the video encoding part is based on Xuggler's screen recording tutorial app ( http://wiki.xuggle.com/MediaTool_Introduction#How_To_Take_Snapshots_Of_Your_Desktop ).
However, being a beginner in Java I can't seem to get the live streaming part to work. I know I am supposed to use IContainer, but even after reading this: How to transmit live video from within a Java application? and several other posts I don't really know how to adapt that to my application. Any help would be greatly appreciated, thanks!

Start video chat without user interaction - Android

I am a total noob on this site so please be patient. I am trying to initiate a Video Chat/Call without any user interaction or confirmation.
I found this:
Uri imUri = new Uri.Builder().scheme("xmpp").authority("gtalk").query("call;type=video").appendPath(email).build();
Intent IM = new Intent(Intent.ACTION_SENDTO);
IM.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
IM.setData(imUri);
startActivity(IM);
from here: https://stackoverflow.com/a/8024626/1184256
This gets me very close, but I then have to click an "Invite" button to continue. Is there a way I can emulate a KeyEvent to click this button or skip the popup window entirely with root access?
I don't even necessarily need to use Google Video Chat if someone has found a different way to initiate a Video call to a certain contact via Skype, Vtok,Fringe, ooVoo or whatever without user interaction.
I have also found OpenTok which after building a sample server and client on my site I have found that it works on desktop browsers but not in Android browsers. Please don't steal/use my apiKey or sessionId.
I have also found libjingle which will allow me to use Google Talk's peer-to-peer voice and video chat. I am thinking this will be the way to go, but it means building a video chat app from the ground up and wrapping it around these libraries... yeah. Anybody done this already?
I know this is essentially a duplicate thread, but I have searched for days and days for an answer and this is the closest I have come to getting this done.
BTW the reason I need this without user interaction is for a Telepresence robot, thus there won't be anybody actually holding/using the phone when I initiate this call.
Please HELP!
You'd have to actually change the built in android app (Talk?) that receives this intent to automatically accept these types of intents. There's no way to do it from a standalone app for security reasons.
I don't think that live video streaming will work natively in Android Browsers, since they dont support WebRTC (Yet) and do not support flash. With that said, OpenTok has an Android SDK in beta that lets you stream live video from android phone to browser, another android phone, or even an iOS phone as long as everyone is connected to the same session. Like you said, this does not work over the browser and you would have to build a native app.

Embedding youtube channels in android application

I want to be able to display a certain youtube channel's videos and allow the user to select one of their videos to watch. Do I have to do this manually (parse the source code of the webpage to get each individual video link and then display them) or can I use the youtube api?
If anyone has done this, example code or tutorials would be greatly appreciated. Thanks!
you can do that without parse any webpage, the correct way is using the youtube api
from a Youtube video get the Id
http://www.youtube.com/watch?v=opZ69P-0Jbc
(this is the mobile youtube version
http://m.youtube.com/watch?v=opZ69P-0Jbc)
so you can get the data scheme
http://gdata.youtube.com/feeds/mobile/videos/opZ69P-0Jbc
and you can get for example the related videos
http://gdata.youtube.com/feeds/mobile/videos/opZ69P-0Jbc/related
heres the youtube api reference
http://code.google.com/intl/en-US/apis/youtube/2.0/reference.html

Converting audio files(.3gp) to video with Album cover and uploading to YouTube

I have an audio file in .3gp format on my Android device which I wish
to upload to YouTube. I know that YouTube is a video upload site and
that I need to convert this sound file to video.
I just want an image to display all the time the audio is playing.
Google tells me there are number of tools that can help me. But I want
to do this via java code from my Android device.
Please help.
Thanks.
There are tools such as FFMPEG available for free that allow you to, essentially, mix and convert heterogenous streams. That is you can add a bitmap to a video, create video from slide shows and then add sound etc. (See a related question I asked here).
These programs can be executed from within java applications by making Runtime.exec(..) calls.
Sun has an example for stitching multiple JPEGs together into a movie, you can find it here. You should be able to take this example, (its fairly robust), and add what you need to it.
I recommend looking into the Java Media Framework (FAQ)
You can find a vast collection of sample applets/code at the Sun Solutions page. You can find the API on this page. I do hope this is compatible on the Android platform, as I haven't had any personal experience developing for it. But it might be a good place to start.

Where to get streaming (live) video and audio from camera example app for Android?

Where to get streaming (live) video and audio from camera example for Android?
Suppose I want to create some live video streaming service app so I'll have some cool server at the back end. And I know how to do that part. Suppose I have some stand alone app for PCs now I want to go on to mobile devices. So I want to see some sample app grabing audio and video streams from Phone, Synchronizing them, encoding somehow, and sending LIVE stream to server. I need any Open-Source sample that will do this or something like this. Where can I get such one?
Ole have you been able to find any good examples of video or audio broadcasting yet? The best that I have found so far is the SIPDroid project (www.sipdroid.org). I haven't had a chance to review it in depth, but it looks promising.
Here are some project that you want
Ip Camera
http://code.google.com/p/ipcamera-for-android
SipDroid
http://code.google.com/p/sipdroid/source/browse/trunk/src/org/sipdroid/sipua/ui/VideoCamera.java
You can get the codes using SVN or other clients.
Yet to me, the both projects still have issues. If you get the one working well, please tell me.

Categories