mp3

How to decode MP3 in Android within app?

ⅰ亾dé卋堺 提交于 2019-12-29 06:55:41
问题 I'm currently working on an app that lets the user choose an MP3 audio file. The file is then processed by my app. For this processing, the application would need to decode audio files to get the raw PCM output. To decode MP3, I have two options: Use the Android system to decode MP3 and get the PCM data. Decode the MP3 myself on the phone, WITHOUT paying MP3 licensing fees. My question is whether #1 is technically possible? And for #2, whether the MP3 license on the phone covers an app as

How to get the length of a MP3 in C#

醉酒当歌 提交于 2019-12-29 05:25:09
问题 Yes this is an exact duplicate of this question, but the link given and accepted as answer is not working for me. It is returning incorrect values (a 2 minutes mp3 will be listed as 1'30, 3 minutes as 2'20) with no obvious pattern. So here it is again: how can I get the length of a MP3 using C# ? or What am I doing wrong with the MP3Header class: MP3Header mp3hdr = new MP3Header(); bool boolIsMP3 = mp3hdr.ReadMP3Information("1.mp3"); if(boolIsMP3) Response.Write(mp3hdr.intLength); 回答1:

Right place for putting mp3 files in an android project

北慕城南 提交于 2019-12-29 02:51:06
问题 Is there any folder like res/drawable for mp3 or generally audio files? If yes, what is it and how can I get access to it from the app? 回答1: The best place to put such .mp3 or any other files would be in the assets folder. These files once stored will become a part of your android app itself and can be read easily. This tutorial describes it well. AssetFileDescriptor afd = getAssets().openFd("AudioFile.mp3"); MediaPlayer player = new MediaPlayer(); player.setDataSource(afd.getFileDescriptor()

解决Linux Rhythmbox打开mp3乱码问题

烂漫一生 提交于 2019-12-28 23:08:40
只需要把mp3标签里面用gbk、gb18030、big5等编码存储的中文内容修改为Unicode编码,那么基本上所有Linux下的播放器都能正常识别mp3标签了。 关于mp3编码的转换,介绍一个工具----Mutagen,假如你安装了Quod Libet,那么这个包已经安装上去了。如果没有,执行下列命令就可以了。 sudo apt-get install python-mutagen 工具的使用方法 #转换mp3文件所在的目录下,执行: mid3iconv -e gbk *.mp3 #转换当前目录下所有mp3文件(包括子目录)执行: find . -iname "*.mp3" -execdir mid3iconv -e gbk {} \; 如果觉得每次都要输入命令很麻烦,也可以建立个shell脚本来批量转换: 新建文件,写入: #!/bin/sh IFS="" find .-iname "*.mp3"-execdir mid3iconv -e gbk {} \; 然后把文件保存,拷贝到想要转换的目录下,执行就可以了(执行脚本的命令为 #sh filename)。 因 为现在在网上下载的mp3绝大多数采用的都是gbk/gb18030编码,-e gbk 参数是代表把gbk编码的标签转换为Unicode编码,假如mp3标签本身是Unicode编码的就不转换

Automatically trimming an mp3 in PHP

*爱你&永不变心* 提交于 2019-12-28 05:10:45
问题 Are there any ways to automatically trim an MP3 uploaded to a website to 30 seconds (or some other length) in PHP? If not, is there any good 3rd party services that could be integrated (transparently to the user) to achieve the same effect? Thanks. 回答1: You could try the MP3 Class on PHPClasses. It features the following example: require_once './class.mp3.php'; $mp3 = new mp3; $mp3->cut_mp3('input.mp3', 'output.mp3', 0, -1, 'frame', false); In this case, the 'frame' can be substituted with

Streaming Audio from A URL in Android using MediaPlayer?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-27 12:08:58
问题 I've been trying to stream mp3's over http using Android's built in MediaPlayer class. The documentation would suggest to me that this should be as easy as : MediaPlayer mp = new MediaPlayer(); mp.setDataSource(URL_OF_FILE); mp.prepare(); mp.start(); However I am getting the following repeatedly. I have tried different URLs as well. Please don't tell me that streaming doesn't work on mp3's. E/PlayerDriver( 31): Command PLAYER_SET_DATA_SOURCE completed with an error or info PVMFErrNotSupported

Converting mp3 to caf file for iPhone

跟風遠走 提交于 2019-12-25 16:00:24
问题 I am experimenting with the sampling rate of the mp3 file to convert it into caf format. afconvert -f caff -d LEI16@44100 ./fricatives_play_all.mp3 ./test.caf afconvert -f caff -d LEI16@22100 ./fricatives_play_all.mp3 ./test.caf afconvert -f caff -d LEI16@12000 ./fricatives_play_all.mp3 ./test.caf afconvert -f caff -d LEI16@20100 ./fricatives_play_all.mp3 ./test.caf afconvert -f caff -d LEI16@15100 ./fricatives_play_all.mp3 ./test.caf afconvert -f caff -d LEI16@14100 ./fricatives_play_all.mp3

How to convert a web form uploaded mp3 to wav using PHP and ffmpeg?

对着背影说爱祢 提交于 2019-12-25 08:52:33
问题 I have a form where the admin can upload an mp3. Is it possible to use ffmpeg from PHP to convert that mp3 to wav when I process the form submission? 回答1: Second google result: ffmpeg -i foo.mp3 -acodec pcm_s16le bar.wav . Wrap that with a shell_exec . 来源: https://stackoverflow.com/questions/15099921/how-to-convert-a-web-form-uploaded-mp3-to-wav-using-php-and-ffmpeg

How to stop a streaming mp3-file

a 夏天 提交于 2019-12-25 04:19:38
问题 I have build an app that use mp3-files. In the first version the files was included in the apk-file. I now are working on a version that have the mp3-files in an URL-resource. I have adjust the code and almost everything works fine. The problem is that the buttons for stop, pause and play now not is working. This is the code that start the streaming (works fine): private void playAudio(String media) { MediaPlayer mediaPlayer = new MediaPlayer(); mediaPlayer.setAudioStreamType(AudioManager

Reading Mp3 File using NAudio.dll on windows server 2008 r2 when media player is not installed

荒凉一梦 提交于 2019-12-25 04:17:10
问题 I am reading the length of mp3 files using NAdutio.dll. the code sample i used is here. the application i have created is a stand alone desktop application built in C# 4.0 and is used on the network of computers all with windows server 2008 operating systems. and there is no media player installed on any of those computer. when i run the application on my local machine it return the length of mp3 files correctly, but when it is run on any pc on that network it return zero for every file. it