1

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

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 but on some devices (and Android versions) is seems to work and on others it does not.

I already asked this question on the Videolan forum, but with no luck.

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

Mohru
  • 725
  • 1
  • 7
  • 17

1 Answers1

0

I don't think LibVLC can do this, and it's a bit out of scope of a multimedia framework.

I would handle this on the app side if I were you, using something like How do I connect to a specific Wi-Fi network in Android programmatically?

mfkl
  • 1,914
  • 1
  • 11
  • 21
  • I didn't mentioned that before, but I use the latest Android networking API: https://developer.android.com/guide/topics/connectivity/wifi-bootstrap and there actually seems to be a problem with this and VLC. Currently, I'm discussing it with the VLC team. – Mohru Feb 01 '21 at 13:28