audio-streaming

How do I use gstreamer to make an audio clip from a segment of a longer source?

这一生的挚爱 提交于 2019-12-04 16:03:16
I would like to use gstreamer to save an arbitrary clip from one audio file to a new file. For example, a segment from 1 minute to 2 minutes in the original. How do I do it? You need gnonlin . See http://www.jonobacon.org/2006/12/27/using-gnonlin-with-gstreamer-and-python/ You won't need a gnlcomposition because you only want one segment. Use a gnlfilesource with its start and duration set to 0, 1 minute, and media-start and media-duration set to 1 minute, 1 minute. All times and durations are in nanoseconds. Take 5 seconds from source.mp3 starting at 10 seconds, write to destination.ogg : gst

Android Record raw bytes into WAVE file for Http Streaming

左心房为你撑大大i 提交于 2019-12-04 14:16:41
问题 So I am using AudioRecord from Android to record raw bytes and for writing them into a .wav file. Since Android has no support for this I had to write the .wav file headers manually with the following code: randomAccessWriter.writeBytes("RIFF"); randomAccessWriter.writeInt(0); // Final file size not known yet, write 0 randomAccessWriter.writeBytes("WAVE"); randomAccessWriter.writeBytes("fmt "); randomAccessWriter.writeInt(Integer.reverseBytes(16)); // Sub-chunk size, 16 for PCM

moving audio over a local network using GStreamer

蓝咒 提交于 2019-12-04 14:10:22
问题 I need to move realtime audio between two Linux machines, which are both running custom software (of mine) which builds on top of Gstreamer. (The software already has other communication between the machines, over a separate TCP-based protocol - I mention this in case having reliable out-of-band data makes a difference to the solution). The audio input will be a microphone / line-in on the sending machine, and normal audio output as the sink on the destination; alsasrc and alsasink are the

Cracks in webaudio playback during streaming of raw audio data

走远了吗. 提交于 2019-12-04 13:56:13
I have a server sending chunks of raw audio over a websocket. The idea is to retrieve those and play them in a way to have the smoothest playback possible. Here is the most important piece of code: ws.onmessage = function (event) { var view = new Int16Array(event.data); var viewf = new Float32Array(view.length); audioBuffer = audioCtx.createBuffer(1, viewf.length, 22050); audioBuffer.getChannelData(0).set(viewf); source = audioCtx.createBufferSource(); source.buffer = audioBuffer; source.connect(audioCtx.destination); source.start(0); }; This works decently well, but there are some cracks in

Google Cast slow for some streams

南楼画角 提交于 2019-12-04 11:44:40
I have an Android app which plays live streams from web (mostly icecast) via Google Cast. Everything worked fine and fast, but now it takes much longer time for some streams to start (make sound). This may be somehow related to the Chromecast firmware upgrade as my Chromecast device got updated to the latest version (1.32.124602) recently. This is how I play stream via Cast: MediaMetadata metadata = new MediaMetadata(MediaMetadata.MEDIA_TYPE_GENERIC); metadata.putString(MediaMetadata.KEY_TITLE, "My title"); metadata.putString(MediaMetadata.KEY_SUBTITLE, "My subtitle"); metadata.addImage(new

High audio latency with Icecast and Darkice

雨燕双飞 提交于 2019-12-04 11:21:01
问题 I have successfully installed icecast and darkice on my ubuntu machine and was able to stream live on my lan. but to my disappointment it has a 15sec to 20sec delay.This is very poor performance. I don't think it is because of my lan connection because even when i tried to listen in that same ubuntu machine there was still a delay! I have tried to configure icecast to have no burst-size which means there will be no buffering,this helped me reduce the delay to around 6sec to 8sec. So please if

Soundcloud custom player add and play song dynamically

大城市里の小女人 提交于 2019-12-04 11:13:14
I am using soundcloud custom player to create a player which can play all the songs on my site. This works pretty good when i just place static url of any track or a post. But what i want is to add the song to the list dynamically. I have done lots of research but couldn't get it to work. What i want is there would be multiple players through out the site. kind of( http://soundcloud.com ) and there would a main player on the top(like soundcloud) which would play around 100 latest songs on site and there would be a smaller player clicking on which will just append that song to the list and

creating multiple audio streams of an icecast2 server using python-shout

守給你的承諾、 提交于 2019-12-04 10:26:27
I am trying to create a web radio server to stream 3 sources at once. I am using python to create a source client for icecast2 using the python-shout library. I am not too familiar with the language (python). however, i got a sample program which does what i need to and more and i have tweaked it for my need. However, I can only create two streams, and after that, i get the error message shown below. I don't know what i'm doing wrong so i hope you guys can help me figure that out. hostname ="localhost" port= 8000 password = "password" import shout import sys import threading from glob import

Noise reduction and compression in streaming audio

荒凉一梦 提交于 2019-12-04 09:47:39
hope you can help. I am recording audio from a microphone and streaming it live across a network. The quality of the samples is 11025hz, 8 bit, mono. Although there is a small delay (1 second), it works great. What I need help with is I am trying to now implement noise reduction and compression, to make the audio quieter and use less bandwidth. The audio samples are stored in a C# array of bytes[], which I am sending/receiving using Socket. Could anyone suggest how, in C#, to implement compression and noise reduction? I do not mind using a third party library as long as it is free (LGPL

Why Icecast2 does not want to give the stream through https?

感情迁移 提交于 2019-12-04 09:41:13
问题 On a server with Ubuntu 14.04 LTS installed Icecast2 2.4.1 with SSL support. Also on this server work HTTPS website. I want insert on the page HTML5-player that will also take the stream through the SSL (otherwise - mixed content error). The site has a commercial SSL certificate, Icecast - a self-signed. Icecast config file: <icecast> <location>****</location> <admin>admin@*************</admin> <limits> <clients>1000</clients> <sources>2</sources> <threadpool>5</threadpool> <queue-size>524288