yixia / VitamioBundle

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

FFmpeg with librtmp: some RTMP streams are not played and causes the app to freeze #153

Open waninkoko opened 10 years ago

waninkoko commented 10 years ago

Hello,

From a long time I have been compiling FFmpeg with librtmp (even when Vitamio didn't have support for librtmp).

With some RTMP streams I'm experimenting an issue that's giving me a headache. Vitamio initializes correctly, but the video-audio stream is never played. When I finish the player activity, my app just freezes with a black screen and I have to kill its process.

This is the logcat I get when trying to play the stream:

06-11 16:20:01.995 1568-1568/com.testapp I/Vitamio[4.2.1][Player]﹕ Copyright (c) YIXIA (http://yixia.com). THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com) 06-11 16:20:01.995 1568-1568/com.testapp I/Vitamio[4.2.1][Player]﹕ LOAD FFMPEG START: /data/data/com.testapp/libs/libffmpeg.so 06-11 16:20:01.995 1568-1568/com.testapp I/Vitamio[4.2.1][Player]﹕ LOAD FFMPEG END: /data/data/com.testapp/libs/libffmpeg.so 06-11 16:20:01.995 1568-1568/com.testapp I/Vitamio[4.2.1][Player]﹕ LOAD VVO START: /data/data/com.testapp/libs/libvvo.9.so 06-11 16:20:01.995 1568-1568/com.testapp E/Vitamio[4.2.1][Player]﹕ FIND_NAME_SYM vvo, render_yuv 06-11 16:20:01.995 1568-1568/com.testapp I/Vitamio[4.2.1][Player]﹕ LOAD VVO END: /data/data/com.testapp/libs/libvvo.9.so 06-11 16:20:01.995 1568-1568/com.testapp I/Vitamio[4.2.1][Player]﹕ LOAD VAO START: /data/data/com.testapp/libs/libvao.0.so 06-11 16:20:01.995 1568-1568/com.testapp I/Vitamio[4.2.1][Player]﹕ LOAD VAO END: /data/data/com.testapp/libs/libvao.0.so 06-11 16:20:01.995 1568-1568/com.testapp I/Vitamio[4.2.1][Player]﹕ VPLAYER INIT BEGIN 06-11 16:20:01.995 1568-1568/com.testapp I/Vitamio[4.2.1][Player]﹕ Application package name: com.testapp 06-11 16:20:01.995 1568-1568/com.testapp I/Vitamio[4.2.1][Player]﹕ VPLAYER INIT END 06-11 16:20:01.995 1568-1568/com.testapp I/Vitamio[4.2.1][Player]﹕ Copyright (c) YIXIA (http://yixia.com). THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com) 06-11 16:20:01.995 1568-1568/com.testapp I/Vitamio[4.2.1][Player]﹕ Application package name: com.testapp 06-11 16:20:01.995 1568-1568/com.testapp I/Vitamio[4.2.1][Player]﹕ Copyright (c) YIXIA (http://yixia.com). THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com) 06-11 16:20:01.995 1568-1568/com.testapp I/Vitamio[4.2.1][Player]﹕ Application package name: com.testapp 06-11 16:20:01.995 1568-1568/com.testapp I/Vitamio[4.2.1][Player]﹕ PREPARE SIG: 0 06-11 16:20:01.999 1568-1691/com.testapp I/Vitamio[4.2.1][Player]﹕ THREAD PREPARE START 06-11 16:20:02.011 1568-1691/com.testapp I/Vitamio[4.2.1][Player]﹕ THREAD PREPARE ATTACHED 06-11 16:20:02.011 1568-1691/com.testapp I/Vitamio[4.2.1][Player]﹕ Copyright (c) YIXIA (http://yixia.com). THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com) 06-11 16:20:02.011 1568-1691/com.testapp I/Vitamio[4.2.1][Player]﹕ OPEN FILE [here a rtmp address that I checked it works using rtmpdump and ffmpeg in my PC] 06-11 16:20:10.495 1568-1691/com.testapp I/Vitamio[4.2.1][Player]﹕ META AUDIO: 1. und, META SUBTITLE: 06-11 16:20:10.495 1568-1691/com.testapp I/Vitamio[4.2.1][Player]﹕ OOPS: ONLY 1 06-11 16:20:10.495 1568-1691/com.testapp I/Vitamio[4.2.1][Player]﹕ OPEN STREAM AUDIO BEGIN 06-11 16:20:10.495 1568-1691/com.testapp I/Vitamio[4.2.1][Player]﹕ Copyright (c) YIXIA (http://yixia.com). THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com) 06-11 16:20:10.495 1568-1691/com.testapp I/Vitamio[4.2.1][Player]﹕ Application package name: com.testapp 06-11 16:20:10.495 1568-1691/com.testapp I/Vitamio[4.2.1][Player]﹕ 2, 48000, 0 06-11 16:20:10.499 1568-1691/com.testapp I/Vitamio[4.2.1][Player]﹕ OPEN STREAM AUDIO END 06-11 16:20:10.499 1568-1691/com.testapp I/Vitamio[4.2.1][Player]﹕ Copyright (c) YIXIA (http://yixia.com). THIS SOFTWARE (Vitamio) IS WORK OF YIXIA (http://yixia.com) 06-11 16:20:10.499 1568-1691/com.testapp I/Vitamio[4.2.1][Player]﹕ Application package name: com.testapp 06-11 16:20:10.499 1568-1691/com.testapp I/Vitamio[4.2.1][Player]﹕ OOPS: ONLY 1 06-11 16:20:10.499 1568-1691/com.testapp I/Vitamio[4.2.1][Player]﹕ OPEN STREAM VIDEO BEGIN 06-11 16:20:10.499 1568-1691/com.testapp I/Vitamio[4.2.1][Player]﹕ OPEN STREAM VIDEO END 06-11 16:20:10.499 1568-1691/com.testapp I/Vitamio[4.2.1][Player]﹕ THREAD PREPARE DETTACHED, ret = 0 06-11 16:20:10.499 1568-1691/com.testapp I/Vitamio[4.2.1][Player]﹕ THREAD PREPARE END 06-11 16:20:10.499 1568-1700/com.testapp I/Vitamio[4.2.1][Player]﹕ CC: SwsScale 0 06-11 16:20:10.519 111-172/? W/audio_hw_primary﹕ out_write() limiting sleep time 44149 to 23219 06-11 16:20:10.543 111-172/? W/audio_hw_primary﹕ out_write() limiting sleep time 55759 to 23219 06-11 16:20:10.567 111-172/? W/audio_hw_primary﹕ out_write() limiting sleep time 37369 to 23219 06-11 16:20:10.587 111-172/? W/audio_hw_primary﹕ out_write() limiting sleep time 28979 to 23219 06-11 16:20:10.635 111-172/? W/audio_hw_primary﹕ out_write() limiting sleep time 31178 to 23219 06-11 16:20:11.143 111-488/? I/AudioFlinger﹕ BUFFER TIMEOUT: remove(4098) from active list on thread 0xb42b8008

I cannot give the stream URL as it's current unavailable. About the stream, I can say the video was in H264 and the audio in MP3, nothing special.

Thank you in advance.

waninkoko commented 10 years ago

My mistake. I was calling to seekTo(0) and that caused all the problems.

Anyway, if the RTMP stream is not being received (for any reason) and we close the activity, the app will freeze and crash.

crossle commented 10 years ago

Vitamio use FFmpeg internal rtmp, but you can compile ffmpeg with librtmp yourself. Maybe we can support librtmp next version.

crossle commented 10 years ago

@deepakvvdn dont scribble your issue.

MythodeaLoL commented 8 years ago

@waninkoko hi man, I am a long time trying to compile my own version, I could share with me your version (sourcecode) so I can compile with the librtmp? (arm, x86, mips)

Thank you for your attention sorry for bothering