I am looking for a good gem/plugin to convert user-uploaded audio files to different formats. One format in particular that I am interested in is converting to Apple .caf with ima4 compression for inclusion in an iPhone app.
I have been using afconvert on my mac for this so far, but I need to do it on my linux box, server-side. Ideally, I would be able to work into paperclip.
As an additional solution, ffmpeg could work, but I have not seen any .caf options for it. Anybody know of one?
The Sound eXchange project supports lots of audio file conversions. I've used this in the past to convert aiff files output by the OS X "say" program to ulaw files for Asterisk. This yields rather nice text-to-speech. For my purposes, I also found a Ruby extension on github called sox-ruby that wraps the libsox functions directly.
Related
I have problems encoding AAC/M4A audio files on iPhone (iOS) and in simulator in a way so that
mono/stereo and
the track duration
are recognized correctly by external players like VLC.
For closing in on the problems on various devices, I have written code which generates test files for various encoding configurations. The encoded sound is a generated sine wave which is identical all the time. This works nicely. In the next step, I do a binary comparison of these test files which were generated on different divices and in the simulator. To my surprise, the .m4a files are never identical (the aac files are identical all the time). I use the ExtAudioFile...() methods for writing the files and I use the file type identifier kAudioFileM4AType.
I suspect that there is a timestamp included in these files which confuses my binary comparison.
Can anybody confirm or refute that there is a timestamp in M4A files, which will always confuse a binary comparison?
M4A is a container format, and would almost certainly contain some metadata. It's very likely some of this metadata is different from one encoding to another, as you suspect.
You might do better writing some kind of algorithm to see if your M4A file contains a byte stream that matches the AAC data you have. One way to approach this would be to compare both files (M4A and AAC with same raw sound data) manually in a Hex editor and try to find the offset where the AAC data begins and/or ends, and then just compare that data.
I'm writing an iOS app which can play MIDI and output its content using the AUSampler and AUGraph classes. I know for sure it supports files like Soundfont (.sf2) but this one seems to be quite antiquated.
Question: Are there any other files or sample types which this framework supports?
Thanks.
The AUSampler also supports DLS format (.dls) and AUpreset format (.aupreset)
Does anyone know if it is possible to convert a sound file in the Documents directory from within an app? I have a recorded sound file that will be available in iTunes File Sharing that I need to convert. Is afconvert available from within iOS?
Thanks
I'm not sure from what format to what format you want to convert to, but converting audio during runtime is not as simple as the command-line afconvert tool.
Check out Apple's sample projects iPhoneACFileConvertTest or ConvertFile. I think these would be good starting points if you want to convert audio in your app.
For what it's worth, afconvert is just a handy command-line interface to the features of the ExtAudioFile API which you can find in -- Using this API you can convert from any supported file format/audio format combination TO any supported file format/audio format combination.
I need to extract only the i-frames from an MPEG encoded video file(it may be a .avi file or .mp4 file). Is it possible to atleast identify the i-frames.
It looks like this ffmpeg enhancement can accomplish this for you using the select filter to filter all I-Frames. You may need to build ffmpeg from source to get this capability I'm not sure. Here is an Ubuntu guide with the details, and here is where you can get the nightly Windows binary version.
EDIT: OpenCV relies on ffmpeg API's to capture video from a file. However, the functionality you want is a bit specific, so you are going to need to write your own custom filtering module with ffmpeg's libavfilter. Here is one of their how to guides on using libavfilter. In particular, as I mentioned above, you will probably want to use the select filter provided by libavfilter. This will filter all I-frames from the stream for you to process.
Hope that helps!
Hey I have this program that has been working fine until I tried to open this one wav file? Not sure what the problem is or that I understand it? Do I need to find a new component to use for this file or what? I am using Delphi 4 Pro and the standard VCL component for Media Player. I am looking for a good new component that offers more help with wav and mp3 files too but not found what I am looking for yet?
Possible reasons for a EMCIDeviceError:
It's known that mediaplayer has problems with some MP3 files, depending from the version of the mediaplayer that is installed on the machine. Try updating mediaplayer on the problem-machine(s).
Maybe the sound drivers just need updating
You also get an EMCIDeviceError if there is no soundcard, or the drivers are corrupted, or there are no drivers at all. But then it would not play any other MP3 files, so I just mention this to help out other Forum readers.
This kind of EMCIDeviceError is raised when you provide a fully qualified filename to the TMediaPlayer.FileName property which exceeds certain no of characters. It has nothing to do with having spaces in the filepath. For example if you play sounds from the EXE directory and just provide the relative shortname, no error seems to happen. Also with absolute filename from elsewhere, if it is shorter than a certain limit, there is no error. I encountered it in XE5 and have resorted to sndPlaySound().