audio-streaming

Python 3 get song name from internet radio stream

此生再无相见时 提交于 2019-12-05 06:14:45
问题 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? 回答1: To get the stream title, you need to request metadata. See shoutcast/icecast protocol description: #!/usr/bin/env python from

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

[亡魂溺海] 提交于 2019-12-05 06:14:00
问题 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

how to convert getUsermedia audio stream into a blob or buffer?

牧云@^-^@ 提交于 2019-12-05 05:29:17
问题 I am getting audio stream from getUserMeda and then convert it into a blob or buffer and send it to server as audio is comming I am using socket.io to emit it to server how can i convert audio mediastream into buffer? Following is the code that i have written yet navigator.getUserMedia({audio: true, video: false}, function(stream) { webcamstream = stream; var media = stream.getAudioTracks(); socket.emit("sendaudio", media); }, function(e){ console.log(e); } }); How to convert stream into

How to retrieve and play mp3 files from Parse.com

让人想犯罪 __ 提交于 2019-12-05 05:10:59
问题 I'm developing an app in which you can record an audio clip, upload it into a database on Parse.com and then retrieve the audio clip from Parse.com and play it. I'm able to record and upload the audio file on Parse.com, but I don't know what to do about the last step! Here you can see how I save and store the audio clip on Parse.com: byte[] data = outputFile.getBytes(); //ParseUser currentUser = ParseUser.getCurrentUser(); //String usernameText = currentUser.getUsername(); Calendar c =

AVPlayer got the metadata but not playing

為{幸葍}努か 提交于 2019-12-05 02:12:47
问题 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:@

Transcoding and streaming audio - how to send content-range headers

南笙酒味 提交于 2019-12-05 01:39:11
问题 Quick version: how to send correct Content-Range headers when don't know the body length? I have a FLAC file. I want to transcode it to MP3 and stream it to the user immediately. I have something like this so far: function transcode(file) { var spawn = require('child_process').spawn var decode = spawn('flac', [ '--decode', '--stdout', file ]) var encode = spawn('lame', [ '-V0', '-', '-' ]) decode.stdout.pipe(encode.stdin) return encode } var express = require('express') var app = express()

MPMoviePlayerController Audio show “Done” Button

☆樱花仙子☆ 提交于 2019-12-05 01:30:03
问题 I use the MPMoviePlayerController to Play an Audio Stream. My code follows the example at: http://iosdevelopertips.com/video/getting-mpmovieplayercontroller-to-cooperate-with-ios4-3-2-ipad-and-earlier-versions-of-iphone-sdk.html Everything works fine, but while the stream is playing there is no "done" button to close the Player. I tested it first with a normal .mp3 file. With the file the only possibility I found is to skip to the end, so the player gets the

Record radio / audio stream (asx/asf) with a webserver

自古美人都是妖i 提交于 2019-12-04 21:31:37
Is there a way I get PHP (or anything that runs on a linux webserver) to record a (radiostation's)audiostream? Yes, I have sought a lot, but I can't seem to find anything like it, though I'm convinced I can't be the first one - right? My goal is to record an audiostream and then chopping parts of it when listeners are on, so they can listen to themselves afterwards (and family, friends and so on). So recording, uploading, chopping and publishing would be nicer as I have some volunteers willing to do the chopping part (that I think I can take care of). Maybe there is a service I haven't found

Upload audio - http streaming

会有一股神秘感。 提交于 2019-12-04 20:20:08
I'm trying to upload a linear file under http in streaming mode. The idea is do this steps simultaneously, 1) Thread 1: record an audio file and store it in a temp file 2) Thread 2: Take n bytes from temp file and send it to an http server. How can I write an http stream?, On CFHTTPStream I did not see write methods, only read :s Do I need use sockets? Thanks!!! My actual code is CFWriteStreamRef stream; NSString *strUrl = @"myurl"; NSURL *url = [[[NSURL alloc] initWithString:strUrl] retain]; CFStringRef requestMethod = CFSTR("GET"); CFHTTPMessageRef message= CFHTTPMessageCreateRequest

UDP packet-size/latency tradeoff when streaming audio?

大兔子大兔子 提交于 2019-12-04 19:08:11
I'm building an application that streams live audio over udp online and I want to minimize latency. The audio is sent as its generated, meaning it takes one second to generate one second of audio, it cannot be sent faster than the audio-rate. My initial idea was to send small packets of compressed audio so the client can begin playback as soon as possible. Using the Opus codec I should be able to send packets as small as 5ms of audio (2.5ms is the minimum), this would mean the user could start playback pretty soon, lets say after 2 such packets have been delivered. However there is a lot of