mp3

Compare two audio files [duplicate]

随声附和 提交于 2019-12-18 10:57:04
问题 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

Finding Duration of an MP3 file in Java

旧巷老猫 提交于 2019-12-18 09:39:15
问题 OK so I have tried using ID3 tags to get the duration and I also tried using JMF media player.getDuration(). player.getDuration().getSeconds() The file is VBR. Are there any light weight libraries or something inside JMF that could be used to solve this problem. Thanks. 回答1: I use JAudioTagger to achieve this. The below code will get you the duration of an MP3 track. int duration = 0; try { AudioFile audioFile = AudioFileIO.read(new File("file.mp3")); duration = audioFile.getAudioHeader()

How to find mp3 files from sdcard in android programatically

≯℡__Kan透↙ 提交于 2019-12-18 09:25:42
问题 I am new to android programming so can anyone please help me to find all .mp3 files in my android device. 回答1: Of course . you can . Code not tested. File dir =new File(Environment.getExternalStorageDirectory()); if (dir.exists()&&dir.isDirectory()){ File[] files=dir.listFiles(new FilenameFilter(){ @Override public boolean accept(File dir,String name){ return name.contains(".mp3"); } }); } 回答2: You should use MediaStore. Here is an example code i'm using for something similar: private static

Retrieve lyrics from an mp3 file in Python using eyeD3

我是研究僧i 提交于 2019-12-18 09:12:10
问题 I am currently trying to use Python and its eyeD3 library to extract the lyrics from an mp3 file. The lyrics have been embedded into the mp3 file already (via: MusicBee). I am trying to use eyeD3 to return the lyrics. I can't figure out how to do it. I have searched online extensively and all I've found were tutorials showing how to SET the lyrics. I just want to read them from the file. Here's my current code: track = eyed3.load(path) tag = track.tag artist = tag.artist lyrics = tag.lyrics

Merging MP3 files in Linux Debian using PHP

无人久伴 提交于 2019-12-18 07:23:59
问题 What's the easiest way to merge the contents of several MP3 files into one using PHP 5.2 on Linux Debian system? I found some scripts that are supposed to do in PHP only, but they seem to be buggy. Perhaps there is a way to accomplish this task using command line programs, that I could install on my Linux Debian machine? 回答1: check this: http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2009-September/022171.html first you have to install sox. sudo apt-get install sox. $ sox first.mp3 -r 44100

What's the easiest way to extract the JPG data from an MP3 header in java?

强颜欢笑 提交于 2019-12-18 07:14:55
问题 I wrote a JSP that hands my Flash front-end an XML file that describes the contents of my mp3 folder, but am stuck trying to parse the individual file headers for the album art that is embedded therein. Can anyone recommend a good library that has something straight forward that in pseudo code would look like... String mp3FilePath = "/mp3s/foo.mp3"; File myJpg = getImageFromMP3(mp3FilePath); I don't have to use JSP, if that's a problem, I can write a servlet. 回答1: JavaMusicTag library allows

What's this “Album artist” tag iTunes uses? Any way to set it using java?

柔情痞子 提交于 2019-12-18 04:35:14
问题 iTunes uses an ID3 tag called "Album Artist" , and for one album to be actually grouped as an album in iTunes, both the Album Name and Album Artist must be the same. As far as I'm concerned, Album Artist isn't an official ID3 tag, and from the ID3 libraries I've seen so far, none supported "Album Artist". Does anyone know more about this strange tag, and how to set it in java (or with any command line utility). 回答1: The commenters above are correct, TPE2 ("Band/Orchestra/Accompaniment") is

FFmpeg transcoding on Lambda results in unusable (static) audio

余生长醉 提交于 2019-12-18 04:23:35
问题 I'd like to move towards serverless for audio transcoding routines in AWS. I've been trying to setup a Lambda function to do just that; execute a static FFmpeg binary and re-upload the resulting audio file. The static binary I'm using is here. The Lambda function I'm using in Python looks like this: import boto3 s3client = boto3.client('s3') s3resource = boto3.client('s3') import json import subprocess from io import BytesIO import os os.system("cp -ra ./bin/ffmpeg /tmp/") os.system("chmod -R

Use Windows built in MP3 decoder to play audio?

心不动则不痛 提交于 2019-12-18 03:44:57
问题 How do I from C or C++ use the MP3 decoder supposedly built in with Windows since Windows Media Player 6.1? I want to play an mp3 file without having to depend on any other third party library such as for instance LAME.DLL. I updated the question to better fit the answers I got, since I liked them a lot. Related question. 回答1: You can control an audio channel (in order to make it play anything, including MP3) with mciSendString http://msdn.microsoft.com/en-us/library/ms709492%28VS.85%29.aspx

Combine/Concatenate MP3s on Server Using PHP

你离开我真会死。 提交于 2019-12-17 20:22:35
问题 I have a site that will be hosting small MP3 files. I want to create a utility that will allow me to combine the mp3 files together to create a single MP3 file. I'm somewhat new to PHP but not new to programming. Ideally, I would have a function that let me specify the a starting file and then append the second file to the existing file. function appendMP3(originalMP3, newChunk){ originalMP3 = originalMP3 + newChunk; return newMP3 } compilation = append(compilaton, "sound.mp3"); Where do I