Ineed to play a short MP4 video on my android app I'm searching info about how to load mp4 videos but i can't find the way to do it on Android 1.5. My app sould be compatible from Android 1.5 to 4.0
I tryed with a lot of tutorials from google, from stackoverflow, from android developers groups, etc.., but i can't make working any of them. For example, now i'm trying with the VideoViewDemo from android developers: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/media/VideoViewDemo.html But i can't make working the code, i dont know what is the problem, i just cant play mp4 videos with that code. And also i can't with all the code examples i find on internet.
I have a video on my ASSETS folder, and i just need to play the video, only this. I can not believe that doesn't exists a simple and quick way to do it.
If someone can give me a tutorial or a working example of playing mp4 videos on android i will apreciate it a lot.
Thanks
use this link http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/media/MediaPlayerDemo_Video.html
path = "/mnt/sdcard/file.mp4";
it will work fine.
#AndroidUser99 you need to use following thing to work mp4 and other in android.
1:Rockpler free coder may use for android
2:android ffmpeg
3:some SO Question for ffmpeg
you can also download FFmpeg library used before 1.7.0 from this link and use it in your project click here
Hope you will get idea to play mp4 on android 1.5.
Related
I am trying to (roughly) replicate the Sony Xperia "Live on Youtube" app. Since it is exclusive to the Xperia line, I am trying to build an app out of the Youtube WatchMe source code.
All I need is an app that can live stream video from the phone's camera to Youtube, as both of the apps mentioned above do. I know that WatchMe is meant to be nothing more than a reference for developers wanting to make apps that utilize this, but how possible would it be to modify the example code? I don't need a necessarily stable application, but something is better than nothing.
It would help even more if anyone knew of an app that already contained this functionality.
Due to sharing and open-source limitations of ffmpeg I wasn't able to distribute the built.
There were few people built successfully in here. They use ffmpeg + libx264 v2.3.
You'll also use Android.mk and ffmpeg-jni.c from the repo to build.
Take a look at TubeStreamer, now on Google Play. This is a work in progress but is currently working for streaming live video to YouTube.
I'm also trying to make this app worked.
I made it run on my phone, but with the wrong build method.
Here's my progress, just for reference.
I compiled the app on Eclipse except the libffmpeg.so.
Then, I got the lib file from someone provided on https://github.com/youtube/yt-watchme/issues/16
Finally, I push the file into the phone's directory "/data/app-lib/com.google.android.apps.watchme-1/libffmpeg.so"
After these steps and configure on Google develope console and Youtube, this app could run correctly.
In my android application I want to play youtube video in App, not in the default browser. I am trying this for the last some days. Previously I played the youtube video using the following code :
http://code.google.com/p/android-youtube-player/downloads/list
But now this code is not working. It shows "Sorry, this video cannot be played." I have tried all the possible solution mentioned in the different forum for this error. But could not be able to play the video.
That's why I am trying to find out another way to play the video in app. I have tried the RTSP link of a youtube video , it is playing the 3gp video file, but video quality is very poor. This is not acceptable.
I am really fade up to find out good solution to play youtube video in app.
Please help. Any good suggestion is always welcome.
Santanu
Playing YouTube videos in Android was made very simple with the release of this library: https://developers.google.com/youtube/android/player/. The Developer Guide on that page is a good resource on how to use this library. They also provide sample code on how to use the functionality provided by the library. The steps are basically:
Get a developer key
Download the library and include it in your project
Use the library to play videos (hint. use the YouTubePlayerView as a first step)
Please post again if you have any questions or need any code examples.
I play youtube video in videoview and I also face problem regarding video result.
Here some topics regarding this. One my friend suggest me use embeded URL instead of rtsp URL. Its give good result. For Example embeded URL example and how to implement it.
I have a problem that I received a video file from the server which can not be played through video view from the app I am making. I don't know what the actual problem is because all videos are played through same video view but the video received from the server side is not played. So, I think that I have to integrate FFMPEG in our android app, so I can play every video at a runtime conversion. For this, I have read much more about FFMPEG Library integration with Android through many sites as:
http://www.roman10.net/how-to-build-android-applications-based-on-ffmpeg-by-an-example/
Downloaded some projects from GitHub (https://github.com/appunite/AndroidFFmpeg) but unable to succeed in building the Library through NDK. Something I missed and I am working on Windows machine, probably this might be a problem. I want the exact solution regarding this, means step by step solution for building the android project with FFMPEG Library. If you have some useful suggestion then please share with me.
I have been trying to play video in my android application that I made using phonegap. I had several problems and so I have several questions.
Firstly, does html5 video tag work with phonegap? I couldn't succeed to write the html5 codes.
Secondly, what types of videos are supported by android and phonegap?
Thirdly, I try to play a file whose extension is mp4. There is no scene on the screen but I can hear the voice of the video. What can be the reason?
Thanks in advance.
Nope, the video tag is broken in most if not all versions of Android. Go star these issues:
http://code.google.com/p/android/issues/detail?id=22254 and
http://code.google.com/p/android/issues/detail?id=8272
In order to work around this pain in the #$$ I've written a plugin you can use on Android to play videos.
http://simonmacdonald.blogspot.com/2011/11/video-player-plugin-for-phonegap.html
I have a URL from where I have to stream and play ".m4a" audio file in my application. After searching for this for almost a week I have come up with no solution.
This is the URL of the ".m4a" audio file.
http://a2.mzstatic.com/us/r1000/044/Music/e9/40/ec/mzm.evyxvimp.aac.p.m4a
I don't want to download the song and play(that I have done). Issue is I want to just stream and play.
can anyone please guide me how to do this? plz lemme know if there is any link/ref to this.
You can use Some decoding libraries please see the solution below:
Freeware Advanced Audio (AAC) Decoder for Android
How to use this library?
Consider legal issues while using it.
[T]he project http://code.google.com/p/aacplayer-android/ is licensed
under GPL, so you can create commercial apps on top of it, but you
need to fullfill the GPL - mainly it means to publish your code as
well. If you use the second project
http://code.google.com/p/aacdecoder-android/ , then you do not need to
publish your code (the library is licensed under LGPL).
For more detail please see these questions:
Android MediaPlayer works fine in our Custom audio Streaming application up to Android 2.1 but not in higher versions
Android 2.2 MediaPlayer is working fine with one SHOUTcast URL but not with the other one