- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone,
I am having problems with the IPP MP4 Muxer. I'm trying to mux audio I'm getting from splitter (encoded) but it won't mux. It gives me invalid pointer error (becauseGET_INIT_BITSTREAM(&BS, lpData->GetDataPointer()); won't initialize BS structure in umc_mp4_mux.cpp). Downthere it breaks on line:
decSpecConfig.audioObjectType = get_audio_object_type_by_adts_header(&m_adts_fixed_header);
Probably because header is not initialized. My sample looks like this:
do { if (_MuxData.GetDataSize() < 4) { do { status = _Splitter.GetNextData(&_MuxData,audioTrack); if (status == UMC::UMC_ERR_NOT_ENOUGH_DATA) vm_time_sleep(5); } while(status==UMC::UMC_ERR_NOT_ENOUGH_DATA && !endOfAudio); if (((status != UMC::UMC_OK) && (status != UMC::UMC_ERR_END_OF_STREAM))|| (status == UMC::UMC_ERR_END_OF_STREAM)&& (_MuxData.GetDataSize() < 4)) exit_flag = 1; if (!endOfAudio) { tmpData.Reset(); tmpData.SetBufferPointer((Ipp8u*)_MuxData.GetBufferPointer(), _MuxData.GetDataSize()); memcpy(tmpData.GetDataPointer(), _MuxData.GetDataPointer(), _MuxData.GetDataSize()); tmpData.SetDataSize(_MuxData.GetDataSize()); tmpData.SetTime(_MuxData.GetTime()); status = _Muxer.PutAudioData(&tmpData); } if (status != UMC::UMC_OK) { _Muxer.PutEndOfStream(0); endOfAudio = true; } // reset input buffer memset(_MuxData.GetBufferPointer(),0,_MuxData.GetDataSize()); _MuxData.SetDataSize(0); } } while(!exit_flag && (status == UMC::UMC_ERR_NOT_ENOUGH_DATA || status == UMC::UMC_ERR_SYNC));
So, _Muxer.PutAudioData(&_MuxData) breaks on first call. I should mention that Muxing works perfectly well for VIDEO_TRACK, but it won't work for AUDIO and therefore it won't work when trying to mux them both in one stream.
The code for Video muxing is similar to this one. My video track is 0, and audio track is 1.
Please give me some hints if you have any. Maybe I am missing something. For the end, here's how I initialize Muxer:
_muxerParams.m_lpDataWriter = &_Writer; _muxerParams.m_SystemType = UMC::MP4_ATOM_STREAM; _muxerParams.m_nNumberOfTracks = 1; _muxerParams.pTrackParams = new UMC::TrackParams[_muxerParams.m_nNumberOfTracks]; // videoInfo = (UMC::VideoStreamInfo*)(streamInfo->m_ppTrackInfo[videoTrack]->m_pStreamInfo); audioInfo = (UMC::AudioStreamInfo*)(streamInfo->m_ppTrackInfo[audioTrack]->m_pStreamInfo); //_muxerParams.pTrackParams[0].type = UMC::VIDEO_TRACK; //_muxerParams.pTrackParams[0].info.video = videoInfo; //_muxerParams.pTrackParams[0].bufferParams.m_prefInputBufferSize = 2000000; //_muxerParams.pTrackParams[0].bufferParams.m_prefOutputBufferSize = 2000000; _muxerParams.pTrackParams[0].type = UMC::AUDIO_TRACK; _muxerParams.pTrackParams[0].info.audio = audioInfo; _muxerParams.pTrackParams[0].bufferParams.m_prefInputBufferSize = 1000; _muxerParams.pTrackParams[0].bufferParams.m_prefOutputBufferSize = 1000;
Thanks a lot in advance.
Regards,
Manca
Regards,
Manca
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I figured out why the audio data wouldn't mux. I neededFLAG_DATA_FROM_SPLITTER as one of Muxer parameters. But now, even though the audio is correctly muxed, it won't play when opened with VLC or mplayer. Mplayer shows these errors:
Manca
FAAD: Failed to decode frame: Scalefactor out of range
FAAD: Failed to decode frame: Input data buffer too small
AO: [pulse] 64000Hz 2ch s16le (2 bytes per sample)
Starting playback...
FAAD: Failed to decode frame: Gain control not yet implemented
FAAD: Failed to decode frame: Gain control not yet implemented
FAAD: Failed to decode frame: Maximum number of bitstream elements exceeded
FAAD: Failed to decode frame: Maximum number of bitstream elements exceeded
FAAD: Failed to decode frame: Maximum number of bitstream elements exceeded
FAAD: Failed to decode frame: Scalefactor out of range
FAAD: Failed to decode frame: Scalefactor out of range
FAAD: Failed to decode frame: Scalefactor out of rangeFAAD: Failed to decode frame: Input data buffer too smallAO: [pulse] 64000Hz 2ch s16le (2 bytes per sample)Starting playback...FAAD: Failed to decode frame: Gain control not yet implementedFAAD: Failed to decode frame: Gain control not yet implementedFAAD: Failed to decode frame: Maximum number of bitstream elements exceededFAAD: Failed to decode frame: Maximum number of bitstream elements exceededFAAD: Failed to decode frame: Maximum number of bitstream elements exceededFAAD: Failed to decode frame: Scalefactor out of rangeFAAD: Failed to decode frame: Scalefactor out of rangeDo you have some ideas what else do I need in order to make this muxer work?
Thanks a lot!
Manca
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I still don't know why the audio tracks can't be decoded when tried to play muxed with video (or muxed alone in stream as well). VLC says that it can't decode mp4a (AAC audio). Everything looks like I am missing some flag or muxing it on a wrong way? I handle end of stream correctly and always put for both audio and video end of stream once it's found.
Please help.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
anyone? Intel guys?
![](/skins/images/7FC17B7B85029576C25F1E43CE255B51/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page