yixia / VitamioBundle

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

HLS Adaptive canot run in Vitamio 4.2.2 #131

Closed keancaptinh closed 10 years ago

keancaptinh commented 10 years ago

Dear,

I tried integrate vitamio in to our app. Our application is used hls adaptive streaming (with 3 profiles). I set enable setAdaptiveStream(true). But i cannot change to higher bitrate> I debugged: (1) first time, It run the lowest bit rate. (2) When it auto change to higher, the application is suspended.

My code:

mMediaPlayer = new MediaPlayer(getActivity()); mMediaPlayer.setVideoQuality(MediaPlayer.VIDEOQUALITY_HIGH); mMediaPlayer.setAdaptiveStream(true);

mMediaPlayer.setBufferSize(1048576); mMediaPlayer.setDataSource(path); mMediaPlayer.setDisplay(holder); mMediaPlayer.prepareAsync();

mMediaPlayer.setOnBufferingUpdateListener(this); mMediaPlayer.setOnCompletionListener(this); mMediaPlayer.setOnPreparedListener(this); mMediaPlayer.setOnVideoSizeChangedListener(this); mMediaPlayer.setOnErrorListener(this);

The log file: 04-21 16:04:20.085: I/Vitamio[4.2.1]Player: VPLAYER INIT BEGIN 04-21 16:04:20.085: I/Vitamio[4.2.1]Player: Application package name: com.fptplay.activity 04-21 16:04:20.085: I/Vitamio[4.2.1]Player: VPLAYER INIT END 04-21 16:04:20.085: I/Vitamio[4.2.1]Player: Copyright (c) YIXIA (http://yixia.com). 04-21 16:04:20.085: I/Vitamio[4.2.1]Player: THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com) 04-21 16:04:20.095: I/Vitamio[4.2.1]Player: Application package name: com.fptplay.activity 04-21 16:04:20.095: I/Vitamio[4.2.1]Player: Copyright (c) YIXIA (http://yixia.com). 04-21 16:04:20.095: I/Vitamio[4.2.1]Player: THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com) 04-21 16:04:20.095: I/Vitamio[4.2.1]Player: Application package name: com.fptplay.activity 04-21 16:04:20.095: I/Vitamio[4.2.1]Player: PREPARE SIG: 0 04-21 16:04:20.095: I/Vitamio[4.2.1]Player: THREAD PREPARE START 04-21 16:04:20.095: I/Vitamio[4.2.1]Player: THREAD PREPARE ATTACHED 04-21 16:04:20.095: I/Vitamio[4.2.1]Player: Copyright (c) YIXIA (http://yixia.com). 04-21 16:04:20.095: I/Vitamio[4.2.1]Player: THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com) 04-21 16:04:20.095: I/Vitamio[4.2.1]Player: OPEN FILE http://hlscache.fptplay.net.vn/live/smil:vtc3HD_hls.smil/playlist.m3u8 04-21 16:04:20.505: I/Choreographer(12076): Skipped 91 frames! The application may be doing too much work on its main thread. 04-21 16:04:20.976: D/ImageCache(12076): Memory cache hit - width:270 height:159 04-21 16:04:20.976: I/VitamioPlayer: Info (701, 0) 04-21 16:04:21.816: I/Vitamio[4.2.1]Player: META AUDIO: 1. und. 500000!#!3. und. 1200000!#!5. und. 3500000, META SUBTITLE: 04-21 16:04:21.816: I/Vitamio[4.2.1]Player: WOW: BRILLIANT C COUNT 4 04-21 16:04:21.826: I/Vitamio[4.2.1]Player: OPEN STREAM AUDIO BEGIN 04-21 16:04:21.826: I/Vitamio[4.2.1]Player: Copyright (c) YIXIA (http://yixia.com). 04-21 16:04:21.826: I/Vitamio[4.2.1]Player: THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com) 04-21 16:04:21.826: I/Vitamio[4.2.1]Player: Application package name: com.fptplay.activity 04-21 16:04:21.826: I/Vitamio[4.2.1]Player: 2, 48000, 0 04-21 16:04:21.826: I/Vitamio[4.2.1]Player: OPEN STREAM AUDIO END 04-21 16:04:21.826: I/Vitamio[4.2.1]Player: Copyright (c) YIXIA (http://yixia.com). 04-21 16:04:21.826: I/Vitamio[4.2.1]Player: THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com) 04-21 16:04:21.826: I/Vitamio[4.2.1]Player: Application package name: com.fptplay.activity 04-21 16:04:21.826: I/Vitamio[4.2.1]Player: WOW: BRILLIANT C COUNT 4 04-21 16:04:21.836: I/Vitamio[4.2.1]Player: OPEN STREAM VIDEO BEGIN 04-21 16:04:21.836: I/Vitamio[4.2.1]Player: OPEN STREAM VIDEO END 04-21 16:04:21.846: I/Vitamio[4.2.1]Player: CC: ARMYUV420 0 04-21 16:04:21.857: I/Vitamio[4.2.1]Player: THREAD PREPARE DETTACHED, ret = 0 04-21 16:04:21.857: I/Vitamio[4.2.1]Player: THREAD PREPARE END 04-21 16:04:21.897: D/VitamioPlayer: GET CPU FATURE: V5TE V6 VFP V7A VFPV3 NEON 04-21 16:04:21.897: D/MediaPlayerDemo(12076): onPrepared called 04-21 16:04:21.947: I/VitamioPlayer: Info (701, 0) 04-21 16:04:22.177: D/MediaPlayerDemo(12076): surfaceChanged called 04-21 16:04:23.849: I/VitamioPlayer: Info (901, 486) 04-21 16:04:26.521: I/VitamioPlayer: Info (901, 423) 04-21 16:04:28.574: I/VitamioPlayer: Info (901, 670) 04-21 16:04:29.094: D/dalvikvm(12076): GC_FOR_ALLOC freed 1370K, 7% free 26311K/28248K, paused 29ms, total 32ms 04-21 16:04:29.124: I/Vitamio[4.2.1]Player: NATIVE FINALIZE VPLAYER 04-21 16:04:29.124: I/Vitamio[4.2.1]Player: NATIVE FINALIZE VPLAYER END 04-21 16:04:29.945: I/VitamioPlayer: Info (702, 0) 04-21 16:04:31.757: I/VitamioPlayer: Info (901, 233) 04-21 16:04:41.788: I/VitamioPlayer: Info (901, 57) 04-21 16:04:51.909: I/VitamioPlayer: Info (901, 50) 04-21 16:05:04.252: I/VitamioPlayer: Info (901, 63) 04-21 16:05:06.274: I/VitamioPlayer: Info (901, 449) 04-21 16:05:08.276: I/VitamioPlayer: Info (901, 58) 04-21 16:05:10.308: I/VitamioPlayer: Info (901, 62) 04-21 16:05:14.973: I/VitamioPlayer: Info (901, 4) 04-21 16:05:16.985: I/Vitamio[4.2.1]Player: CLOSE STREAM VIDEO BEGIN 04-21 16:05:17.045: I/Vitamio[4.2.1]Player: CLOSE STREAM VIDEO END 04-21 16:05:17.055: I/Vitamio[4.2.1]Player: Copyright (c) YIXIA (http://yixia.com). 04-21 16:05:17.055: I/Vitamio[4.2.1]Player: THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com) 04-21 16:05:17.055: I/Vitamio[4.2.1]Player: Application package name: com.fptplay.activity 04-21 16:05:17.065: I/Vitamio[4.2.1]Player: WOW: BRILLIANT C COUNT 4 04-21 16:05:17.085: I/Vitamio[4.2.1]Player: OPEN STREAM VIDEO BEGIN 04-21 16:05:17.085: I/Vitamio[4.2.1]Player: OPEN STREAM VIDEO END 04-21 16:05:17.095: I/VitamioPlayer: Info (901, 215) 04-21 16:05:17.095: I/VitamioPlayer: Info (701, 0) 04-21 16:05:17.095: I/Vitamio[4.2.1]Player: CLOSE STREAM AUDIO BEGIN 04-21 16:05:17.095: I/Vitamio[4.2.1]Player: CC: ARMYUV420 0 04-21 16:05:17.135: I/Vitamio[4.2.1]Player: CLOSE STREAM AUDIO END 04-21 16:05:17.135: I/Vitamio[4.2.1]Player: WOW: BRILLIANT C COUNT 4 04-21 16:05:17.135: I/Vitamio[4.2.1]Player: OPEN STREAM AUDIO BEGIN 04-21 16:05:17.135: I/Vitamio[4.2.1]Player: Copyright (c) YIXIA (http://yixia.com). 04-21 16:05:17.135: I/Vitamio[4.2.1]Player: THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com) 04-21 16:05:17.135: I/Vitamio[4.2.1]Player: Application package name: com.fptplay.activity 04-21 16:05:17.135: I/Vitamio[4.2.1]Player: 2, 48000, 0 04-21 16:05:17.146: I/Vitamio[4.2.1]Player: OPEN STREAM AUDIO END

crossle commented 10 years ago

It's need a time to change.

keancaptinh commented 10 years ago

How much time to change ? I am waiting long time but it does not change. So i need to add other code ?

keancaptinh commented 10 years ago

i have just check again. It can to change between profiles, but it must to spend long time (2-3 min).

How to i can reduce this time ? Or please don't stop current profile when the next profile not ready ?

crossle commented 10 years ago

I have no found good idea to reduce the time, maybe need precise network speed, the second question it's need a time to develop

keancaptinh commented 10 years ago

thank you for your support. my internet speed upload/download 75Mbs/75Mbs.

Last question, how you can run smooth the hls adaptive bit rate now