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

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.

Related

Decode aac raw data and get the length of CPE/SCE

I have some aac raw data from an mp4 file which does not have moov header. I want to know the number of samples in this data and size of each sample. I have the decoder specific info as well.
After searching I have found out that aac samples in m4 files does not have ADTS header, they are just CPE/SCE. I want to know the size of each CPE/SCE.
For what I know AAC frames does not encode their own size so usually the framing is provided by a container. That said with some luck and some heuristics maybe you can guess the start of each frame, e.g. looks for 0x01 (SCE with instance tag 0 and part of global gain field) or 0x2? (CPE) and usually the samples don't very that much is size.

Remove audio streams from a .m2ts video file

I have a video which has 3 audio streams in the file. The first one is English and the other ones are in different languages. How can I get rid of these audio streams without losing the quality of the video and the English stream.
I think ffmpeg should be used but I don't know how to do it.
Video
Bit rate mode: Variable
Overall bit rate: 38.6 Mb/s
Chroma subsampling: 4:2:0
Audio
Format: DTS-HD
Compression mode: Lossless

MPEG Transport Stream Audio data information

I am writing a code to extract AAC audio data from mpeg ts stream. I want to get stream properties like sampling frequency, number of channels, Audio type, Audio profile type etc. from Transport stream, without decoding the actual data. How much of the information will be available from stream?
Also I want to know is there any way to find the total duration of the stream without actually finding the last PTS value in the file
Thanks
AAC frames packed in TS use ADTS headers. Its 7 (or 9) bytes, and very easy to parse. ADTS header format is documented well online.

Audio file bandwidth limitation

I am new to audio file processing. I want to limit the bandwidth of some audio files. The problem is that all the solutions that I find online suggest to limit the sample rate. Is there a way to limit the bandwidth of an audio file, without changing the sample rate?
If audio file is not compressed format (WAV,AIFF,AU), sampling rate is bandwidth (44.1Khz = 44100 Bytes/sec)
but compressed format, Bitrate is bandwidth, re-encode it for changing bandwidth.

flac codec, 2 files, same duration, but different memory sizes

So I have 2 audio flac files converted from mp4 files. Both are 31 seconds long but one is of 1MB and the other one comes out to be of 4MB. Well, I am using ffmpeg with 8000 sample rate in exactly the same manner. Can anyone explain why this could be happening ?
Is there any particular way in which the mp4 source file has to be coded ? or any other pointers please ?
Thanks already,
asmi
Flac files are compressed using lossless compression so the output file size depends on how well that compression works on a particular file. So even for input with the same duration you would expect the output size to vary.
It is only if you were producing uncompressed output (such as a Wav file) that you would expect the sizes to be the same.

Resources