audio

Can't give metadata of comment to MP3 file using ffmpeg

拥有回忆 提交于 2021-02-05 08:47:26
问题 I want to covert a AAC to MP3 and give metadata of comment to the MP3 file using ffmpeg. But -metadata comment doesn't work and ffmpeg doesn't return any error. My code is ffmpeg -i "test.aac" -ab 128k -metadata comment='this is test' "test.mp3" I tried -metadata description='this is test' and also update ffmpeg. Other function such as -metadata artist and -metadata album works well. What's wrong with this code? Output Stream mapping: Stream #0:0 -> #0:0 (aac (native) -> mp3 (libmp3lame))

Continuously streaming random audio from database

烂漫一生 提交于 2021-02-05 08:29:05
问题 I'm planning out a project for a very simple audio streamer that would take a mysql database list of songs hosted on my local server, and then randomly stream a song from the list constantly throughout the day. This would be attached to a very simple frontend page that would display the name of the currently playing song. I know how to get a random file from the database and stream it using a Javascript/HTML front end, but I'm getting lost on how to detect when a song is over - and then load

Is it possible to open 2 microphones in Android at same time with Oboe library?

爷,独闯天下 提交于 2021-02-05 06:10:24
问题 I'm trying to open 2 microphone streams with google's Oboe library like this, for each microphone: oboe::AudioStreamBuilder builder; builder.setChannelCount(channelCount) ->setDirection(isInput ? oboe::Direction::Input : oboe::Direction::Output) ->setSharingMode((oboe::SharingMode) sharingMode) ->setPerformanceMode((oboe::PerformanceMode) performanceMode) ->setInputPreset((oboe::InputPreset)inputPreset) ->setDeviceId(deviceId) ->setSessionId((oboe::SessionId) sessionId) ->setSampleRate

AVAudioPlayer Swift 3 not playing sound [duplicate]

瘦欲@ 提交于 2021-02-04 21:00:26
问题 This question already has an answer here : iOS Swift: Sound not playing (1 answer) Closed 3 years ago . I added the AVFoundation.framework to my project. In my project navigator I added the file "Horn.mp3", this is a sound of 1 second. When a button is pressed (with a image of a horn) the sound should play, also should a label change it's text. The label is changing it's text, but the sound isn't playing. This is my code: import UIKit import AVFoundation class ViewController: UIViewController

Audio through Cron Job

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-04 20:59:19
问题 Does anyone know why audio wouldn't run through a cron job even though it runs perfectly fine when run through the command line. I have a python script that plays audio through a bluetooth speaker and when I run it on the command line (python helper.py) it plays fine, but running it through cron doesn't seem to work. Extra details: I am doing this on a Raspberry Pi that I have connected to a bluetooth speaker. I have a display connected to the raspberry pi (not doing it headless but that is

Manage Multiple Audio Sources in React

拟墨画扇 提交于 2021-02-04 19:12:09
问题 I have a React component that plays/pauses audio when you click on a button. It works great and I render about 5 of these on a page at once. However, if you click play on one, and then click play on another, both audio's are playing, which isn't great. Here's my code for the component: import React from 'react'; import playIcon from './images/play.png'; import pauseIcon from './images/pause.png'; class Music extends React.Component { constructor(props) { super(props); this.state = { 'play':

Android 4.0.4 WebView MediaPlayer Error (1, -2147483648) Using <audio> Tag and Local Assets File

旧城冷巷雨未停 提交于 2021-02-04 17:52:53
问题 I'm new to Android and have been trying to get the HTML5 <audio> tag to work in a WebView browser but keep getting MediaPlayer Error (1, -2147483648). The file I'm trying to play resides below the "assets" directory. I've tried referencing a file in the "res/raw" directory, but with the same result. To verify that the files could be found and played, as part of my tests I created a variation of the code where the sound would be triggered through an <a> tag and would be processed by a

Android 4.0.4 WebView MediaPlayer Error (1, -2147483648) Using <audio> Tag and Local Assets File

≡放荡痞女 提交于 2021-02-04 17:52:49
问题 I'm new to Android and have been trying to get the HTML5 <audio> tag to work in a WebView browser but keep getting MediaPlayer Error (1, -2147483648). The file I'm trying to play resides below the "assets" directory. I've tried referencing a file in the "res/raw" directory, but with the same result. To verify that the files could be found and played, as part of my tests I created a variation of the code where the sound would be triggered through an <a> tag and would be processed by a

howto stream numpy array into pyaudio stream?

喜你入骨 提交于 2021-02-04 16:06:24
问题 I'm writing a code that supposed to give some audio output to the user based on his action, and I want to generate the sound rather than having a fixed number of wav files to play. Now, what I'm doing is to generate the signal in numpy format, store the data in a wav file and then read the same file into pyaudio . I think this is redundant, however, I couldn't find a way to do that. My question is, can I stream a numpy array (or a regular list) directly into my the pyaudio to play? 回答1: If

Python + winsound - check whether an audio file is being played

橙三吉。 提交于 2021-02-04 07:31:09
问题 Is there a way to check whether an audio file is being played using winsound? The idea is that music is played in the background while the user can input data via the terminal. In order to achieve this I decided to use SND_ASYNC. The thing is though, once the file is finished playing I want it to play another audio file but I have no means of checking when the audio file is actually done playing. I suppose I could check how long the audio file is and play a different song based on that but I