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?
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?
Related
I'm going through the WebRTC tutorial, and trying to setup their sample code.
Problem is, i do not have a webcam. I quickly realized that my Android phone can be used as a webcam using an App called IP Webcam, which transmits the video via wifi to my computer(which can be viewed in a special address).
Is there anyway, that this can be recognized and used by getUserMedia?
I'm using this sample code from he tutorial:
https://codelabs.developers.google.com/codelabs/webrtc-web/#3
When i run it, i get this error:
code: 8 message: "Requested device not found" name: "NotFoundError"
Is there any way to make WebRTC aware of the connected phone?
I'm using Windows 7, latest Chrome, and serving the sample code via Xampp(if any of it matters)
My application should stream voice from one device to all the other devices on the network (similar to PTT. only 1 device steams to the other devices)
Assumptions:
1. The speaker can be either Android or iPhone.
2. The network does not support multicast.
3. All the devices are connected a local router (no internet in the environment).
4. The maximum amount of devices is 40.
How should I implement this feature? Is there an open-source SDK for this? Is there a non-free SKD for this?
Maybe WebRTC can solve your problem. Check it out https://webrtc.org/
Tokbox
yes, here's the best one out there that i've used extensively, not only for audio chat but also video and more, it works perfectly with IOS if you know what you're doing
https://tokbox.com
at the moment I'm planning to build an cross-plattform app (iOS/android) that streams music from one device to others without internet. Now I'm considering which network technology is best for this use case. By the way I'm sorry I didn't say hello to you, it disappears all the time.
Existing wifi network:
I don't wanna use this because I want my app to work everywhere.
Wifi-Direct:
Not supported by iOS (tell me if I'm wrong).
Bluetooth:
Here I've found kind of conflicting information.
Bluetooth 2.1 is supported by both iOS and android but iOS has its own protocols and doesn't support the common ones.
Bluetooth Low Energy provides a data rate that is too slow for high quality music streaming (1Mbit) and is supported by iOS but on the android side version 4.3 is required which suspends about half of all users.
What I'm not sure about is the "normal" (not LE) usage of Bluetooth 4.0. Does anyone have experience/information about this?
Creating a wifi hotspot:
This was my first idea and probably it's the best. But there are several issue:
Some carriers do not allow hotspots
It's not possible to create a hotspot without cell reception on the iPhone and some (I don't know which exactly) android devices.
It's not possible to create a hotspot without cellular data activated on an iPhone; I don't know what about android devices (Nexus 4: no problem, SGS3 mini: cellular data can be switched off after creating the hotspot)
-> that's a problem for those who don't have an internet unlimited plan or for those who don't want to share their internet connection (as this dissipates the high speed volume) but see the next point for that.
In order that everyone can use his own cellular data connection the wifi settings can be manually edited on iOS (remove router, DNS and search domains entries). Is there a way to do so on android as well? Is there way to automize this process?
https://apple.stackexchange.com/questions/173894/can-i-connect-to-wifi-but-still-use-cellular
Is there any way to create a wifi network programmatically (not just enable the normal wifi hotspot)?
SDKs/Frameworks like Open Garden or Alljyon looked promising at the beginning but:
Firechat (which is made by the Open Garden team) promises that iOS and android devices can chat locally without existing network but actually it didn't work for me with an iPhone 6 and SGS3 mini. However they don't want to publish their SDK. The only information I got is that it works over wifi-direct and bluetooth. If anyone has an idea how this could work, please tell me.
Alljoyn does not provide direct communications between iOS and android without an existing network. (Tell me if I'm wrong)
API's:
iOS multipeer connectivity does not support android
I hope anyone can help me.
Regards Nils
If you are talking about a TVBOX device with Android, you will need the ethernet cable connected in order to create a hotspot.
Another option that I have done is:
Create a service that runs on iPhone with an interfaz, do whatever you want on that interfaz, then send what ever you need to a webservice, then in Android, just pull that info from another App as a service, or just store it in an internal sqlite.
Good luck
Hello I'm in the early stages of an app and part of it i need to stream audio from one device to multiple devices. I have been googling around looking for the best solution on doing this so far i found these two projects each with problems.
Spydroid http://code.google.com/p/spydroid-ipcamera/
Problem The problem with this one is it creates an rtsp stream which is limited to one connected device. If i browse to the link on both of my computers i see both clients connect in the app but then the second one to connect instantly disconnects and the app says my phone doesn't support this feature. I dove into the source and found in the Session.java file there were if statements with comments above them saying prevents two connections from being made i commented out the if statements and the catch clause caught me after running it. This project would be perfect if i could get it to work with multiple connections as it works over 3g.
PttDroid http://code.google.com/p/pttdroid/
Problem The problem with this one is it allows me the multiple connections i need but i only can get it working over wifi. It says on the home page there that it works over 3g but only the unicast i need multi cast over 3g and wifi and i was unable to get the unicast to work as well over 3g.
So my question comes down to this what path should i go down and look more into for streaming audio from my android device to multiple computers and other android devices.
Thank you very much for any help!
Cellular networks do not usually support multicast packets. The cellular routers simply don't route them, so that is a dead end.
You thus need to do unicast to multiple destinations which may be challenging for the limited cellular bandwidth of the phone. You are very likely to run into contention on the cellular bandwidth with just one or two streams, even if you can get them running out of the same device. (Multiple Spydroid streams of the same file for instance.)
If I were building a system to do this, I would consider setting up a server to do reflection. So I would look to use something like Spydroid to run an RTSP stream up to a server and then reflect that off the server to a number of subscribers. This is not a small project but would allow you to stream to multiple users using the servers higher bandwidth.
There is apparently a project going after this reflector strategy here:
https://code.google.com/p/js4ms/wiki/RTSPMulticastReflector
I have not tested it at all to know if it works, but that should at least get you started on the right path.
I'll explain the problem I'm trying to solve first. I have two Adobe AIR applications that can be deployed to Android (Receiver App and Broadcaster App). The Receiver App sits on one Android device and waits for any Android devices running the Broadcaster App (on the local network). This is all currently working and I can have the devices talking over a local WiFi connection with no problem.
The issue is I need to be able to do this without an external router/AP. I was able to setup a third Android device as a Wireless AP and have two other Android devices communicate over the WiFi connection just fine. However, the device setting up the Wireless AP connection is not able to join the network.
After searching google and stackoverflow I came up with a few solutions.
(1) Set up an Ad-Hoc network using a rooted Android device and running Barnacle. I was able to try this and set up an Ad-Hoc network successfully between two devices but they were not able to establish a connection in the Adobe AIR apps (using Adobe P2P support).
(2) If I can get my hands on the new Android 4.0 Galaxy Nexus I understand I'll have access to WiFi-Direct. I'm curious if this will solve my problem. Can I set up AND join a Wireless AP using the Galaxy Nexus, and connect to the Wireless AP from my older 2.X devices? Reading this makes me believe I can, but I wanted to know if anyone can confirm.
P.S. I am using NetConnection/NetGroup/NetStreams on the Adobe AIR side over a serverless rtmfp connection.
Thanks.
Sean, this may not answer your question, but I've used rtmfp for serverless p2p also (of the kind described in this blogpost by Tom Krcha) and have a couple data points for you:
Many HTC devices and other smartphones have a multicast issue that prevents them from communicating in this way. Google 'htc multicast' and read about it on this blog. Interestingly, these devices can work in such a group as long as there are non-impaired devices also, because they can transmit multicast, just not receive it. So the other devices initiate the group and all can participate. But the impaired devices can't initiate the group by themselves.
I had no trouble communicating between a range of devices, from Android to iOS to desktop, so I assume you should be fine across versions of Android.
I have a rooted phone that I run an app called 'wireless tether' to create a hotspot / wifi access point, and when two other devices connect to that hotspot, they can communicate with each other using this method, but they cannot communicate with the phone that is creating the hotspot network.