VideoHelp Forum
+ Reply to Thread
Results 1 to 10 of 10
Thread
  1. Hello,
    i would like to ask if bit depth (bits per sample) and sampling rate are used (for example as ffmpeg arguments) only for uncompressed audio and bit rate is used for compressed ?

    For example bit depth,sampling rate is used only for wav,au and bitrate for mp3,flac,aac,alac and so on.
    Quote Quote  
  2. Banned
    Join Date
    Oct 2014
    Location
    Northern California
    Search PM
    Not true all audio compressed or not must have an implicit bit depth and bitrate.
    Quote Quote  
  3. When it comes to compressed lossy audio, it has bitrate but not necessary bitdepth. For example, MP3, Vorbis or AAC don't have bitdepth. Decoder can decode it as 16-bit, 24-bit or 32-bit, its up to decoder.
    Quote Quote  
  4. Banned
    Join Date
    Oct 2014
    Location
    Northern California
    Search PM
    Originally Posted by Detmek View Post
    For example, MP3, Vorbis or AAC don't have bitdepth. Decoder can decode it as 16-bit, 24-bit or 32-bit, its up to decoder.
    Your first sentence directly contradicts the second sentence.

    Cars do not have color. The painter can paint it black, blue or red, it's up to the painter.

    Quote Quote  
  5. WAV or FLAC (lossless) codecs have native bitdepth as audio is stored as 8, 16, 24 or 32 bits per sample. In order to achive lossless decompression decoder must decode it as 8, 16, 24 or 32-bit audio. Decoding in any other bitdepth means that decoder is broken.
    Most lossy codecs do not have native or fixed bitdepth. Decoder will decode these formats using one of the standard bitdephts for PCM (8,16,24 or 32 bits per sample) and every value is valid.
    Quote Quote  
  6. Banned
    Join Date
    Oct 2014
    Location
    Northern California
    Search PM
    Originally Posted by Detmek View Post
    WAV or FLAC (lossless) codecs have native bitdepth as audio is stored as 8, 16, 24 or 32 bits per sample. In order to achive lossless decompression decoder must decode it as 8, 16, 24 or 32-bit audio. Decoding in any other bitdepth means that decoder is broken.
    Most lossy codecs do not have native or fixed bitdepth. Decoder will decode these formats using one of the standard bitdephts for PCM (8,16,24 or 32 bits per sample) and every value is valid.
    WAV is a container and usually contains LPCM, LPCM allows various bit depths.
    Flac also allows various bit depths.

    Last edited by newpball; 2nd Apr 2015 at 12:18.
    Quote Quote  
  7. I accept that I should wrote PCM instead of WAV as WAV is container that usually holds PCM but it can hold MP3, AC3 or some other format.
    I also wrote that PCM or FLAC support different bitdepths, as you confirmed.
    Quote Quote  
  8. Banned
    Join Date
    Oct 2014
    Location
    Northern California
    Search PM
    Originally Posted by Detmek View Post
    I accept that I should wrote PCM instead of WAV as WAV is container that usually holds PCM but it can hold MP3, AC3 or some other format.
    I also wrote that PCM or FLAC support different bitdepths, as you confirmed.
    Yes.

    On re-reading your comments I now understand what you mean.

    You are right in that a lossy compressed format does not have a fixed bit depth and neither a fixed sample rate, it totally depends on the compression method. However there is an implicit bit depth which in case of lossy compression may not be an integer value!
    Quote Quote  
  9. Thanks for the answers.

    I am asking because in the ebook "FFMPEG Basics" it says that :

    Code:
    File size calculation
    The final file size of encoded output is the sum of audio and video stream sizes. The equation for video
    stream size in bytes is (the division by 8 is for the conversion from bits to bytes):
    
    video_size = video_bitrate * time_in_seconds / 8
    
    If audio is uncompressed, its size is calculated by the equation:
    
    audio_size = sampling_rate * bit_depth * channels * time_in_seconds / 8
    
    To calculate the file size of a compressed audio stream, we need to know its bitrate and the equation is
    
    audio_size = bitrate * time_in_seconds / 8
    
    For example to calculate the final size of 10-minutes video clip with the 1500 kbits/s video bit rate and 128
    kbits/s audio bitrate, we can use the equations:
    file_size = video_size + audio_size
    Quote Quote  
  10. Originally Posted by alexander121 View Post
    Thanks for the answers.

    I am asking because in the ebook "FFMPEG Basics" it says that :
    And?

    Bitrate is valid term for any data stream (compressed in a lossy or lossless way or not compressed at all).

    So in case of PCM bitrate=samplerate*bitdepth*channels and remain part of equation doesn't change.

    Lossy or lossless codecs can be variable bitrate.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!