How to stitch a photo and an audio file in phonegap - java

I am using phonegap to create an android application.
Is it possible to stitch a picture and a sound (audio) file together using phonegap framework. The new file after stitching would be a video file.
For example, an app like animoto (for iphone). Where you choose a sound track and a few pics from the phone album and the app creates a very nice slide show with the sound being played in the background.
Can you please provide some links that would explain how to do it as well.
Thanks

Stitching is not possible but you can concurrently run both picture and sound

Related

Vlcj audio only player

I am creating a chat application where the user can send audio and video files.
For my video files I have successfully created an embedded video player in my app which will play any video.
But for my audio files I don't want to use an embedded video player with options vout=dummy instead I want to be optimized and use an DirectAudioPlayer for my purposes. I took a look at the MediaFactory create but i don't understand how am I suppose to retrieve these parameters for an specific file.
What I want is just one direct audio player in my application which I can reuse for multiple audio files or is this not possible?
You can use a HeadlessMediaPlayer.
This is basically the same as the EmbeddedMediaPlayer that you're already using, but with no API to do with displaying the video.
A word of caution though if you play a video through the HeadlessMediaPlayer, rather than just an audio file, LibVLC will open a native window and play the video - you can suppress this by passing "--no-video" via the MediaPlayerFactory.
The DirectAudioPlayer is used when you want to access the audio buffer in your application - i.e. "direct" access to the native audio buffer. You would then have to use JavaSound or something to actually play the audio. So I don't think this is what you want.

Read current audio output - Android

I want to know if it is possible to access the audio that is currently playing on the Android device.
Example: if Spotify is running in the background, I want to access the audio to control some LEDs that are connected to my RaspberryPi.
I want to create some sort of equalizer that changes colors depending on the sound that is currently playing. I appreciate if some one could tell me if accessing the main audio output is possible or not.
Unless you are using a rooted phone, it's not possible to capture output of a random app on Android.
You can however create an app that plays media files and captures the output for the purpose of visualization with "Visualizer" effect. You can take a look on the sample here: https://android.googlesource.com/platform/development/+/master/samples/ApiDemos/src/com/example/android/apis/media/AudioFxDemo.java
(look for "Visualizer").
If you are using Raspberry Pi anyway, you can just play all your music through it, capture and analyze it there. You will need an external USB sound card though. See for example this post: http://www.g7smy.co.uk/2013/08/recording-sound-on-the-raspberry-pi/
There they just record and play audio back, but you can insert an analysis phase in between.

GIF Speed based per computer?

I'm working on a game engine, and want the option to play video to a jpanel or whatever. I've been trying to figure out HOW to do this, preferably using mp4, WITHOUT USING ANY 3RD PARTY SOFTWARE. The only option i've come to is using a combined gif and .wav series.
My question is, does a .gif play faster per computer? for example, if i get the movie synced perfectly on my desktop, would it have the odds of not being in sync with my laptop? would the .gif play slower/faster? If the answer is yes, how in the heck would i fix this?
Thanks!
Since you are building the video in a .gif then you should be able to just take the individual images and paint them at the desired frame rate in your application without using 3rd party software.
This would allow you to sync it with your .wav for sound.

Any options to build your own java based youtube html5 video player for android?

I need to build a Video Player in android that can play
youtube HTML5 videos (www.youtube.com/html5) also be able
to embed the player within an android app I build.
The tablets I am building this app for cannot use flash at all
(this is why I need to build my own).
This would end up being a kids app, so I really only want to give
them 4 options on the player: play, reply, pause, exit
I am still a little confused as to would I be playing this embed
video in my custom app (with custom video player i make) using rtsp://
or a m.youtube.com H.264
Thanks in advance, all help appreciated
These projects from GIthub might get you started.
vivdub / AndroidMediaplayer
joelbinn / media-player
lxz2003 / mediaplayer

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.

Categories