Creating reference movies for iPhone on the fly - java

We are working on an online mobile video app.
The videos we want to play on mobile phones are being generated by a server, as there can be dynamic content in the server (based on user input).
Now for iPhone we would like to play the video in the best possible resolution based on the connection speed at the time of downloading the movie. This can be done using reference movies. However, because our videos are being generated on the fly, we need to generate this reference movie on the fly as well.
Is there a way to generate reference movies on the fly on a Linux server using some command line tool, PHP or Java? Or on a DOS server maybe?
Any help will be much appreciated.

Take a look at Apple's HTTP live streaming protocol.
https://developer.apple.com/streaming/

Related

How to keep my personal server playing music repeatedly and listen to it by URL with Java?

I want to create a simple personal live audio system. Just like a personal radio station. (I know there are many personal radio station services, but I want to build my own here)
Here is a simple explanation I want to build.
1. Build a server side code with Java that keeps playing specific audio files 24/7
2. If I connect to 1's address from other devices I can listen to it
The point is that I want it to be like a radio station.
It is not like the audio file is triggered to play by connecting 1.
1 is always playing and if I connect to it, I am going to get to listen what 1 is playing at the moment I connect to it.
I know this is a pretty broad question, so the simple steps are welcome.
i.e: You can use this java library to make server playing your music 24/7, and this method to listen to it.
Thank you for your help in advance.
Something like HTTP live streaming or MPEG-Dash should be relatively easy to implement in Java. Both work by splitting audio files into short segments and serving them via http, along with some metadata indicating the current position and which segments are up next.
There don't seem to be mature Java libraries for them, but one could probably use other tools like gstreamer. See the wikipedia pages for possible clients.

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

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.

Uploading data from Android App to desktop program

I'm pretty new to android so apologies if I'm missing an obvious solution, I'm developing an android app that would be used to record various data including photographs and hopefully the intention would be for this collected data to be uploaded to a desktop application where certain desktop specific jobs could be carried out.
Due to the fact I intend to save photographs within the app in the SQLite database as a bytearray which recorded information would be I think that it would be too data intensive to send to a server, plus I wouldn't want the desktop app to necessarily be on a server, it should be standalone. I'd prefer to use the USB connection and allow a USB upload of the data from the app sqlite db direct to the database on the pc, probably sql server. What would be the best way to approach this? Could the android ADB be used to acheive this?
Any help or suggestions on this would be much appreciated.
Regards
I believe that your sqllite database (as well as photos contained there) will be stored on the SD card of the device. You have to options here, first, when your desktop applications find the folder on the device SD card (should be mounted on the filesystem after connecting the device to your PC), second is to use bluetooth and initialize the transfer from the device to your desktop application.
You could try having them on the same network and having them interact that way. I know applications such as RemoteDroid do this, but I have no experience doing so myself. There is also the fact that there is the data saved on the sd card / by putting your device in Storage mode and you could just point your desktop to the device drive and assume a designated folder your app uses exists.
Adding on to the answers here, you could save your photos as files in your sd card and transfer it to your pc from there.
Here is a dev guide on storing files.
Another way is to transfer over WiFi. Ice cream sandwich seems to have a WiFi Direct api that allows us to perform P2P transfers over WiFi. I have not used it yet but have a look at this
Solution 1
I would probably use rsync between my desktop and android. This way you can export data from your sqlite to a flat file and import it to your local database on your desktop. This way you can also put your schema into a file.
RSync is a very stable protocol to exchange files.
Solution 2
You can also use Amazon S3 for this purpose. The file name can contain the version number for ensuring that you have the latest file.

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