Skip to content

qtdemux additions for MPEG-H support and for gapless playback

Carlos Rafael Giani requested to merge dv1/gstreamer:qtdemux-enhancements into main

These are a number of enhancements to qtdemux (with an accompanying small addition to pbutils).

First, MPEG-H FourCCs are now parsed by qtdemux, and configuration data (in the mha1 case) is extracted and passed on as codec_data caps downstream. mha1 is essentially raw MPEG-H frame data. At this stage, the more commonly encountered variant is MHAS (MPEG-H audio stream), which is a bitstream that encapsulates MPEG-H frames along with configuration data, similar to how Annex.B byte streams encapsulate h.264 frames and codec data. There is currently no MPEG-H decoder available in GStreamer, but at least one decoder library is now available as well as an encoder library.

Second, gapless audio is now supported. This is specific to single-stream audio-only .m4a data. The most common way of supporting gapless AAC in MP4 is by relying on the iTunes iTunSMPB tag. Older Nero AAC encoders did not use this, but they always used a specific a fixed encoder delay and padding. So, as fallback, if the AAC file is found to have been encoded with Nero AAC, and the iTunSMPB is not present (newer Nero AAC versions did add it, older ones didn't), then that Nero AAC specific behavior is used. Similar fallbacks for other encoders could be added in the future.

Merge request reports