yixia / VitamioBundle

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

https video stream not working with VitamioBundle 4.2.2 #209

Open fmanzoor opened 10 years ago

fmanzoor commented 10 years ago

I tried playing a YouTube video from stream's source and I didn't get playback. Following is the logcat of the execution/attempt to play video.

I/ActivityManager(  219): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=io.vov.vitamio.demo/.VitamioListActivity} from pid 409
D/dalvikvm( 2570): Late-enabling CheckJNI
I/ActivityManager(  219): Start proc io.vov.vitamio.demo for activity io.vov.vitamio.demo/.VitamioListActivity: pid=2570 uid=10067 gids={3003}
D/dalvikvm(  219): GC_FOR_ALLOC freed 732K, 60% free 8127K/20231K, paused 101ms
I/dalvikvm-heap(  219): Grow heap (frag case) to 16.991MB for 1048592-byte allocation
D/OpenGLRenderer(  409): Flushing caches (mode 1)
D/Vitamio[Player]( 2570): CPU implementer:0x51
D/Vitamio[Player]( 2570): Serial:0000000000000000
D/Vitamio[Player]( 2570): CPU architecture:7
D/Vitamio[Player]( 2570): Hardware:mogami
D/Vitamio[Player]( 2570): CPU revision:2
D/Vitamio[Player]( 2570): CPU variant:0x1
D/Vitamio[Player]( 2570): CPU part:0x00f
D/Vitamio[Player]( 2570): Revision:0000
D/Vitamio[Player]( 2570): BogoMIPS:1128.85
D/Vitamio[Player]( 2570): Features:swp half thumb fastmult vfp edsp neon vfpv3
D/Vitamio[Player]( 2570): Processor:ARMv7 Processor rev 2 (v7l)
D/Vitamio[Player]( 2570): CPU architecture: 7
D/Vitamio[Player]( 2570): GET CPU FATURE: V5TE V6 VFP V7A VFPV3 NEON 
D/dalvikvm( 2570): Trying to load lib /data/data/io.vov.vitamio.demo/lib/libvinit.so 0x2b7d4d28
D/dalvikvm( 2570): Added shared lib /data/data/io.vov.vitamio.demo/lib/libvinit.so 0x2b7d4d28
I/Vitamio[Player]( 2570): isNativeLibsInited, APP VERSION: 2, Vitamio Library version: 2
D/OpenGLRenderer(  409): Flushing caches (mode 0)
D/HardwareRenderer( 2570): Disabling v-sync
D/libEGL  ( 2570): loaded /system/lib/egl/libGLES_android.so
D/libEGL  ( 2570): loaded /system/lib/egl/libEGL_adreno200.so
D/libEGL  ( 2570): loaded /system/lib/egl/libGLESv1_CM_adreno200.so
D/libEGL  ( 2570): loaded /system/lib/egl/libGLESv2_adreno200.so
D/OpenGLRenderer( 2570): Enabling debug mode 0
W/Adreno200-EGLSUB( 2570): SetSwapInterval() interval: 0 not set
W/InputManagerService(  219): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@2b882340 (uid=10007 pid=409)
I/ActivityManager(  219): Displayed io.vov.vitamio.demo/.VitamioListActivity: +1s95ms
I/ActivityManager(  219): START {cmp=io.vov.vitamio.demo/.MediaPlayerDemo} from pid 2570
D/HardwareRenderer( 2570): Disabling v-sync
W/Adreno200-EGLSUB( 2570): SetSwapInterval() interval: 0 not set
I/ActivityManager(  219): Displayed io.vov.vitamio.demo/.MediaPlayerDemo: +693ms
D/OpenGLRenderer( 2570): Flushing caches (mode 0)
I/ActivityManager(  219): START {cmp=io.vov.vitamio.demo/.MediaPlayerDemo_Video (has extras)} from pid 2570
I/Vitamio[Player]( 2570): isNativeLibsInited, APP VERSION: 2, Vitamio Library version: 2
D/HardwareRenderer( 2570): Disabling v-sync
W/Adreno200-EGLSUB( 2570): SetSwapInterval() interval: 0 not set
D/MediaPlayerDemo( 2570): surfaceCreated called
I/Vitamio[Player]( 2570): LIB ROOT: /data/data/io.vov.vitamio.demo/libs/
D/dalvikvm( 2570): Trying to load lib /data/data/io.vov.vitamio.demo/libs/libstlport_shared.so 0x2b7d4d28
D/dalvikvm( 2570): Added shared lib /data/data/io.vov.vitamio.demo/libs/libstlport_shared.so 0x2b7d4d28
D/dalvikvm( 2570): No JNI_OnLoad found in /data/data/io.vov.vitamio.demo/libs/libstlport_shared.so 0x2b7d4d28, skipping init
D/dalvikvm( 2570): Trying to load lib /data/data/io.vov.vitamio.demo/libs/libvplayer.so 0x2b7d4d28
D/dalvikvm( 2570): Added shared lib /data/data/io.vov.vitamio.demo/libs/libvplayer.so 0x2b7d4d28
I/Vitamio[4.2.6][Player]( 2570): Copyright (c) YIXIA (http://yixia.com).
I/Vitamio[4.2.6][Player]( 2570): THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com)
I/Vitamio[4.2.6][Player]( 2570): LOAD FFMPEG START: /data/data/io.vov.vitamio.demo/libs/libffmpeg.so
I/Vitamio[4.2.6][Player]( 2570): LOAD FFMPEG END: /data/data/io.vov.vitamio.demo/libs/libffmpeg.so
I/Vitamio[4.2.6][Player]( 2570): LOAD VVO START: /data/data/io.vov.vitamio.demo/libs/libvvo.9.so
E/Vitamio[4.2.6][Player]( 2570): FIND_NAME_SYM vvo, render_yuv
I/Vitamio[4.2.6][Player]( 2570): LOAD VVO END: /data/data/io.vov.vitamio.demo/libs/libvvo.9.so
I/Vitamio[4.2.6][Player]( 2570): LOAD VAO START: /data/data/io.vov.vitamio.demo/libs/libvao.0.so
I/Vitamio[4.2.6][Player]( 2570): LOAD VAO END: /data/data/io.vov.vitamio.demo/libs/libvao.0.so
I/Vitamio[4.2.6][Player]( 2570): VPLAYER INIT BEGIN
I/Vitamio[4.2.6][Player]( 2570): Application package name: io.vov.vitamio.demo
I/Vitamio[4.2.6][Player]( 2570): VPLAYER INIT END
I/Vitamio[4.2.6][Player]( 2570): Copyright (c) YIXIA (http://yixia.com).
I/Vitamio[4.2.6][Player]( 2570): THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com)
I/Vitamio[4.2.6][Player]( 2570): Application package name: io.vov.vitamio.demo
I/Vitamio[4.2.6][Player]( 2570): Copyright (c) YIXIA (http://yixia.com).
I/Vitamio[4.2.6][Player]( 2570): THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com)
I/Vitamio[4.2.6][Player]( 2570): Application package name: io.vov.vitamio.demo
I/Vitamio[4.2.6][Player]( 2570): PREPARE SIG: 0
D/MediaPlayerDemo( 2570): surfaceChanged called
I/Vitamio[4.2.6][Player]( 2570): THREAD PREPARE START
I/Vitamio[4.2.6][Player]( 2570): THREAD PREPARE ATTACHED
I/Vitamio[4.2.6][Player]( 2570): Copyright (c) YIXIA (http://yixia.com).
I/Vitamio[4.2.6][Player]( 2570): THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com)
I/Vitamio[4.2.6][Player]( 2570): OPEN FILE https://r1---sn-npo7enes.googlevideo.com/videoplayback?itag=22&fexp=900224,907257,912328,924639,927622,930666,931983,932404,934030,942901,944907,946013,947209,952302,953801&key=yt5&upn=_F3Pidsc2OE&sparams=id,initcwndbps,ip,ipbits,itag,mime,mm,ms,mv,ratebypass,source,upn,expire&ipbits=0&ratebypass=yes&mt=1411571445&mv=m&id=o-ANgZhm8SkQgkdHR_wTZby5xQM7e_5Vm99z5AcaRjAxuE&ms=au&expire=1411593128&sver=3&ip=[REDACTED]&mime=video%2Fmp4&initcwndbps=17500&signature=83437DC1AE0FC2CEB97F8FB0225F4D9DEC9D0D98.EA34E9E53C0ECFABC71A7F77C2A248F1E9109717&source=youtube&mm=31
I/ActivityManager(  219): Displayed io.vov.vitamio.demo/.MediaPlayerDemo_Video: +786ms
D/OpenGLRenderer( 2570): Flushing caches (mode 0)
E/Vitamio[4.2.6][Player]( 2570): [tls @ 0x13bb20] error:00000000:lib(0):func(0):reason(0)
E/Vitamio[4.2.6][Player]( 2570): avformat_open_input: I/O error : -5
E/Vitamio[4.2.6][Player]( 2570): error (1, -5)
I/Vitamio[4.2.6][Player]( 2570): FILE CLOSE BEGIN
I/Vitamio[4.2.6][Player]( 2570): FREE VIDEOPIC BEGIN
I/Vitamio[4.2.6][Player]( 2570): FREE VIDEOPIC 2 END
I/Vitamio[4.2.6][Player]( 2570): FREE SUBPIC BEGIN
I/Vitamio[4.2.6][Player]( 2570): FREE SUBPIC 1 END
I/Vitamio[4.2.6][Player]( 2570): FREE AUDIOFRAME BEGIN
I/Vitamio[4.2.6][Player]( 2570): FREE AUDIOFRAME 8 END
I/Vitamio[4.2.6][Player]( 2570): DELETE GLOBAL REF BEGIN
I/Vitamio[4.2.6][Player]( 2570): DELETE GLOBAL REF END
I/Vitamio[4.2.6][Player]( 2570): FILE CLOSE END
I/Vitamio[4.2.6][Player]( 2570): THREAD PREPARE DETTACHED, ret = 0
I/Vitamio[4.2.6][Player]( 2570): THREAD PREPARE END
E/Vitamio[Player]( 2570): Error (1, -5)
D/MediaPlayerDemo( 2570): onCompletion called

