Using specific network with libVLC on Android

This forum is about all development around libVLC.
mohru_mo
New Cone
New Cone
Posts: 7
Joined: 25 Jun 2020 19:07

Using specific network with libVLC on Android

Postby mohru_mo » 21 Dec 2020 20:08

I'm using libVLC in my Android app to stream video over rtsp from the camera that I'm connected to over WiFi.

In general, streaming works fine, but there seems to be streaming problem if I'm connected do the camera by WiFi (that provides no internet) and also have got mobile data turned on. I use bindProcessToNetwork to make sure that the streaming is done via my WiFi network. On some devices (like Huawei Mate 10 with Android 9) the streaming works ok (it seems to use WiFi and ignore having mobile data on), but on other devices (like Samsung Note 10 with Android 10) when I use new networking API it seems that VLC is trying to connect via the mobile data, and only after some time when it fails it decides to use my camera's WiFi (despite the fact that I used bindProcessToNetwork).
I get an error log

Code: Select all

VLC-std: Unable to determine our source address: This computer has an invalid IP address: 0.0.0.0
Suprisingly, it works fine if I connect to my WiFi from the system settings...

I found some comments that media streaming is done in a separate process, and it ignores calling to bindProcessToNetwork https://stackoverflow.com/questions/419 ... ediaplayer but on some devices (and Android versions) is seems to work and on others it does not.

Is there a way to force libVLC to stream using a specified network?

mohru_mo
New Cone
New Cone
Posts: 7
Joined: 25 Jun 2020 19:07

Re: Using specific network with libVLC on Android

Postby mohru_mo » 11 Jan 2021 10:14

Not even hint on that? It would be really helpful to know if libVLC is able to pick the network to use (or somehow enforce it) or is it handled only by the system. I'm not a low-level programmer, and I'd prefer to avoid digging in your C++ code (and probably just find nothing).
In current situation, if I'm connected both to mobile data and to wifi it takes libVLC about 10 seconds to connect to the proper network to stream, and then is has 10 seconds of lag, which is unacceptable for live-streaming.

If this is all handled by the system, then I would probably have to report an issue to Google, but I'm pretty sure they will not do anything about it as it is rather a specific case.
I'm really counting on you with this one.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 11 guests