Example of verifying Dolby AC-4 specific boxes

You can use MP4drop to dump human-readable box information from an MP4 file and then verify that the boxes specific to Dolby AC-4 are set correctly for each of the Dolby AC-4 tracks in the MP4 file.

About this task

This test verifies the contents of the /moov/trak[x]/mdia/minf/stbl/stsd/ac-4 box in a test stream, where [x] is the track ID of the Dolby AC-4 track. For test cases that contain multiple Dolby AC-4 tracks (multiple .mp4 files, correspondingly), you must run MP4drop on each file that contains Dolby AC-4 data.

Procedure

  1. Locate the test stream Audio_ID_2ch_64kbps_25fps_ac4, and then copy it to the directory that contains MP4drop.
  2. Run this command:
    mp4drop Audio_ID_2ch_64kbps_25fps_ac4 -m 0 > test.xml
    library_booksNote: For test cases containing multiple Dolby AC-4 tracks, run MP4drop on each of them and examine the results.
    The command generates this information in the test.xml file:
    <ftyp size="20">
    <moov size="582">
       <mvhd size="100">
       <trak size="410">
          <tkhd size="84">
          <mdia size="310">
             <mdhd size="24">
             <hdlr size="38">
             <minf size="217">
                <smhd size="8">
                <dinf size="28">
                <stbl size="157">
                   <stsd size="81">
                      unsigned int(8) version = 0;
                      unsigned int(24) flags = 0;
                      unsigned int(32) entry_count = 1;
                        <ac-4 size="65">
                           unsigned int(8) reserved = 0;
                           unsigned int(8) reserved = 0;
                           unsigned int(8) reserved = 0;
                           unsigned int(8) reserved = 0;
                           unsigned int(8) reserved = 0;
                           unsigned int(8) reserved = 0;
                           unsigned int(16) data_reference_index = 1;
                           unsigned int(32) reserved = 0;
                           unsigned int(32) reserved = 0;
                           unsigned int(16) channelcount = 2;
                           unsigned int(16) samplesize = 16;
                           unsigned int(32) reserved = 0;
                           unsigned int(16) samplerate = 48000;
                           unsigned int(16) reserved = 0;
                           <dac4 size="29">
                             unsigned int(3) ac4_dsi_version = 1;
                             unsigned int(7) bitstream_version = 2;
                             unsigned int(1) fs_index = 1;
                             unsigned int(4) frame_rate_index = 2;
                             unsigned int(9) n_presentations = 1;
                             unsigned int(1) b_program_id = 0;
                             unsigned int(2) bit_rate_mode = 2;
                             unsigned int(32) bit_rate = 0;
                             unsigned int(32) bit_rate_precision = 4294967295;
                             unsigned int(5) byte_align = 0;
                             unsigned int(8) presentation_version = 1;
                             unsigned int(8) pres_bytes = 15;
                             unsigned int(5) presentation_config_v1 = 31;
                             unsigned int(3) mdcompat = 0;
                             unsigned int(1) b_presentation_group_index = 1;
                             unsigned int(5) presentation_group_index = 0;
                             unsigned int(2) dsi_frame_rate_multiply_info = 0;
                             unsigned int(2) dsi_frame_rate_fraction_info = 0;
                             unsigned int(5) presentation_emdf_version = 0;
                             unsigned int(10) presentation_key_id = 0;
                             unsigned int(1) b_presentation_channel_coded = 1;
                             unsigned int(5) dsi_presentation_ch_mode = 1;
                             unsigned int(24) presentation_channel_mask_v1 = 1;
                             unsigned int(1) b_presentation_core_differs = 0;
                             unsigned int(1) b_presentation_filter = 0;
                             unsigned int(1) b_substreams_present = 1;
                             unsigned int(1) b_hsf_ext = 0;
                             unsigned int(1) b_channel_coded = 1;
                             unsigned int(8) n_substreams = 1;
                             unsigned int(2) dsi_sf_multiplier = 0;
                             unsigned int(1) b_substream_bitrate_indicator = 0;
                             unsigned int(24) dsi_substream_channel_mask = 1;
                             unsigned int(1) b_content_type = 1;
                             unsigned int(3) content_classifier = 0;
                             unsigned int(1) b_language_indicator = 0;
                             unsigned int(1) b_pre_virtualized = 0;
                             unsigned int(1) b_add_emdf_substreams = 0;
                             unsigned int(1) b_presentation_bitrate_info = 0;
                             unsigned int(1) b_alternative = 0;
                             unsigned int(1) de_indicator = 1;
                             unsigned int(1) dolby_atmos_indicator = 0;
                             unsigned int(4) reserved = 0;
                             unsigned int(1) b_extended_presentation_id = 0;
                             unsigned int(1) reserved = 0;
                            </dac4>
                      </ac-4>
  3. Examine the generated XML file in an XML editor, and verify that the ac-4 and dac4 box information written to the XML file contains the values specified in the expected results.