I have a M4A music file, downloaded from iTunes (about 8 MB). When I edit the metadata with an other application, the file size decreases about 0.5 MB. Comparing the original with the new file using an Hex-Editor, I saw that the iTunes file is containing a "zero block" between the metadata tags and the actual music data. Obviously the tag editor removed this block.
Does anybody know why the iTunes file is containing this big zero block (in my case beginning at byte ∼80,000 and ending at byte ∼600,000)?
Thank you in advance,
Alexander
Related
How can I extract the audio from a mp4 video in bytes format (so, in memory) in flutter? (I want to save it as mp3 file). All the references I can find online using ffmpeg retrieve the file from storage, but I have the file in bytes in memory and don't want to save the file into storage just for the conversion.
Thank you.
A week before I have uploaded my iPhone app the zipped version size is 17.2MB, My app released today and it size turns out to be 20.2MB. Now its not possible to download that app through carrier network(since it crossed 20MB limit it needs WiFi). Why the size increased from 17.2 to 20.2MB?
The executable (ARM code) inside the app bundle is encrypted by Apple, which means that it no longer gets compressed in size when zipped up into an ipa file.
To estimate the actual ipa size, replace the executable with some /dev/rand of the same size before a test zip of the app bundle.
Pay attention to how large the app is before it is zipped. The zip file is not what goes to the app store, you need to look at your actual app file.
I just wrote a blog post on how exactly to check the maximum size of a binary here.
Short version:
Open the archive, find the executable, remove it, and add it's uncompressed size to the size of all the other files compressed to get the max size of the bundle after encryption and compression. Final size will be slightly smaller but no larger.
I am making a simple application for iPhone, and I want to enter a short audio file on an object click. Which of .caf and .wav would be better?
I am building a simple application in Cocos2d in which balloons produce a pop sound when clicked. What are the memory issues with both sound versions?
If you do not need specific Core Audio Format features, then WAV has more universal support (and it would be my default choice for that reason).
Core Audio Format basically functions as a container for other audio file formats, including WAV. Core Audio Format has many great features, but it's not evident from the description that you need any of these.
In response to a deleted comment, which was moved to the question:
I can't speak for Cocos2d specifically, so I will write about the file formats in general: WAV does not use data compression. CAF may. If it is a short sound file, you probably don't want data compression (because it requires a good amount of processing to convert to LPCM for playback). If you play the pop often, then you will want to hold onto an uncompressed version of the audio data for easy processing. 1 second will require 44100 * 2 bytes at CD quality in memory (per channel).
For a short sound file such as a balloon pop, a 16 bit WAV file sounds ideal. In that sense, the memory difference should not be a deciding factor. If you have a lot of audio files, or long audio files to load into memory, then the situation changes. For now, I don't consider memory to be a problem in your case. Since CAF is a container, its uncompressed representation will be nearly identical (the difference will be a little more header data in the CAF).
A CAF file is a basically Core Audio Format. So it is well suited for the Apple frameworks. The best advantage of CAF over WAV is while recording when you can have files more than 4 GB and also in CAF you don't need to update the WAV header after each packet recording.
Anyway, I assume you don't need these features related to CAF. And as Justin said, I do believe that WAV will be the better option as you can have more support for WAV than the CAF format.
I have a sound file which requires to be split into smaller parts. Is there any way i can do it, dividing an audio file into small slices of sound as Music Cutter does.
I also need to check that sliced parts can be played individually.
Any help will be appreciated.
Thanks
Vikas Ojha
It depends on the specific format of the file - an mp3 file, no - a wav file, yes.
For an mp3 file you would have to decompress the audio from the file first (you could use an audioqueue ), then split the raw audio data how ever you please, then re-encode each slice as mp3. Apple has sample code for decoding and encoding mp3's.
This is still not going to enable you to accept any input file format, for that you would need other external libraries, such as ffmpeg, LAME, etc. you might have to build these yourself and they may have disagreeable licensing restrictions.
I have some music that loops. The .wav file size is about 8 meg. I load this and just loop it... everything was working fine until I added another 4 meg .wav file. Now the game crashes... removing the additional audio file fixed the crashing.
So how can I reduce the size of these .wav files? I thought about releasing the memory after I'm done with the 4 meg file but what I tried didn't work (and I'd rather the game itself be a smaller file size so it's easier to download).
Thanks!
If you're only playing one sound file at a time, just use mp3 or aac. That way you also get hardware decoding, for improved performance and battery life.
Unfortunately, the iPhone can only play one hardware decoded sound file at a time. So if you're looking to ever play more than one at once, you'll need to do your own decoding of the second file; IMA 4:1 is recommended, though you'll have to find or implement your own decoder, Apple doesn't give you one.
This is all based off of this blog post, which goes into a bit more detail.
Actually .WAV is a container. The contents can be compressed or uncompressed, it all depends on the WAVEFORMATEX structure contained in the first "fmt " tag in the .WAV file.
For instance, in Windows 7 all of the built-in sounds are .WAV files that contain MP3 data.
You can just author your .WAV files as MP3 files and (assuming that the iPhone correctly handles the .WAV container) they should work.
Wav in a uncompressed format will inevitably take up tons of space. 8 Megs is not really big for an uncompressed wav.
You should consider an alternate, compressed format such as mp3 or aac. You might need to link in a decoding library though.
Check out this link on including mp3 files in your iphone app:
If your WAV files are stereo, you could try making them mono. This would basically half the file size. The disadvantage would obviously be that your sound is now mono.
I wouldn't use WAV. Take a look at ffmpegx. It's free, runs on the mac and will convert your waves files to MP3 or a host of other formats.