Hi I want to stream a video from my android phone to another android phone over bluetooth, I see that there is a VDP to use but this profile is not available in android sdk there is a profile A2dp which is responsible for audio streaming only. Is there a different method in order to implement that with android sdk?
As I known, if you want to make the video streaming over bluetooth, it's not suitable. Because whether SPP or BLE is not suitable for this kind of mass data transmission, I mean that if you want to make it as good as the A2DP over bluetooth, I mean the Real-Time. But if you don't care about the Real-Time. You can use SPP or BLE to transmit the video data, and encode/decode the video data by yourself. The most important is that the transmit speed of Bluetooth.
If you just only need to transmit the video file to the other device, you can treat the video as a file, and transmit it as data.
I think there is an AVDTP profile to do that in Bluetooth classic.
and even AVCTP for controlling that stream as well.
Related
The hardware which is raspberry pi, is connected to an android mobile device via wifi-network. The raspberry has a connected camera. I can fetch the stream from the hardware camera and show it in a Custom SurfaceView in Android Application from the HTTP URL. The format for video capturing is MJPEG.
What I need to achieve is to send the live video stream of that hardware camera to WebRTC kinesis video streams from the android application.
Can anyone please help me with this?
Thanks.
It's not immediately clear what your scenario is. If you refer to Kinesis Video Stream then your RPi could stream directly into KVS using the KVS Producer SDK.
If, however, your device needs to act as a WebRTC master then you can use KVS embedded WebRTC project. There is a master sample application that you can model your application after.
I am currently researching on building a live broadcasting module as a part of my app and this is the usecase: One user A will record his voice using the mic and this data has to be streamed to a server while the other devices should be able to receive this audio and play it.All of them will be connected to the same network. I would like to preferably use a server that is not java based. I have currently looked into the solutions provided in the following links:
[1]: Stream Live Android Audio to Server [2]: Streaming voice between Android Phones over WiFi [3]: Android streaming live mic audio between two android devices via wifi
I have also considered some 3rd part libraries but I do not wish to use them since they are expensive.
I am currently working on an Android audio visualizer using connected smart home devices (such as Philips hue) to visualize music. I have trouble compensating the delay caused by bluetooth speakers.
I have noticed, that the Youtube app, in difference to many other video streaming apps, has almost no delay between audio and video, when using bluetooth speakers.
I figure, that they must compensate for the bluetooth latency by adjusting (delaying) the video signal.
Is there a reasonable way of detecting or approximating the latency/delay of bluetooth speakers?
Thank you very much for you help!!
Best,
Stefan
This would not work for Bluetooth speakers. However, I have been able to measure the audio latency of a Bluetooth dongle using Google's Dr. Rick O'Rang loopback dongle, using Glenn Kasten test app.
AVDTP 1.3 protocol supports delay reporting. Try looking to see if Android exports this data.
It's in the somewhere: AVDT_PSC_DELAY_RPT is present in https://android.googlesource.com/platform/system/bt/+/master/stack/include/avdt_api.h#153.
I'm considering building an Android app that allows for streaming audio via bluetooth to and from the Android phone. I've read similar questions on Stackoverflow before, and based on my understanding, A2DP cannot be used as Android can't become an A2DP sink.
In theory, I believe that a profile such as HFP or HFP AG should allow for bidirectional audio streams. In the Android API, is there a way to force a bluetooth pairing to follow this profile, or does the OS decide which profile to use (such as forcing HFP only when there's a phone call going on)?
I've been able to achieve what I wanted using RFCOMM-based SPP. In order to send audio to the external device, I use the AudioRecord API to record PCM-16 audio to stream audio realtime over Bluetooth. In order to receive audio, I spawn a thread that is responsible for outputting audio to the speaker using the AudioTrack API (in streaming mode)
I'm looking to see if there's a way to get the audio and video streaming in from the bluetooth connection in an android app that I'd create.
http://www.looxcie.com/index.php/companion-apps/looxciecam
Looxcie has their own app which saves their video to a file, but I'd want access to the raw video stream using MediaRecorder if possible.
Thanks!
The Looxcie device lacks in technical information that could help a developer to use it in a custom application. My advice is that first to check what Bluetooth profiles are available on that device and maybe there is VDP - Video Distribution Profile, A2DP - Advanced Audio Distribution Profile and AVRCP - Audio/Video Remote Control Profile.
But from what I know on Android you have only A2DP and no VDP. So, probably they send data over SPP - Serial Port Profile and reconstruct it on Android. If they work this way, is nothing you can do, it's like a proprietary format. You could ask Looxcie for more information about the device, they look like a friendly/enthusiastic open company and maybe they will share information.
A trick you could make is use that file feature, and have it like a virtual file that goes into your MediaRecorder. Again it may not work, it's possible that they don't write all the time, but periodically put chunks of data.