audio-streaming

ios avplayer trigger streaming is out of buffer

安稳与你 提交于 2019-11-27 00:02:33
问题 I want to reconnect to the server when the streaming buffer is empty. How can I trigger a method when the AVPlayer or AVPlayerItem buffer is empty? I know there are playbackLikelyToKeepUp , playbackBufferEmpty and playbackBufferFull methods to check the buffer status, but those are not callbacks. Are there any callback functions, or any observers I should add? 回答1: you can add observer for those keys: [playerItem addObserver:self forKeyPath:@"playbackBufferEmpty" options

Audio data streaming in HTML5

让人想犯罪 __ 提交于 2019-11-26 22:38:50
问题 I am receiving PCM audio data from the server in small chunks and having them stored in an Array. Now I would like to play these audio chunks sequentially without gaps using some HTML5 capability. Two options which I am looking at as 'possible' solutions are: HTML5 Audio tag with Data URI Web audio API While I am investigating these options, please suggest me any other option or views on the two options I am looking at. Though a cross platform solution will be the best but I can settle for

Why does it take so long for Android's MediaPlayer to prepare some live streams for playback?

倖福魔咒の 提交于 2019-11-26 21:40:55
I am finding big differences in the time it takes the Android MediaPlayer to prepare for live stream playback with different streams. The hard data I added logging between prepareAsync() and the onPrepared(MediaPlayer mp) callback and tested several streams a few times each. The times for each stream were very consistent (+/- one second), and here are the results: MPR news stream: 27 seconds (http://newsstream1.publicradio.org:80/) MPR classical music stream: 15 seconds (http://classicalstream1.publicradio.org:80/) MPR The Current stream: 7 seconds (http://currentstream1.publicradio.org:80/)

Realtime Audio/Video Streaming FROM iPhone to another device (Browser, or iPhone)

点点圈 提交于 2019-11-26 19:12:49
问题 I'd like to get real-time video from the iPhone to another device (either desktop browser or another iPhone, e.g. point-to-point). NOTE: It's not one-to-many, just one-to-one at the moment. Audio can be part of stream or via telephone call on iphone. There are four ways I can think of... Capture frames on iPhone, send frames to mediaserver, have mediaserver publish realtime video using host webserver. Capture frames on iPhone, convert to images, send to httpserver, have javascript/AJAX in

Receive audio via Bluetooth in Android

匆匆过客 提交于 2019-11-26 17:34:34
问题 I want to create an Android application that is capable of receiving an audio stream. I thought of using the A2DP profile, but is seems as if Android doesn't support A2DP sink. Looks like there are a lot of people that's searching for a solution for this problem. But what about receiving an ordinary bit stream, and then convert the data into audio in the application? I was thinking of receiving an PCM or Mp3 data stream via the RFCOMM (SPP Bluetooth profile), and then play it using AudioTrack

How to record webcam and audio using webRTC and a server-based Peer connection

≡放荡痞女 提交于 2019-11-26 16:56:23
I would like to record the users webcam and audio and save it to a file on the server. These files would then be able to be served up to other users. I have no problems with playback, however I'm having problems getting the content to record. My understanding is that the getUserMedia .record() function has not yet been written - only a proposal has been made for it so far. I would like to create a peer connection on my server using the PeerConnectionAPI. I understand this is a bit hacky, but I'm thinking it should be possible to create a peer on the server and record what the client-peer sends

Stream Live Android Audio to Server

随声附和 提交于 2019-11-26 16:53:50
I'm currently trying to stream live microphone audio from an Android device to a Java program. I started off with sending the live audio between two android devices to confirm my method was correct. The audio could be heard perfectly with barely any delay on the receiving device. Next I send the same audio stream to a small Java program and I verified that the data was being sent here correctly too. Now what I want to do is encode this data and somehow play it back on the server running the Java program. I would rather play it in a web browser using HTML5 or JavaScript but I am open to

Using AudioTrack in Android to play a WAV file

落花浮王杯 提交于 2019-11-26 15:48:31
问题 I'm working with Android, trying to make my AudioTrack application play a Windows .wav file (Tada.wav). Frankly, it shouldn't be this hard, but I'm hearing a lot of strange stuff. The file is saved on my phone's mini SD card and reading the contents doesn't seem to be a problem, but when I play the file (with parameters I'm only PRETTY SURE are right), I get a few seconds of white noise before the sound seems to resolve itself into something that just may be right. I have successfully

The easiest way to play an audio RTMP stream in Android

喜欢而已 提交于 2019-11-26 15:28:45
问题 I found some Android RTMP libraries (like this : http://rtmpdump.mplayerhq.hu/). The problem is that there is no accurate documentation on how we can use it. In my case, I have a simple RTMP live audio stream (ex: rtmp://myserver/myapp/myliveaudio). What is the easiest way to read it in my Android app? Please, I don't want links: I need some pieces of code or some accurate step-by-step explanation. Thank you very much. 回答1: It is unfortunately non-trivially difficult to do. Right now your

Android 2.2 MediaPlayer is working fine with one SHOUTcast URL but not with the other one

柔情痞子 提交于 2019-11-26 11:49:55
Please see the code i am using for streaming shoutcast stream, it works with one URL but NOT with the other one. This one works: Uri myUri = Uri.parse("http://fr3.ah.fm:9000/"); But not with this one: Uri myUri = Uri.parse("http://someOtherURL"); SimpleMusicStream.java import android.app.Activity; import android.media.AudioManager; import android.media.MediaPlayer; import android.net.Uri; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; public class SimpleMusicStream extends Activity implements MediaPlayer.OnCompletionListener,