How to reproduce.

  1. Get video source of YouTube video.
  2. Enter it in MediaPlayerDemo_Video.java in vitamio-sample.

I assume that the URL may be invalid at time when you check, so here is my 200 OK response as well.

fahad@linux-98km:~/Downloads/VitamioBundle-master/vitamio-sample>   curl -s3IL "https://r1---sn-npo7enes.googlevideo.com/videoplayback?itag=22&fexp=900224,907257,912328,924639,927622,930666,931983,932404,934030,942901,944907,946013,947209,952302,953801&key=yt5&upn=_F3Pidsc2OE&sparams=id,initcwndbps,ip,ipbits,itag,mime,mm,ms,mv,ratebypass,source,upn,expire&ipbits=0&ratebypass=yes&mt=1411571445&mv=m&id=o-ANgZhm8SkQgkdHR_wTZby5xQM7e_5Vm99z5AcaRjAxuE&ms=au&expire=1411593128&sver=3&ip=[REDACTED]&mime=video%2Fmp4&initcwndbps=17500&signature=83437DC1AE0FC2CEB97F8FB0225F4D9DEC9D0D98.EA34E9E53C0ECFABC71A7F77C2A248F1E9109717&source=youtube&mm=31"
HTTP/1.1 302 Found
Last-Modified: Wed, 02 May 2007 10:26:10 GMT
Date: Wed, 24 Sep 2014 16:08:21 GMT
Expires: Wed, 24 Sep 2014 16:08:21 GMT
Cache-Control: private, max-age=900
Location: https://r9---sn-npo7enes.googlevideo.com/videoplayback?itag=22&fexp=900224,907257,912328,924639,927622,930666,931983,932404,934030,942901,944907,946013,947209,952302,953801&key=yt5&upn=_F3Pidsc2OE&sparams=id,initcwndbps,ip,ipbits,itag,mime,mm,ms,mv,ratebypass,source,upn,expire&ipbits=0&ratebypass=yes&mt=1411571445&mv=m&id=o-ANgZhm8SkQgkdHR_wTZby5xQM7e_5Vm99z5AcaRjAxuE&ms=au&expire=1411593128&sver=3&ip=[REDACTED]&mime=video%2Fmp4&initcwndbps=17500&signature=83437DC1AE0FC2CEB97F8FB0225F4D9DEC9D0D98.EA34E9E53C0ECFABC71A7F77C2A248F1E9109717&source=youtube&mm=31&ir=1&rr=12
Content-Length: 0
Connection: close
X-Content-Type-Options: nosniff
Content-Type: text/html
Server: gvs 1.0

