How to achieve multiple simultaneous MP3 encoding, conversion solution libmp3lame faster wav mono, bis and mono process PCM input QQ35744025

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/xjb2006/article/details/81261699

Prior wrote an article entitled "How to achieve multiple simultaneous MP3 encoding" (address https://blog.csdn.net/xjb2006/article/details/78404523   ) 

The main thing I read the intel ipp using technology, today wrote more simple and powerful mp3 encoding library, you can also perform the same function:

Here the two-channel processing and mono:

BYTE mp3_buffer[4096*5];

    int write = 0;
    if(channel==2)
        write=lame_encode_buffer_interleaved(lame,(short*)pData,nAudioLen/4 , mp3_buffer, sizeof(mp3_buffer));
    else
        write = lame_encode_buffer(lame, (short*)pData, NULL,nAudioLen/2, mp3_buffer, sizeof(mp3_buffer));
    if(write>0)
        fwrite(mp3_buffer, write, 1, mp3);

 

lame_encode_buffer_interleaved write binaural mixing, lame_encode_buffer write separate left and right channels.

Paste some initialization code in it:

     lame_t lame;

    lame = lame_init();
    int nV=lame_get_version(lame);
    //lame_init_bitstream(lame);
    lame_set_in_samplerate(lame, 22050);
    lame_set_out_samplerate(lame, 22050);
    lame_set_num_channels(lame, 1);
    lame_set_brate(lame,64);
    lame_set_quality(lame,2);
    lame_init_params(lame);

 

Very simple and very powerful, direct support for sample rates from 8000 to 48000HZ, set up different versions based on different sampling rates, such as the 8000 version is set to 2.5

When uploading the code to find time to go, and finally make ads:

The need for cooperation to contact QQ35744025, I have 03 years working, "proficient" audio and video applications programming techniques (plus barely proficient, to attract attention, ha ha), proficient in VC, MFC, multimedia educational software, recording and broadcasting software, broadcast software core technology most have been mastered, such as ffmpeg technology, MP4, FLV synthesis coding, H264, AAC, MP3, IPP can use efficient space conversion image, and can use INTEL cuda hardware H264 codec, can achieve real-time encoding 240 1080P, full synchronization and a high degree of smoothness, rtmp live push, rtmp server, YV12, YUV422, NV12, RGB24, RGB32 familiar with the conversion, scaling, wav, AAC, mp3 codec, the video transition effects algorithms, video watermarking, LOGO, text. Video screen capture, video capture camera, a video image display The D3D efficient, OPENCV, image library ximage, GDI, GDIPLUS skilled application, a voice recognition and text conversion, recognition and matching, LAN remote control, real-time audio and video call, capture card playback, in addition to the SQL database, ACCESS, EXCEL database, DOC, PDF file open to extract, FTPServer, Client, all of the above codes have been commercial.

Ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah, there has been no detailed statistics, that I have learned so many things, ah, I really admire his ah

Guess you like

Origin blog.csdn.net/xjb2006/article/details/81261699