lame

iOS 7 m4a to mp3 encoding - is it possible?

久未见 提交于 2019-12-09 22:53:35
问题 I've searched through all the internet and didn't find a clear answer on my question - How do you record an m4a file (because as this answer states iOS doesn't support mp3 recording) and later convert it to mp3 ? Recording an audio file seemed to be a piece of cake, but then the nightmare began. It's 2013 around and I haven't found any clear example of this procedure on the web. Some people say you can't do it because of some GPL license. Others suggest to use Apple's examples which never

Adding C++ DLL's to a C# project

杀马特。学长 韩版系。学妹 提交于 2019-12-09 08:56:12
问题 I'm trying to use the lame_enc.dll file from LAME in a C# project, but adding the thing seems impossible. I keep getting an error that says that a reference could not be added and to please check if the is accessible, a valid assembly or COM component. I have no C++ experience, though I would like to use the functionality. Right now I'm using Process from the .NET framework to call lame.exe and do stuff, but I'd like to know if there's another way. 回答1: You have to use P/Invoke to call

How do I capture command-line text that is not sent to stdout?

孤者浪人 提交于 2019-12-08 20:41:02
问题 I am using the LAME command line mp3 encoder in a project. I want to be able to see what version someone is using. if I just execute LAME.exe with no paramaters i get, for example: C:\LAME>LAME.exe LAME 32-bits version 3.98.2 (http://www.mp3dev.org/) usage: blah blah blah blah C:\LAME> if i try redirecting the output to a text file using > to a text file the text file is empty. Where is this text accessable from when running it using System.Process in c#? 回答1: It's probably using stderr. cmd

Running lame from php

左心房为你撑大大i 提交于 2019-12-07 19:29:59
问题 I am trying to run lame from a php script. I have tried these, but no luck, I don't get anything returned! Any ideas? system('lame', $returnarr); system('lame --help', $returnarr); exec('lame', $returnarr); passthru('lame', $returnarr); even this one returns nothing: exec('which lame', $returnarr); I am on OSX and final deployment will be on Linux. Do you have better suggestions for an automated wav->mp3 conversion? From php, should I execute a bash script that executes Lame? 回答1: Try

Audio speed changes on converting WAV to MP3

萝らか妹 提交于 2019-12-06 08:08:06
问题 I create a WAV ( PCM ) to MP3 converter. But the output is too fast. This is the code, that converts the encoding. FILE *pcm = fopen(in_path, "rb"); FILE *mp3 = fopen(out_path, "wb"); int read, write; const int PCM_SIZE = 8192; const int MP3_SIZE = 8192; short int pcm_buffer[PCM_SIZE*2]; unsigned char mp3_buffer[MP3_SIZE]; lame_t lame = lame_init(); lame_set_in_samplerate(lame, sampleRate); lame_set_brate(lame, byteRate); lame_set_num_channels(lame, channels); lame_set_mode(lame, MONO); lame

Running lame from php

这一生的挚爱 提交于 2019-12-06 07:44:23
I am trying to run lame from a php script. I have tried these, but no luck, I don't get anything returned! Any ideas? system('lame', $returnarr); system('lame --help', $returnarr); exec('lame', $returnarr); passthru('lame', $returnarr); even this one returns nothing: exec('which lame', $returnarr); I am on OSX and final deployment will be on Linux. Do you have better suggestions for an automated wav->mp3 conversion? From php, should I execute a bash script that executes Lame? Try something like this: $output = array(); $result = -1; exec('`/usr/bin/which lame` --help 2>&1', $output, $result);

Convert WAV to MP3 using LAME from PHP

做~自己de王妃 提交于 2019-12-06 03:29:12
问题 I have WAV data that I'd like to convert to MP3 on the fly with a PHP script. The WAV file originates with the script, so it does not start out as a file. I can run something like this: exec( "lame --cbr -b 32k in.wav out.mp3" ); But this will require that I first write in.wav to disk, read out.mp3 from disk, and then clean up when I'm finished. I'd prefer not to do that. Instead, I have the wav file stored in $wav, and I'd like to run this through LAME such that the outputted data is then

Convert audio linear pcm to mp3 ( using LAME ) with the help of AudioQueueServices example in iOS

柔情痞子 提交于 2019-12-06 00:17:21
I am new in ios developement.I am encoding a LinearPCM to MP3 in iOS.I'm trying to encode the raw PCM data from microphone to MP3 using AudioToolbox framework and Lame.And although everything seems to run fine if i record .caf format . i am getting only noise and distortions present in the encoded stream. I'm not sure that I setup AudioQueue correctly and also that I process the encoded buffer in the right wat... My code to setup audio recording: sample project https://github.com/vecter/Audio-Queue-Services-Example - (void)setupAudioFormat:(AudioStreamBasicDescription*)format { format-

Clicks while using LAME to encode from PCM to MP3 in iOS

大兔子大兔子 提交于 2019-12-05 23:24:11
I am not the first to have this type of issue, however, I have no been able to solve it. I am encoding a LinearPCM to MP3 in iOS. It is working though I am experiencing clicks between each buffer. memset(&mEncodedBuffer, 0, sizeof(mEncodedBuffer)); int encodedBytes = lame_encode_buffer(gfp, (short*)inBuffer->mAudioData, NULL, inNumberPacketDescriptions, mEncodedBuffer, MP3_BUFFER_SIZE); NSData* data = [NSData dataWithBytes:mEncodedBuffer length:encodedBytes]; Then, I do the following with the buffer: AudioQueueEnqueueBuffer(vc.recordState.queue, inBuffer, 0, NULL); I have tried adding the

Where to get pure C++ Lame MP3 encoder - PCM to MP3 example?

扶醉桌前 提交于 2019-12-04 22:33:13
问题 So all I need is a simple function that sets it up (eating incoming PCM RATE (for example: rate near to 44100) It's channels (for example: 2) and -bits (for example: 16) and desirable 128 kb\s rate) and another one that takes PCM data and encodes it into pure MP3 frames. I know it looks like a silly homework task but I assure you - it is not. I hope it will be of help to all C++ developers starting with MP3s. So can anybody please help me with that? 回答1: See the example I gave in your other