Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The profile of the output AAC file maybe diff with the same audio para #146

Open
GoogleCodeExporter opened this issue Apr 3, 2016 · 1 comment

Comments

@GoogleCodeExporter
Copy link

Sometimes, the AAC output is not support by ffplay, as the AAC profile is SSR.

What steps will reproduce the problem?
1. To reproduce it easily, I mark the code about get AAC config from setting, 
but always record it to file, and log the profile.  
2. You will find the profile will be different, even using the same input 
param, log as flow:
I/AACStream(18524): Input: Source: 1 Format:6 Encoder:3 CH:2 Rate:44100 
BitRate:16000
I/AACStream(18524): Output:  Profile:4 CH:2 Rate:44100  

I/AACStream(18524): Input: Source: 1 Format:6 Encoder:3 CH:2 Rate:44100 
BitRate:16000
I/AACStream(18524): Output:  Profile:1 CH:2 Rate:44100
3. Samsung S4 profile will be 3(SSR), and ffplay is not support. 

What is the expected output? What do you see instead?
The profile should be the same.

What version of the product are you using? On what operating system?
I have try Samsung S4, Xiaomi 4. They are all may change the profile. 

Please provide any additional information below.


Original issue reported on code.google.com by phymurb...@gmail.com on 4 Mar 2015 at 10:32

@GoogleCodeExporter
Copy link
Author

I found the cause, it is the google android bugs:
While the recorder record the AAC to fd, the AACWriter does not init the 
profile(only init it while record to file).

As below:
mAACProfile(OMX_AUDIO_AACObjectLC) not init in the AACWriter(fd). 

AACWriter::AACWriter(const char *filename)
    : mFd(-1),
      mInitCheck(NO_INIT),
      mStarted(false),
      mPaused(false),
      mResumed(false),
      mChannelCount(-1),
      mSampleRate(-1),
      mAACProfile(OMX_AUDIO_AACObjectLC) {

    ALOGV("AACWriter Constructor");

    mFd = open(filename, O_CREAT | O_LARGEFILE | O_TRUNC | O_RDWR, S_IRUSR | S_IWUSR);
    if (mFd >= 0) {
        mInitCheck = OK;
    }
}

AACWriter::AACWriter(int fd)
    : mFd(dup(fd)),
      mInitCheck(mFd < 0? NO_INIT: OK),
      mStarted(false),
      mPaused(false),
      mResumed(false),
      mChannelCount(-1),
      mSampleRate(-1) {
}

Original comment by phymurb...@gmail.com on 4 Mar 2015 at 11:44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant