Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to switch rtmp stream #95

Open
zengke328 opened this issue Feb 8, 2021 · 2 comments
Open

how to switch rtmp stream #95

zengke328 opened this issue Feb 8, 2021 · 2 comments

Comments

@zengke328
Copy link

how to switch rtmp stream when playing rtmp stream?
how to pause current stream and to start new stream, i don‘’t find the demo code to learn.

because i find much exception in my project.

#00 pc 00063610 /system/lib/libc.so (je_huge_salloc+7) [armeabi-v7a]

#1 pc 00067bf7 /system/lib/libc.so (ifree+242) [armeabi-v7a]
#2 pc 00067f8f /system/lib/libc.so (je_free+74) [armeabi-v7a]
#3 pc 000076e7 /data/app/com.echat.qingning-2/lib/arm/librtmp-jni.so (RTMP_ReadPacket+454) [armeabi-v7a]
#4 pc 00008133 /data/app/com.echat.qingning-2/lib/arm/librtmp-jni.so (RTMP_GetNextMediaPacket+26) [armeabi-v7a]
#5 pc 0000a20d /data/app/com.echat.qingning-2/lib/arm/librtmp-jni.so [armeabi-v7a]
#6 pc 0000a1af /data/app/com.echat.qingning-2/lib/arm/librtmp-jni.so (RTMP_Read+378) [armeabi-v7a]
#7 pc 000037b7 /data/app/com.echat.qingning-2/lib/arm/librtmp-jni.so (Java_net_butterflytv_rtmp_1client_RtmpClient_nativeRead+46) [armeabi-v7a]
#8 pc 000aec99 /system/lib/libart.so (art_quick_generic_jni_trampoline+40) [armeabi-v7a]
10 #9 pc d79216af
11 java:
12 net.butterflytv.rtmp_client.RtmpClient.int read(byte[],int,int)(RtmpClient.java:265)
13 com.google.android.exoplayer2.ext.rtmp.RtmpDataSource.int read(byte[],int,int)(RtmpDataSource.java:58)
14 com.google.android.exoplayer2.upstream.DefaultDataSource.int read(byte[],int,int)(DefaultDataSource.java:204)
15 com.google.android.exoplayer2.upstream.StatsDataSource.int read(byte[],int,int)(StatsDataSource.java:92)
16 com.google.android.exoplayer2.extractor.DefaultExtractorInput.int readFromUpstream(byte[],int,int,int,boolean)(DefaultExtractorInput.java:283)
17 com.google.android.exoplayer2.extractor.DefaultExtractorInput.boolean readFully(byte[],int,int,boolean)(DefaultExtractorInput.java:75)
18 com.google.android.exoplayer2.extractor.flv.FlvExtractor.boolean readTagHeader(com.google.android.exoplayer2.extractor.ExtractorInput)(FlvExtractor.java:238)
19 com.google.android.exoplayer2.extractor.flv.FlvExtractor.int read(com.google.android.exoplayer2.extractor.ExtractorInput,com.google.android.exoplayer2.extractor.PositionHolder)(FlvExtractor.java:167)
20 com.google.android.exoplayer2.source.BundledExtractorsAdapter.int read(com.google.android.exoplayer2.extractor.PositionHolder)(BundledExtractorsAdapter.java:127)
21 com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractingLoadable.void load()(ProgressiveMediaPeriod.java:1050)
22 com.google.android.exoplayer2.upstream.Loader$LoadTask.void run()(Loader.java:415)
23 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
24 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
25 java.lang.Thread.run(Thread.java:761)

@umangsaini
Copy link

LiveVideoBroadcaster and ExoPlayer

These two projects use librtmp Client for Android, you may want to compare your usage with these applications.

@mekya
Copy link
Contributor

mekya commented Feb 16, 2021

Hi @umangsaini ,

I think it's related to ExoPlayer lifecycle. I wish I could help you but I'm having very tough times for the Ant Media Server. RTMP streaming is out of our scope currently. If you want to use WebRTC for ingesting and playing, please visit https://antmedia.io and we're happy to give support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants