yixia / VitamioBundle

Vitamio for Android
http://www.vitamio.org/en/
Other
5.27k stars 2.07k forks source link

Cannot stream an MP3 #188

Open vibin opened 10 years ago

vibin commented 10 years ago

I'm trying to stream audio with Vitamio - MP3 and HLS. I tried playing an MP3 stream and it gives the following error (Log.e) in Logcat - and crashes.

FIND_NAME_SYM vvo, render_yuv

The full log is:

 29319               dalvikvm  D  GC_FOR_ALLOC freed 160K, 8% free 24039K/26088K, paused 17ms, total 17ms
 29319               dalvikvm  D  GC_CONCURRENT freed 592K, 8% free 25237K/27380K, paused 3ms+1ms, total 26ms
 29319   CustomDatabaseAdap..  D  insertArrayList called
 29319   CustomDatabaseAdap..  D  insertArrayList called
 29319             DetailView  D  streamLink is https://api.soundcloud.com/tracks/100339982/stream?client_id=d0f2d22083bc8233aab32f3f7d1d0bbc
 29319               dalvikvm  D  Trying to load lib /data/data/com.vibin.billy/libs/libstlport_shared.so 0x429bb690
 29319               dalvikvm  D  Added shared lib /data/data/com.vibin.billy/libs/libstlport_shared.so 0x429bb690
 29319               dalvikvm  D  No JNI_OnLoad found in /data/data/com.vibin.billy/libs/libstlport_shared.so 0x429bb690, skipping init
 29319               dalvikvm  D  Trying to load lib /data/data/com.vibin.billy/libs/libvplayer.so 0x429bb690
 29319               dalvikvm  D  Added shared lib /data/data/com.vibin.billy/libs/libvplayer.so 0x429bb690
 29319                 linker  W  libffmpeg.so has text relocations. This is wasting memory and is a security risk. Please fix.
 29319   Vitamio[4.2.1][Pla..  E  FIND_NAME_SYM vvo, render_yuv

I ran the app on a Nexus 5 running 4.4.2 KitKat. VitamioBundle version is 4.2.2.

I also have another question. I'm playing audio in my app in a Android Service (so that it can play even in background). How do I initialize Vitamio libraries inside an Android Service? checkVitamioLibs() needs Activity as a parameter.

Any help will be appreciated.

vibin commented 10 years ago

I should also probably add that I grabbed the libstlport_shared.so and etc libraries from Google NDK site (https://developer.android.com/tools/sdk/ndk/index.html) and merged them with /libs in Vitamio. This helped me get rid of previous errors.

master255 commented 10 years ago

@vibinr can you tell us in detail how you won this error??? FIND_NAME_SYM vvo, render_yuv Instead I will tell you how to run the player in the background.

vibin commented 10 years ago

@master255 Well I just built and ran my app with Vitamio for first time. As I said, I'm trying to stream an MP3 from web.

The only thing I did with Vitamio was initialize it in my .MainActivity. That's all I did, and then use the MediaPlayer class from Vitamio, instead of Android's MediaPlayer class.

Another question, can Vitamio handle HLS well?

master255 commented 10 years ago

@vibinr what is HLS?

vibin commented 10 years ago

HTTP Live Streaming. Apple's protocol for streaming audio, works well on iOS, but not so much on Android. http://en.wikipedia.org/wiki/HTTP_Live_Streaming

I thought Vitamio supports HLS, that's the sole reason why I was using its MediaPlayer instead of Android's!

master255 commented 10 years ago

@vibinr this is a good question. I tested flac and he very slowly rewinds. For me the test harder mp3 and I try not to use mp3. But there are no problems with the video clips.

vibin commented 10 years ago

So there's no way to stream a simple MP3 using Vitamio? What is this even?

master255 commented 10 years ago

@vibinr seems vitamio has weaknesses. Yesterday tried to rewind mp3 and I did not succeed. It is not known what the problem is.

master255 commented 10 years ago

God @Vitamio !!!help us! to streem mimi mp3! :-D @crossle you trying listening (listened ) mp3(flac, aac) through vitamio player? you know how many problems there???

crossle commented 10 years ago

Maybe need upgrade FFmpeg

master255 commented 10 years ago

@crossle how long will it take? 1hour or 1 month?

master255 commented 10 years ago

@crossle I generally can do it and how?

crossle commented 10 years ago

You can compile FFmpeg yourself. I compile it only 1 mins.

master255 commented 10 years ago

@crossle how i can do that??? Where somehow instruction, guide or simply step by step in two words?

xresco commented 9 years ago

@vibinr Can you explain to me how to get the libraries from the NDK? I'm sorry but I'm quite new to this. thankks

iosifnicolae2 commented 8 years ago

How can i resolve text realocations in Android M(api 23)???