mp3

Playing MP3 files with Python

泄露秘密 提交于 2019-12-19 01:13:36
问题 I'm trying to write my own media player (like Foobar), and I'm having trouble tracking down a Python library that'll play MP3s. I know Pymedia does mp3s, but it looks outdated - the latest installer is for Python version 2.4, and I'm using 2.6. I've never had much success with Pygame, and Pyglet doesn't look like it has too much in the way of documentation. Are there any other alternatives? 回答1: There is http://pyglet.org/ and also have you tried http://code.google.com/p/mp3play/? It's also

Python convert wav to mp3

时光毁灭记忆、已成空白 提交于 2019-12-18 18:51:18
问题 I've looked at pymedia (discontinued), pyglet(great but no converter in there) and audiotools(command line cd ripping), and none seem suitable. In Python 2.7 , how do you do convert(wavFileLocation, 'mp3') If there is no python way, how would you do it in a manner which python can invoke? (e.g. Call a Cross platform command line tool... if exists return (name, pythonCodeForInvocation) ) 回答1: using lame (command line), you can encode wav to mp3 like this: $ lame --preset insane /path/to/file

Download music file from server and save in my app

不羁的心 提交于 2019-12-18 18:24:08
问题 I need to download an .mp3 audio file from a server to save in my app and play it without downloading, exactly like the screenshot below, with a progress bar for the download (I found this in the App Store). Can anyone help me to do this in my app, with source code? Any help will be appreciated! Thanks in advance! I used NSURLConnection but it does not really work for me. Here is the screenshot of what I am trying to do. 回答1: This questions discusses what you're looking for Edit: If you want

mp3 to wav conversion in java

爷,独闯天下 提交于 2019-12-18 16:52:28
问题 My code to convert mp3 to wav is: package audio1; import java.io.File; import javax.sound.sampled.AudioFileFormat; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; public class NewClass { public static void main(String [] args){ try{ AudioFileFormat inputFileFormat = AudioSystem.getAudioFileFormat(new File("c:\\1.mp3")); AudioInputStream ais = AudioSystem.getAudioInputStream(new File("c:\\1.mp3")); AudioFormat

mp3 to wav conversion in java

半腔热情 提交于 2019-12-18 16:52:02
问题 My code to convert mp3 to wav is: package audio1; import java.io.File; import javax.sound.sampled.AudioFileFormat; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; public class NewClass { public static void main(String [] args){ try{ AudioFileFormat inputFileFormat = AudioSystem.getAudioFileFormat(new File("c:\\1.mp3")); AudioInputStream ais = AudioSystem.getAudioInputStream(new File("c:\\1.mp3")); AudioFormat

How to remove ID3 audio tag image (or metadata) from mp3 with ffmpeg

房东的猫 提交于 2019-12-18 14:47:35
问题 FFMPEG is really a great tool. I know it can edit ID3 tags and even remove all tags in a row : ffmpeg -i tagged.mp3 -map_metadata -1 untagged.mp3 But even after that, there's still the cover image. I don't know how to remove it using ffmpeg. I know there's other soft out there that can do the job - like eyed3 - but what's the point to install it if ffmpeg can do it too, in one line, while encoding the audio ? 回答1: The cover image/album art is treated as a video stream by ffmpeg. To omit it

How to compress or convert to low quality Mp3 file from PHP [closed]

旧街凉风 提交于 2019-12-18 13:28:07
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 12 months ago . Is there any PHP library or function to covert Mp3 file to lower quality? I want to compress / convert 128Kbps or higher quality Mp3 file to 64Kbps Mp3 file by PHP. Anyone know? 回答1: First of all, you need to install ffmpeg available at: http://ffmpeg.org/download.html Then, make sure you have safe mode

AMR to MP3 conversion with FFMPEG

孤街醉人 提交于 2019-12-18 12:55:31
问题 I'm trying to convert AMR audio files to MP3 using FFMPEG. I'm running on Ubuntu 10.10 with VBox on Windows 7 host and i've installed ffmpeg by running sudo apt-get install ffmpeg I already have an AMR file that i've previously recorded so I ran the command: ffmpeg -i myfile.amr myfile.mp3 the conversion failed and the trace is as follows: FFmpeg version 0.6-4:0.6-2ubuntu6, Copyright (c) 2000-2010 the FFmpeg developers built on Oct 5 2010 22:35:47 with gcc 4.4.5 configuration: --extra-version

How do I get a mp3 file's total time in Java?

情到浓时终转凉″ 提交于 2019-12-18 11:26:53
问题 The answers provided in How do I get a sound file’s total time in Java? work well for wav files, but not for mp3 files. They are (given a file): AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(file); AudioFormat format = audioInputStream.getFormat(); long frames = audioInputStream.getFrameLength(); double durationInSeconds = (frames+0.0) / format.getFrameRate(); and: AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(file); AudioFormat format =

Compare two audio files [duplicate]

心已入冬 提交于 2019-12-18 10:57:49
问题 This question already has answers here : Detect duplicate MP3 files with different bitrates and/or different ID3 tags? (9 answers) Closed 6 years ago . Basically, I have a lot of audio files representing the same song. However, some of them are worse quality than the original, and some are edited to where they do not match the original song anymore. What I'd like to do is programmatically compare these audio files to the original and see which ones match up with that song, regardless of