Video surveillance industry G711 codec [continued] collection knowledge, video surveillance g711

Source: Internet
Author: User

Video surveillance industry G711 codec [continued] collection knowledge, video surveillance g711

1. reference factors for Buffer collection:

A. How long does the buffer take, for example, ms or 50 ms;

B. The number of bytes received per second;

BufferSizeM = dwBytesPerSec * dwLatencyInMilliseconds/1000;

2. Examples:

Collect sound: If the encoding format is G711

BufferSize = 16/8*8000*(TimeMs)/1000

Note:

16/8 occupies 2 bytes for each Sample of G711,

8000 indicates the sampling rate, that is, 8000 samples of G711 need to be sampled every 1 s,

TimeMs is buffer time (ms), assuming TimeMs is 50 ms,

Then BufferSize = 2*8000*50/1000 = 800 Bytes, that is, the size before compression is 800;

In this way, the size of each package after G711 compression is 400 Bytes.

3. How long does the standard practice usually take?

TimeMs * sampling frequency.

For example, 20*8000/1000 = 160 (20 is PTime, 8000 is the sampling frequency). Generally, a single frame of audio data is 20 ms, which improves the playback latency.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.