Convert video with FFMPEG Library in android - android

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.

Related

Exoplayer for Youtube videos

My goal is to play a Youtube video in an application.
Youtube Player API is not what I want since there could be overlays in front of the video.
Webviews are terrible for performances and doesn't allow autoplay.
Exoplayer seems good but most of their doc is broken (links), incredibly complex for a very simple task, and doesn't provide working demos (their demo crashes...). Also, they don't explain how to properly get the DASH of a youtube URL.
So, is there a way to make Exoplayer work easily and get DASH info of any youtube link like https://www.youtube.com/watch?v=yFAnn2j4iB0 ?
I use http://www.youtube.com/get_video_info?&video_id=yFAnn2j4iB0 and once decoded I get this DASH url : https://manifest.googlevideo.com/api/manifest/dash/ms/au/nh/IgpwcjAxLnBhcjAxKgkxMjcuMC4wLjE/mv/m/source/youtube/requiressl/yes/ip/165.225.76.70/fexp/3300108,3300130,3300161,3313267,9419451,9422596,9424135,9425619,9426788,9428398,9431012,9431719,9433096,9433223,9433946,9435526,9438327,9438662,9439580,9441225,9441737,9442156,9442424,9442426,9442680,9443322,9443345,9443768,9443913,9444207,9445344/ipbits/0/as/fmp4_audio_clear,webm_audio_clear,webm2_audio_clear,fmp4_sd_hd_clear,webm2_sd_hd_clear/sparams/as,hfr,id,initcwndbps,ip,ipbits,itag,mm,mn,ms,mv,nh,pl,playback_host,requiressl,source,expire/pl/23/id/c850279f68f8881d/mn/sn-25g7snee/mm/31/hfr/1/playback_host/r18---sn-25g7snee.googlevideo.com/itag/0/mt/1471872416/sver/3/key/yt6/initcwndbps/9365000/expire/1471894709/upn/w1CO218TeQA/s/11395DF1FE7737DA54826F38EE1C61D28B46619DC.9724AB654EE916E8B5C5F687BE3504E4799BA939933
But it doesn't start buffing in the Exoplayer Demo. Is this DASH correct ? Does anyone of you use ExoPlayer in their app ?
Doc I found so far :
How to play youtube video in ExoPlayer in Android?
https://github.com/google/ExoPlayer/tree/release-v1/demo_ext (but it crashes ><)
If your goal is to play YouTube videos then use YouTube Android Player API. You need to provide direct URL to Exoplayer.
I successfully run the demo app. you can follow the guide at https://google.github.io/ExoPlayer/demo-application.html and clone the project on github https://github.com/google/ExoPlayer.git
a little note though, it is the most complex project I've ever seen, and need the longest time I ever experienced to build its gradle.
after gradle build complete, you just need to run the demo project.

Android 2D panoramic video player

I am working in iOS and Android app that play 2D Panoramic video player.
We find an Open Source iOS 2D Panorama Video Player app
But we can't find any open source library for android.
Please suggest any open source android 2D video player to achive this.
As your question is 3 months old by now, you probably found it (or something else) yourself.
However, as other people might still be searching for it: gvr-android-sdk is Google's SDK for various VR-usages. Take a look at the simplevideowidget-sample included in the SDK.
There is also an iOS-Version available.

How to compile Youtube WatchMe?

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.

ANDROID : how to stream and play .m4a audio file in application

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

How to play MP4 videos on Android 1.5?

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.

Categories

Resources