B4A Library Play RTSP easily

JohnC

Expert
Licensed User
Longtime User
I can't get this to work.

I click "Start" and nothing happens - no video, no error displayed or in event log.

If I enter the exact same URL into VLC, the video plays fine.

PS. I don't know if this helps but after compiling this example, there is only the permission of "android.permission.FOREGROUND_SERVICE" - there are no permissions requested for network access which I though was strange because this app needs to access the network.
 

josejad

Expert
Licensed User
Longtime User
Hi:

It's working for me, thanks for sharing¡¡
I will donate to Biswagit as soon as possible¡¡
 

JohnC

Expert
Licensed User
Longtime User
OK, I added "AddPermission("android.permission.INTERNET")" to the manifest.

Now the video plays, but no audio :(
 
Last edited:

JohnC

Expert
Licensed User
Longtime User
If possible, it would be great if this wrapper could support a volume property, so that the user could control the volume.
 
Last edited:

darabon

Active Member
I can't get this to work.

I click "Start" and nothing happens - no video, no error displayed or in event log.

If I enter the exact same URL into VLC, the video plays fine.

PS. I don't know if this helps but after compiling this example, there is only the permission of "android.permission.FOREGROUND_SERVICE" - there are no permissions requested for network access which I though was strange because this app needs to access the network.
What is your link?
Do you set username and password correctly?
 

JohnC

Expert
Licensed User
Longtime User
There is no username or password.

This is a temporary link I will keep active for a day or so:

[deleted]

Using VLC, after a small delay, both video and audio work fine.

But using this sample only the video works - I do not get sound.
 
Last edited:

moster67

Expert
Licensed User
Longtime User
But using this sample only the video works - I do not get sound.
Tested with VLC on my computer. I get sound at the beginning of the stream for one second, then it's mute despite codec-info in VLC indicating there is an audio stream included. Perhaps something wrong with the stream?
Same thing with Vitamio5 (video OK but no sound)
 

JohnC

Expert
Licensed User
Longtime User
When I run the latest VLC on my android phone with cell connection, the screen starts black for about 8 seconds, then the video and audio start and both keep streaming OK long term (audio or video does not kick out).

When I test the Vitamio5 with cell connection, always stays black and no audio ("vvit5_Prepared" event never happens).
When I test the Vitamio5 with local network connection (encode is on the local network), video appears in a few seconds, but no audio.

When I test with the wrapper in this thread with cell connection, video starts almost immediately, but never any audio.
When I test with the wrapper in this thread with local network (encode is on the local network), video starts almost immediately, but never any audio.
 
Last edited:

darabon

Active Member
When I run the latest VLC on my android phone with cell connection, the screen starts black for about 8 seconds, then the video and audio start and both keep streaming OK long term (audio or video does not kick out).

When I test the Vitamio5 with cell connection, always stays black and no audio ("vvit5_Prepared" event never happens).
When I test the Vitamio5 with local network connection (encode is on the local network), video appears in a few seconds, but no audio.

When I test with the wrapper in this thread with cell connection, video starts almost immediately, but never any audio.
When I test with the wrapper in this thread with local network (encode is on the local network), video starts almost immediately, but never any audio.
Do you have a testing link that has sound?
I want to give link to Biswagit for testing it
 

JohnC

Expert
Licensed User
Longtime User
I re-enabled the link in post #8.

If you use the latest version of VLC for android and enter that URL into VLC, after about 5 seconds the video AND audio will play.

But for some reason, the audio does not work with this wrapper.

Sending this link to Biswagit would be greatly appreciated.
 

darabon

Active Member
I re-enabled the link in post #8.

If you use the latest version of VLC for android and enter that URL into VLC, after about 5 seconds the video AND audio will play.

But for some reason, the audio does not work with this wrapper.

Sending this link to Biswagit would be greatly appreciated.
Thank you, I hope Biswagit can solve it
 

huli503

New Member
java.lang.NoClassDefFoundError: com/alexvas/rtsp/widget/RtspSurfaceView$$Lambda$1
at com.alexvas.rtsp.widget.RtspSurfaceView.onRtspClientConnected(RtspSurfaceView.kt:253)
at com.alexvas.rtsp.widget.RtspSurfaceView.access$onRtspClientConnected(RtspSurfaceView.kt:22)
at com.alexvas.rtsp.widget.RtspSurfaceView$proxyClientListener$1.onRtspConnected(RtspSurfaceView.kt:98)
at com.alexvas.rtsp.RtspClient.execute(RtspClient.java:467)
at com.alexvas.rtsp.widget.RtspSurfaceView$RtspThread.run(RtspSurfaceView.kt:229)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.alexvas.rtsp.widget.RtspSurfaceView$$Lambda$1" on path: DexPathList[[zip file "/data/app/b4a.example-1.apk"],nativeLibraryDirectories=[/data/app-lib/b4a.example-1, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
... 5 more
** Activity (main) Pause, UserClosed = true **
 

mehdipass

Active Member
Why this error?
Error:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension;
    at com.alexvas.rtsp.widget.RtspSurfaceView$RtspThread.run(RtspSurfaceView.kt:233)
Caused by: java.lang.ClassNotFoundException: com.google.devtools.build.android.desugar.runtime.ThrowableExtension
    ... 1 more
 

bruno.ionaldo

Member
Licensed User
java.lang.NoClassDefFoundError: com/alexvas/rtsp/widget/RtspSurfaceView$$Lambda$1
at com.alexvas.rtsp.widget.RtspSurfaceView.onRtspClientConnected(RtspSurfaceView.kt:253)
at com.alexvas.rtsp.widget.RtspSurfaceView.access$onRtspClientConnected(RtspSurfaceView.kt:22)
at com.alexvas.rtsp.widget.RtspSurfaceView$proxyClientListener$1.onRtspConnected(RtspSurfaceView.kt:98)
at com.alexvas.rtsp.RtspClient.execute(RtspClient.java:467)
at com.alexvas.rtsp.widget.RtspSurfaceView$RtspThread.run(RtspSurfaceView.kt:229)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.alexvas.rtsp.widget.RtspSurfaceView$$Lambda$1" on path: DexPathList[[zip file "/data/app/b4a.example-1.apk"],nativeLibraryDirectories=[/data/app-lib/b4a.example-1, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
... 5 more
** Activity (main) Pause, UserClosed = true **

same error here
 

German Buchmuller

Member
Licensed User
Longtime User
Why this error?
Error:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension;
    at com.alexvas.rtsp.widget.RtspSurfaceView$RtspThread.run(RtspSurfaceView.kt:233)
Caused by: java.lang.ClassNotFoundException: com.google.devtools.build.android.desugar.runtime.ThrowableExtension
    ... 1 more
Same error.
Solution: select ExoPlayer in libraries.
 

German Buchmuller

Member
Licensed User
Longtime User
ExoPlayer in b4a not support rtsp link.
No. I didn't say ExoPlayer supports RTSP. What I said is to select ExoPlayer Library in the IDE to solve the following error
B4X:
java.lang.ClassNotFoundException: com.google.devtools.build.android.desugar.runtime.ThrowableExtension
while using RTSP Library.
In other words, RTSP Library requires ExoPlayer Library to be selected.
 
Top