Closed pengxiao18 closed 2 days ago
Hello,
Do you have a way to reproduce it? Can you tell me player used to reproduce it?
The player I use is org.videolan.android:libvlc-all:3.5.4-eap4. The Code:
Media media = new Media(libVLC, Uri.parse(rtspUrl)); media.addOption(":network-caching=300"); media.setHWDecoderEnabled(true, false); mediaPlayer.setMedia(media); mediaPlayer.play(); media.release();
There is no problem using the previous version:
implementation 'com.github.pedroSG94:RTSP-Server:1.3.1' implementation 'com.github.pedroSG94.RootEncoder:library:2.5.1'
Hello,
I detected that it is a problem related to only use a track (only audio or only video) I'm fixing it
This should be fixed in version 1.3.3. Download the last version of the README again and test it.
I am downloading the new version to test
I just tested it, but the problem still exists.
I use the track contains audio and video.
Ok, I will check it directly with VLC. Can you give me the VLC gradle import to reproduce the error?
implementation 'org.videolan.android:libvlc-all:3.5.4-eap4'
I just debugged and found that videoServerPorts and audioServerPorts are both empty arrays
Maybe because the server request TCP instead UDP. Can you share the RTSP commands that should be able in the logcat?
You are right, I added options.add("--rtsp-tcp") in the vlc playback parameters
options.add("--no-drop-late-frames"); options.add("--no-skip-frames"); options.add("--rtsp-tcp"); options.add("--avcodec-hw=any"); options.add("--live-caching=300"); options.add("--mod-noisereduction");
I caught the log log.txt
Hello,
I was able to reproduce it using this command:
//open VLC and force use TCP
vlc --rtsp-tcp rtsp://192.168.0.6:1935
Test with version 1.3.4 Also:
I updated to the latest version and the problem no longer occurs.
But there is a kotlin coroutine exception that occurs once every 5 seconds.
Hello,
I know about that error but you can ignore it. This issue is temporal fix that I ddid until ktor fix a problem related with timeout, you can ignore that issue because the library works even with that error.
Closing as solved, let me know if you have more problems. You can reopen the issue if needed
E Unexpected error java.lang.ArrayIndexOutOfBoundsException: length=0; index=0 at com.pedro.rtsp.rtsp.RtspSender.setSocketsInfo(SourceFile:38) at com.pedro.rtspserver.server.ServerClient$startClient$1.invokeSuspend(SourceFile:463) at nb.resumeWith(SourceFile:12) at x22.O0(SourceFile:7) at h.resumeWith(SourceFile:14) at nb.resumeWith(SourceFile:48) at l50.run(SourceFile:126) at r11$a.run(SourceFile:4) at rf2.run(SourceFile:3) at wt.e0(SourceFile:1) at wt$c.b(SourceFile:34) at wt$c.m(SourceFile:29) at wt$c.run(SourceFile:1)