How to get bit rate of audio file in Blackberry/j2me - audio

I want to retrive the bit rate of an audio file for the purpose of spliting a raw byte information of an audio file at a particular second of complete length of file.Can any one suggest the way to get the bit rate for an audio file in Blackberry or j2me?

Related

How do I record audio using a microphone and play it in a speaker simultaneously by only storing one sec of Audio in LINUX

I am now working on a Audio algorithm which need 256 samples of audio from a micro phone and i need to process this 256 samples and result should get played on a speaker. I have done it using two wave file which is already on the file, now i need to do it in the real time.
Need a solution for this

Arduino: how to store analog signals to data chunk of wav file?

What I want to do:
I want to build a audio recorder with my arduino. I have a mic connected to it, as well as a SD Card adapter. On a button push I want to record something and save that on the SD Card.
Problem:
I used this wav file "template" -> How to convert analog input readings from Arduino to .WAV from sketch to create a file and write it onto my sd card. I am using this
int micIn = analogRead(A1);
writeDataToWavFile(micIn);
to "feed" my wav file with data. Values are mapped from -32.. to 32.. (see method in the link).
Good is, the wav file is correctly created and not corrupted, but there is no sound and the length is 0. (but bytes are written).
I also tried to use
writeDataToWavFile(0);
'cause i thought i'd get at least a silent but longer (at least existent) sound, but it didn't work.
How am i supposed to add the actual data? just raw as voltage values? mapped? 0-centered? sampled, or are they already sampled?

Moviepy write_videofile changes number of video and audio frames even after using 'rawvideo' as the codec parameter

I am using moviepy (Python) to read video and audio frames of a video and after making some changes I am writing them back to a videofile, say new.avi, to preserve the changes, or to avoid compression, I am using codec= 'rawvideo' in write_videofile function. But when I read the video and audio frames back, the number of video and audio frames are different than when they were when written, they are usually increased.
Can anybody tell me the reason,? is it because of the ffmpeg used or some other reason? Does it happen always or there is some problem in my machine? Thank you :-)

Correct way to encode Kinect audio with lame.exe

I receive data from a Kinect v2, which is (I believe, information is hard to find) 16kHz mono audio in 32-bit floating point PCM. The data arrives in up to 4 "SubFrames", which contain 256 samples each.
When I send this data to lame.exe with -r -s 16 --bitwidth 32 -m m I get an output containing gaps (supposedly where the second channel should be). These command line switches should however take stereo and downmix it to mono.
I've also tried importing the raw data into Audacity, but I still can't figure out the correct way to get continuous audio out of it.
EDIT: I can get continuous audio when I only save the first SubFrame. The audio still doesn't sound right though.
In the end I went with Ogg Vorbis. A free format, so no problems there either. I use the following command line switches for oggenc2.exe:
oggenc2.exe --raw-format=3 --raw-chan=1 --raw-rate=16000 - --output=[filename]

What exactly does bitrate mean in an video/audio file?

I use ffmpeg to convert videos from one format to another.
Is bitrate the only parameter which decides the output size of a video/audio file?
Yes, bitrate is essentially what will control the file size (for a given playback duration). It is the number of bits used to represent each second of material.
However, there are some subtleties, e.g. :
a video file encoded at a certain video bitrate probably contains a separate audio stream, with a separately-specified bitrate
most file formats will contain some metadata that won't be counted towards the basic video stream bitrate
sometimes the algorithm will not actually aim to achieve the specified bitrate - for example, using the CRF factor. http://trac.ffmpeg.org/wiki/x264EncodingGuide explains how two-pass would be preferred if targeting a specific file size.
So you may want to do a little experimenting with a particular set of options for a particular file format.
Bitrate describes the quality of an audio or video file.
For example, an MP3 audio file that is compressed at 192 Kbps will have a greater dynamic range and may sound slightly more clear than the same audio file compressed at 128 Kbps. This is because more bits are used to represent the audio data for each second of playback.
Similarly, a video file that is compressed at 3000 Kbps will look better than the same file compressed at 1000 Kbps. Just like the quality of an image is measured in resolution, the quality of an audio or video file is measured by the bitrate.

Resources