audio-streaming

How to synchronize media playback over an unreliable network?

旧街凉风 提交于 2019-12-04 09:37:07
问题 I wish I could play music or video on one computer, and have a second computer playing the same media, synchronized. As in, I can hear both computers' speakers at the same time, and it doesn't sound funny. I want to do this over Wi-Fi, which is slightly unreliable. Algorithmically, what's the best approach to this problem? EDIT 1 Whether both computers "play" the same media, or one "plays" the media and streams it to the other, doesn't matter to me. I am certain this is a tractable problem

Python: realtime audio streaming with PyAudio (or something else)?

泄露秘密 提交于 2019-12-04 07:54:21
问题 Currently I'm using NumPy to generate the WAV file from a NumPy array. I wonder if it's possible to play the NumPy array in realtime before it's actually written to the hard drive. All examples I found using PyAudio rely on writing the NumPy array to a WAV file first, but I'd like to have a preview function that just spits out the NumPy array to the audio output. Should be cross-platform, too. I'm using Python 3 (Anaconda distribution). 回答1: This has worked! Thanks for help! def generate

How to Play the online streaming radio in Android

天涯浪子 提交于 2019-12-04 04:05:22
I am developing one application where i want to play live stream radio. I have an url using which i will stream the radio and play. I have a play button by clicking which i want to play the radio. For that, i have written some code which is not at all working. Here is my code: mp = new MediaPlayer(); try { mp.setOnPreparedListener(this); Log.d("Testing", "start111"); mp.setAudioStreamType(AudioManager.STREAM_MUSIC); String url="xxxxxx"; mp.setDataSource(url); mp.prepareAsync(); } catch (IllegalArgumentException e) { e.printStackTrace(); Log.d("Testing", "Exception ::: 1111 "+e.getMessage()); }

send a multicast audio in rtsp using libstreaming for upstreaming from an android device

和自甴很熟 提交于 2019-12-04 03:38:38
问题 The code is only streaming for one user at a time. Can anyone help me to play the stream in more than one system at the same time(convert it to multicast or broadcast). Thanks in advance. The library source is over here: https://github.com/fyhertz/libstreaming my current code is: mSurfaceView = (net.majorkernelpanic.streaming.gl.SurfaceView) findViewById(R.id.surface); // Sets the port of the RTSP server to 1234 Editor editor = PreferenceManager.getDefaultSharedPreferences(this).edit();

kAudioDevicePropertyBufferFrameSize replacement for iOS

Deadly 提交于 2019-12-03 22:22:34
I was trying to set up an audio unit to render the music (instead of Audio Queue.. which was too opaque for my purposes).. iOS doesn't have this property kAudioDevicePropertyBufferFrameSize .. any idea how I can derive this value to set up the buffer size of my IO unit? I found this post interesting.. it asks about the possibility of using a combination of kAudioSessionProperty_CurrentHardwareIOBufferDuration and kAudioSessionProperty_CurrentHardwareOutputLatency audio session properties to determine that value.. but there is no answer.. any ideas? You can use the kAudioSessionProperty

An extensive project: Streaming audio from microphone to Android device

蓝咒 提交于 2019-12-03 22:16:10
问题 I want to take audio input from a Bluetooth microphone and stream it out loud--like a megaphone or a simple PA system-- and broadcast it in real-time . For this purpose I am using the AudioRecord and AudioTrack classes--since MediaRecorder and MediaPlayer writes and reads to an external file, which I could imagine delays the audio much more than necessary (is this true?). I have discarded the idea of using any Bluetooth classes since the Android API doesn't support the Android device as a

Python 3 get song name from internet radio stream

谁都会走 提交于 2019-12-03 22:02:12
How can I get song name from internet radio stream? Python: Get name of shoutcast/internet radio station from url I looked here, but there is only getting name of radio station. But how to get name of the playing song? Here is stream link from where I want to get name of song. http://pool.cdn.lagardere.cz/fm-evropa2-128 How should I do it? Can you help me please? To get the stream title, you need to request metadata. See shoutcast/icecast protocol description : #!/usr/bin/env python from __future__ import print_function import re import struct import sys try: import urllib2 except ImportError:

Concatenating 'audio/x-wav' buffer and serving with 'Transfer-Encoding': 'chunked'

血红的双手。 提交于 2019-12-03 21:40:55
This question is a followup to a previous question , that was resolved thanks to @thejh. I'm trying to convert text to audio and serve the data to the client as 'chunked' data. So far my headers look like so: res.writeHead(200, { 'Content-Type': 'audio/wav', // I tried 'audio/x-wav' as well 'Transfer-Encoding': 'chunked' }); And then I'm converting snippets of text to audio in a queue (which I get back as base64 encoded data), and serving them like so: var src = Base64Audio.replace("data:audio/x-wav;base64,",""); var binAudio = new Buffer( src, 'base64'); res.write(binAudio); All the

Is there a good radio-like audio streaming solution for node.js?

流过昼夜 提交于 2019-12-03 20:25:24
问题 I'm looking for something to stream audio like radio (playing continuously and clients can join in the middle of a song) with node.js. Is there any node.js module (which I couldn't find)or anything else that I can use along with node.js to achieve this? Is this possible at all with node.js? If not, what do you recommend to use otherwise? (though, I prefer node.js) It's ok for me to use HTML5 Audio API and I don't care about IE support. Thanks. 回答1: Yes, this is entirely possible. I am hosting

AVPlayer got the metadata but not playing

南楼画角 提交于 2019-12-03 17:22:38
I'm trying to do a very simple application, the purpose is listening an audio stream ( AAC 64 kbps ). To do so I'm using AVPlayer from the Apple AVFoundation has follow : ViewController.m #import "ViewController.h" @interface ViewController () @end @implementation ViewController @synthesize playerItem, player; - (void)viewDidLoad { [super viewDidLoad]; } - (void) viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; playerItem = [AVPlayerItem playerItemWithURL:[NSURL URLWithString:@"http://stream.myjungly.fr/MYJUNGLY2"]]; [playerItem addObserver:self forKeyPath:@"timedMetadata"