mp3

Convert sound file into wav with specific bitrate and cut specific part of the file

删除回忆录丶 提交于 2020-01-14 05:37:06
问题 I have some sound file(basically mp3 but it can be of any bitrate). I need to method to extract specified part of input file(not more than 40 seconds) into 8 bit mono wav output . I would appreciate any help or advice in choosing java library to do that. 回答1: You can use JavaLayer to decode mp3 into wav. Cutting a 40-second clip from a wav shouldn't be a problem. You can find some hints about mixing stereo to mono here: http://www.jsresources.org/examples/SingleChannelStereoConverter.html

Background music in a php/html webpage

扶醉桌前 提交于 2020-01-14 05:23:15
问题 I used an iPhone to record a piece of piano music as .m4a format. I would like to chop it and convert it into a suitable format to be used as the background music in a php/html website. I have the following questions:- 1. what kind of format is the best (e.g. mp3, WAV, etc)? 2. shall I chop the .m4a followed by conversion, or shall I convert it to another format then chop? 3. may I just apply the file in the webpage, to produce a looping effect? but I worry about, after each refresh, the

Convert mp3 to ogg via php

亡梦爱人 提交于 2020-01-13 19:40:50
问题 I have a website where users can upload music and get it converted to mp3, but I need mp3 and ogg file support to play the music in html5. So, is there any php script that can convert mp3 to ogg? 回答1: Use ffmpeg. You can execute commands directly from your php script. 来源: https://stackoverflow.com/questions/5105134/convert-mp3-to-ogg-via-php

MP3 Cover Art Tagging in C#

 ̄綄美尐妖づ 提交于 2020-01-13 07:09:53
问题 I need to tag MP3 files with a Cover Art in C#... Is there any easy way to do this? I found UltraID3Lib as an exampel and it is great for regular ID3 tagging but I cant handle the cover art. If someone know an easy way to do this would it be great :) 回答1: I do something like this: private static void FixAlbumArt(FileInfo MyFile) { //Find the jpeg file in the directory of the Mp3 File //We will embed this image into the ID3v2 tag FileInfo[] fiAlbumArt = MyFile.Directory.GetFiles("*.jpg"); if

MP3 Cover Art Tagging in C#

北慕城南 提交于 2020-01-13 07:09:30
问题 I need to tag MP3 files with a Cover Art in C#... Is there any easy way to do this? I found UltraID3Lib as an exampel and it is great for regular ID3 tagging but I cant handle the cover art. If someone know an easy way to do this would it be great :) 回答1: I do something like this: private static void FixAlbumArt(FileInfo MyFile) { //Find the jpeg file in the directory of the Mp3 File //We will embed this image into the ID3v2 tag FileInfo[] fiAlbumArt = MyFile.Directory.GetFiles("*.jpg"); if

How to play .mp3 file from resources in C#?

守給你的承諾、 提交于 2020-01-12 02:26:47
问题 I put music.mp3 in resources and then I added Windows Media Player to references. I wrote this code: WindowsMediaPlayer wmp = new WindowsMediaPlayer(); wmp.URL = "music.mp3"; wmp.controls.play(); It doesn't work. How can I play .mp3 file from resources? 回答1: I did it: WindowsMediaPlayer wmp = new WindowsMediaPlayer(); Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("PostGen.Resources.Kalimba.mp3"); using (Stream output = new FileStream ("C:\\temp.mp3", FileMode

Ubuntu终端命令行播放音乐(mp3)

安稳与你 提交于 2020-01-12 00:24:22
有很多在终端命令行播放mp3的工具,有的甚至可以生成播放列表。也只有命令行重度使用者有这个需求,下面我们来看一看这些工具。 Sox Sox(Sound eXchange)是操作声音文件的瑞士军刀,它可以播放、转换音频文件,添加效果。 在Ubuntu上安装sox: $ sudo apt-get install sox libsox-fmt-all libsox-fmt-all包含mp3的解码器和其它格式的解码器。 播放音乐: $ play Crystals.mp3 Moc Moc(Music on Console)播放器是专门为终端命令行开发的,它允许用户通过基于文本的文件浏览器选择要播放的文件。 安装moc: $ sudo apt-get install moc 打开播放器: $ mocp 选择要播放的文件,会车播放: Moc播放器可以使用快捷键控制播放, S停止、P暂停,左右箭头倒退和快进。 Vlc播放器 Vlc提供了播放音频的命令行工具。 安装vlc: $ sudo apt-get install vlc-nox 启动vlc: $ vlc -I ncurses h查看帮助,它列出所有播放控制的快捷键。 CMUS cmus也是基于命令行的播放器。 安装cmus: $ sudo apt-get install cmus 启动: $ cmus 按5打开文件浏览器,更多操作看

Playing .mp3 files with PyAudio

僤鯓⒐⒋嵵緔 提交于 2020-01-10 20:01:22
问题 Can pyaudio play .mp3 files? If yes, may I ask to write an example please. If no, what is the simplest way to convert .mp3 to .wav? I have tried to use PyDub, could get my .wav file, but when I try to play it with PyAudio I get following error: File "C:\Python33\lib\wave.py", line 130, in initfp raise Error('file does not start with RIFF id') wave.Error: file does not start with RIFF id With other .wav samples (which where not converted from mp3) if works well. I am using gTTS library to

Turn byte array to sound

醉酒当歌 提交于 2020-01-10 15:27:15
问题 I have an mp3 file as byte array. How to turn it back to a sound and play using javascript? Thanks 回答1: As far as I know this is decidedly non trivial. You can turn the array into a data URI, and then play it back normally. You can post it back to a server to do the encoding and play it back normally. You can use a fancy API 2 seems inefficient, 3 requires browser specific support. So, use 1. I havent tried it, but check out http://www.bitsnbites.eu/?p=1. You should expect this to be way less

HTML5 audio - currentTime attribute inaccurate?

不想你离开。 提交于 2020-01-10 11:14:03
问题 I'm playing around a bit with the HTML5 <audio> tag and I noticed some strange behaviour that has to do with the currentTime attribute. I wanted to have a local audio file played and let the timeupdate event detect when it finishes by comparing the currentTime attribute to the duration attribute. This actually works pretty fine if I let the song play from the beginning to the end - the end of the song is determined correctly. However, changing the currentTime manually (either directly through