Answered by:
Media Fundation convert AAC to ADTS

Question
-
I am trying to convert audio stream from AAC to ADTS (Audio Data Transport Stream). This is a necessary step to send HTTP Live Stream to Apple media player. I use the Media Foundation function MFCreateADTSMediaSink, which is supposedly converting AAC stream to ADTS steam. I follow the code in MF wavsink sample, which converts PCM audio to WAV audio, except replacing CreateWavSink(pStream, &pSink) by MFCreateADTSMediaSink(pStream, pAudioType, &pSink). Here pAudioType is a newly created media type and setting MajorType to MFMediaType_Audio, SubType to MFAudioFormat_AAC, and PayloadType to 1. I also set SamplePerSecond to 48000, NumChannels to 1, BitsPerSample to 16, and BlockAlignment to 2 to be consistent with my input file.
When I select a xx.mp4 file or a xx.aac as input file, the calls in RunMediaSession,
hr = pSession->GetEvent(0, &pEvent);
hr = pEvent->GetStatus(&hrStatus);
return hrStatus with error of -
“No suitable transform was found to encode or decode the content”.
And thus the session is terminated and produce no output.
In the session, every function calls return hr = S_OK, indicating the Media Foundation does not find any invalid call or invalid function argument.
Because of this failure, I also tried to use MFCreateAC3MediaSink and had the same failure. Actually, these two functionsdo not need encoder or decoder.
How can I make it work?
I hope Microsoft engineers can look into this matter. As I said, this function will be very useful if it can work correctly for Internet Video/Audio streaming to Apple iPhone and iPad (which requires Transport Streaming format).
- Moved by Just Karl Friday, January 20, 2017 7:47 PM Looking for the correct forum.
Wednesday, December 14, 2016 4:18 AM
Answers
-
If you're providing feedback I'd post it here on uservoice.
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by Just Karl Friday, January 20, 2017 10:22 PM
- Marked as answer by Dave PatrickMVP Wednesday, January 25, 2017 4:22 PM
Friday, January 20, 2017 10:21 PM
All replies
-
Hello,
The 'Academic Initiatives - Technical Queries' forum is for posts Related to technical / coding / programming related issues as related to Microsoft's Academic Initiatives.
As it's off-topic here, I am moving the question to the Where is the forum for... forum.
Karl
Friday, January 20, 2017 7:37 PM -
If you're providing feedback I'd post it here on uservoice.
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by Just Karl Friday, January 20, 2017 10:22 PM
- Marked as answer by Dave PatrickMVP Wednesday, January 25, 2017 4:22 PM
Friday, January 20, 2017 10:21 PM