HTTP/1.1 302 Found
Last-Modified: Wed, 02 May 2007 10:26:10 GMT
Date: Wed, 24 Sep 2014 16:08:22 GMT
Expires: Wed, 24 Sep 2014 16:08:22 GMT
Cache-Control: private, max-age=900
Location: https://r1---sn-a5m7zu7e.googlevideo.com/videoplayback?itag=22&fexp=900224,907257,912328,924639,927622,930666,931983,932404,934030,942901,944907,946013,947209,952302,953801&key=cms1&upn=_F3Pidsc2OE&sparams=expire,id,initcwndbps,ip,ipbits,itag,mime,mm,ms,mv,nh,ratebypass,source,upn&ipbits=0&ratebypass=yes&id=o-ANgZhm8SkQgkdHR_wTZby5xQM7e_5Vm99z5AcaRjAxuE&expire=1411593128&sver=3&ip=[REDACTED]&mime=video%2Fmp4&signature=81595FDF1FC7D3C79E08D23DBBB1E1A880D55D88.5CD577EA0F66AC6EED5E8A5347E7CEB29A839EED&source=youtube&redirect_counter=1&req_id=ad700899901da3ee&cms_redirect=yes&mm=26&ms=tsu&mt=1411574895&mv=u&nh=CAE
Content-Length: 0
Connection: close
X-Content-Type-Options: nosniff
Content-Type: text/html
Server: gvs 1.0

