This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AAC-LC Configuration...

Hello...

I’m using AAC-LC encoder in DM368.

According to a playing test, it has no problem with ordinary players.

But, it has a lagging sound problem with VLC only.
In addition, Samsung Galaxy S2 smart phone has same problem as VLC.

I want to use as AAC-LC, 1 channel, 8khz, 24kbps, 16bit

Please check the following configuration and let me know any changing required.

   ittiam_params.aud_params.size   = sizeof(ITTIAM_EAACPLUSENC_Params);
   ittiam_params.aud_params.sampleRate  = 8000;
   ittiam_params.aud_params.bitRate = 24000;
   ittiam_params.aud_params.channelMode = IAUDIO_1_0;
   ittiam_params.aud_params.dataEndianness = XDM_LE_16;
   ittiam_params.aud_params.encMode = IAUDIO_CBR;
   ittiam_params.aud_params.inputFormat = IAUDIO_INTERLEAVED;
   ittiam_params.aud_params.inputBitsPerSample = 16;
   ittiam_params.aud_params.maxBitRate = 256000;
   ittiam_params.aud_params.dualMonoMode = IAUDIO_DUALMONO_LR;
   ittiam_params.aud_params.crcFlag = XDAS_FALSE;
   ittiam_params.aud_params.ancFlag = XDAS_FALSE;
   ittiam_params.aud_params.lfeFlag = XDAS_FALSE;
   ittiam_params.noChannels = 1;
   ittiam_params.aacClassic = 1;
   ittiam_params.psEnable = 0;
   ittiam_params.dualMono = 0;
   ittiam_params.downmix = 0;
   ittiam_params.useSpeechConfig = 0;
   ittiam_params.fNoStereoPreprocessing = 0;
   ittiam_params.invQuant = 2;
   ittiam_params.useTns = 1;
   ittiam_params.use_ADTS = 0;
   ittiam_params.use_ADIF = 0;
   ittiam_params.full_bandwidth = 0;
   ittiam_params.i_channels_mask = 0;
   ittiam_params.i_num_coupling_chan = 0;
   ittiam_params.write_program_config_element = 0;
  • Hi,

    Can you share the aac LC stream, It would be helpful to understand the real problem.  When you say it plays fine in other players, which other player did you use ?

     

    regards

    Yashwant

  •  

    I recorded a file with DM368. AAC-LC 1channel, 8000hz

    IPNC version is 2.6.0

     

    Those following lists are playing properly 

    - QuickTime Player

    - RealPlayer

    - Elecard MPEG Player

    - Nero ShowTime

    - KMPlayer

    - GomPlayer

    - LG Optimus 2X (smartphone)

     

    Distorted sound player

    - VLC

    - Samsung Galaxy S, Galaxy S2 (smartphone)

     

    I checked the AAC bitstream and it contains FILL Element.

     

    I found some info as following address.

    http://www.hydrogenaudio.org/forums/index.php?showtopic=73545

     

    Does Fill Element effect sound recording?

    If it does, is there any solutions to delete it?

     

    regards

     


  • There might be  some problem with the header information (in the mp4).
    VLC, somehow tries to play it as 16Khz, stereo and it sounds bad.

    In QuickTime, it plays it as 8kHz, mono and it sounds fine.

     

    Please check the header module or packing module of the mp4 parser.

     

  • 1. I made this file with a same program as a previous file.

    3247.VGA_1c_8khz.mp4

     

       Quick Time plays this file as mono but VLC plays stereo.
       I think VLC convert this file to stereo by itself.
       Anyway, both players play this file properly.
       To my knowledge, it does not relative to file format.

     

    2. I change an Audio track and record a part with a previous file and it plays properly.

    8741.HD_change_audio.mp4

     

    Please check this again.

     

  • I checked these fles. Both sound fine on QuickTime as well as VLC player.

    Also, QT shoes it properly as 8Khz, Mono file. But VLC shows it as stereo,16kHz file.

    We checked the same behaviour with other mono aac files that we have. So, VLC seems to be converting it to stereo itself.

  • So,was the problem in the files which you posted yesterday .

    Was there any issue with the mp4 packing or something else ?

  • It looks like there is some misunderstanding on our correspondences.

    All the files I uploaded are to show there is no problem in mp4 packing

    All the files were created with the same parser. So, it is not mp4 packing related problem.
    Maybe it is related to AAC-LC bitstream (of DM368 AAC encoder) itself.

    The first file includes AAC bitstream generated from AAC-LC encoder of DM368 IPNC SDK.
    (Audio is working fine with QuickTime, but not working with VLC)

    The second file were generated with video/audio bitstream obtained from different source.
    (This file is working correctly with both QuickTime (as mono 8khz output) and VLC (as stereo 16khz output)).
    As I mentioned earlier, we used the SAME parser, so it might not be mp4 packing problem.

    The third one is created just by replacing only AAC bitstream with other source AAC bitstream.
    It is also working fine with both QuickTime and VLC.

    So, we might conclude that the issue is related to AAC bitstream itself of the first file which is generated from AAC encoder of DM368.

    We further analyzed AAC bitstream of the first file, that is, AAC bitstream generated from DM368 AAC encoder.
    We found that there is “FILL Element” in the AAC bitstream.
    But the AAC bitstream in the second and third files do not include “FILL Element”.
    Once again, the AAC bitstreams of the second and third files are generated from different AAC encoder.

    I found some related info in the following link. Please check it out.
    http://www.hydrogenaudio.org/forums/index.php?showtopic=73545

    So, can we remove “Fill Element” or is there any other method to output correct sound in VLC and other players?

    I hope that now we have same understandings on the issue.

    This is somewhat urgent problem with our product using TI DM368.

    Thanks.

  • 1.Below file is an audio only file in .adts format, created by DM368 aac Encoder. It is 32khz, mono file. VLC plays it fine, just shows it as stereo file. Quick time also plays it fine and shows it properly as mono file.

    2072.speech_32k_3_128.aac

    2.Below  is the mp4 file created using online MP4 creator tool  "Yamb", and the above bitsream. here also, VLC plays it fine, just shows it as stereo file. Quick time also plays it fine and shows it properly as mono file.

    2465.speech_32k_3_128.mp4

     

    Also, you can see that this AAC bitstream also has "FILL" Elements. So, FILL elements do not cause any problem .

    Can you dump DM368 AAC encoder's output (without the mp4 packing), and try playing it in VLC player? Does it play fine.

    And then use your mp4 creator and yamb creator, and see whether they play fine ?

     

    Thanks.

     

     

  • I also went through the forum link you had shared. May be the mp4 creator you are using, is not taking care of FILL elements. If its an .adts format that you are packing inside the .mp4 file, then the mp4 creator can use the frameLength field in the adts header to correctly read the frame size and pack it. May be it is treating FILL element as part of next frame beginning.

     

  •  

    Thanks for your kind reply. 
    Your sample file sounds fine.
    BUT, I’m somewhat disappointed that it’s not 8kHz audio.
    Is there any special reason that you tested with 32kHz?
    As you know, IPNC SDK dose support only 8kHz and 16kHz, NOT 32kHz.
    If we try to forcefully set 32kHz, an error comes out.
    The voice codec of DM368 only supports 8kHz and 16kHz.

    If possible, can you check once again with 1 channel, 8kHz ?

    Below is what I’ve got from my test.
    As a result, it may be not a mp4 file format issue.

    1. I created a distortedsound.aac file in adts format with AAC-LC bitstream from DM368 encoder.
       But, that distortedsound.aac also gives distorted sound

    0172.distortedsound.aac.

     

     

    2. As you suggested, I installed Yamb and so created an mp4 file with distortedsound.aac
        But, still it gives distorted sound.

    6862.distortedsound_yamb.mp4    

     

     

    3. I extracted the audio data from 2465.speech_32k_3_128.mp4 you uploaded 
       and I replaced the audio data in my first uploaded sample file with your audio data.
       It sounds correct, so I don’t think it’s a mp4 file format problem.
       If all this fuss is related to mp4 file format, then this last test should have given the same distorted sound.

    2526.speech_32k.mp4  

     

    I always appreciate your kind response.
    So, once again, would you check things out with 1 channel, 8kHz audio?
    Thanks in advance.

     

  • please find the streams in the below post

  • Here are the files with 8kHz, Mono, encoded at 24 kbps. ( since this was the bit-rate as mentioned in your first post)

    This is .aac file in adts format, encoded with DM368 AAC encoder. Plays fine with VLC.

    7801.8KhzMono.aac

     

    This is .mp4 file created with Yamb tool. Plays fine with VLC.

    2148.8KhzMono.mp4

     

    Also, this file also has FILL elements.