[Sora][streaming]can clearly hear noise when play audio rtsp and play fitfully



5 years ago
11 months ago


(Reporter: sync-1, Unassigned)


Firefox Tracking Flags

(Not tracked)



(3 attachments)



5 years ago
Firefox OS v1.3
 Mozilla build ID:20140422024003
 can clearly hear noise when play audio rtsp
 1.Enable wifi or mobile data;
 2.Open browser and go to test page provided by mozilla:https://rawgithub.com/William-Hsu/TestApp_RTSP/master/index.html;
 3.Open 'Audio test link 1.AMX test link' to play.Play fitfully at the begainning.->KO1
 And can clearly hear the noise.->KO2
 4.Go to our test page:http://imps.tcl-ta.com/stream/stream.html;
 5.Open rtsp audio,just can play amr rtsp audio normally.Can't play aac/aac+/eaac+ rtsp audio normally that play fitfully.->KO3
 For KO1,would not play fitfully at the begainning;
 For KO2,would not appear noise during playing rtsp audio;
 For KO3,should can play aac/aac+/eaac+ rtsp audio normally.

Comment 1

5 years ago
Created attachment 8437391 [details]
rtsp tracking log

Comment 2

5 years ago
Created attachment 8437393 [details]
aac file

Comment 3

5 years ago
Created attachment 8437394 [details]
tracking log for the bug - final

Comment 4

5 years ago
I tested aac_16_8_m.3gp in http://imps.tcl-ta.com/stream/3gp_stream/aac/aac.html page. And found that silence was added when playing aac by rtsp protocol.

MediaDecoderStateMachine::AudioLoop() will get the samplerate for audio to play at a correct time. Now it got a wrong value - 44100, but it should be 8000. 

RTSP protocol calls parseAudioSpecificConfig() to get aac samplerate and channel number, but the value is not transferred to omx。

MediaDecoderStateMachine::DecodeMetadata() calls MediaOmxReader::ReadMetadata(),and MediaOmxReader::ReadMetadata() calls OmxDecoder::TryLoad() to get the samplerate and channel number.

In OmxDecoder::TryLoad(), Rtsp and local file will get into different branches. OMXCodec::initOutputFormat() will configure the PCM infomatiion,and now in this step the problem occurs。In this function, an input metadata will be compared with a default metadata. If they are different, the default value will replace the input value. This function was called twice. In the first call, the default value was got, and in the second call, the correct value was got。When in RTSP branch, the default value in first call was assigned to rtsp metada. But the correct value in second call cannot be sent to rtsp metadat no longer.

For more specific information, please see the attached tracking log for this bug.

Comment 5

5 years ago
(In reply to sync-1 from comment #2)
> Created attachment 8437393 [details]
> aac file

Please just ignore this file, it is not the correct file in rtsp server.

Comment 6

5 years ago
I also reported this issue to Qualcomm, and here is their response.
 Dear customer,
 1. The change you mentioned in OMXCodec::initOutputFormat() seems OK to me -  however develop team does not think this is the proper way to fix the issue.
 2. From the log we can see OMXCodec could be correctly re-init with 8k sampling rate. However, RtspMediaSource is not re-init when OMXCodec re-init. Since RtspMediaSource is Mozilla code, could you check with Mozilla on how to re-init it when OMXCodec is getting re-inited?
 3. Further more, it is recommended to use ACodec for streaming, other than OMXCodec. Could you check with Mozilla on why they're not using ACodec?

Comment 7

3 years ago
link all Fire C (codename: Sora) bugs to a meta one.
Blocks: 1258646

Comment 8

11 months ago
Firefox OS is not being worked on
Last Resolved: 11 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.