HTTP/1.1 200 OK
Last-Modified: Wed, 24 Sep 2014 04:29:00 GMT
Content-Type: video/mp4
Date: Wed, 24 Sep 2014 16:08:34 GMT
Expires: Wed, 24 Sep 2014 16:08:34 GMT
Cache-Control: private, max-age=17914
Accept-Ranges: bytes
Content-Length: 23054237
Connection: close
X-Content-Type-Options: nosniff
Server: gvs 1.0

fahad@linux-98km:~/Downloads/VitamioBundle-master/vitamio-sample>
lduparc commented 10 years ago

I tried playing a personnal live video from HLS stream's source and I didn't get playback. I receive I/O Error : -5. Vitamio work on HTTP but not on HTTPS with auth token. Is FFmpeg is really compile with openssl ? How to fix the problem ? Have you an older version ( 4.1 ) that works with openssl and support HLS ? I need to play a HLS live stream over https.

mitesh-zaptech commented 9 years ago

I have tried to play .m3u8 video with VideoViewActivity on sample app. I am not able to play the stream on android set top box. On my mobile device it is playing fine. It is returning avformat_open_input: I/O Error : -5 always with android Set top box. I am using http://www.geniatech.com/pa/atv582.asp?vd=rj this box. Please help me on this issue, if somebody has faced it previously. Any help is appreciated. Thanks.