Menu

audio-only MP4 files with GPAC

Help
2003-09-18
2003-10-27
  • Hans-Jürgen Bardenhagen

    Would GPAC be able to play such a file if it only has one audio track and no other tracks inside the container like the standard BIFS and OD tracks that mp4creator normally produces? Is it standard-compliant to mux an AAC bitstream into the MP4 file that way? I'm asking, because FAAC does this at the moment when using the new -w switch, but it wouldn't be a problem to change this to the normal mp4creator layout. All audio players based on FAAD2 can decode this MP4 file, but this doesn't necessarily mean that it's entirely correct... ;-)

     
    • Jean Le Feuvre

      Jean Le Feuvre - 2003-09-19

      1- Yes it could (i actually had some dirty code at some point to do that), but currently the player only accepts files with BIFS/OD. I will very likely add this feature for next release, it's just a matter of inserting an hardcoded BIFS/OD (very much like isma) on the fly when loading the MP4.

      2 - Yes it is compliant provided that the MP4 has an iods atom referencing the audio track. The resulting file is NOT an MPEG-4 presentation (no scene) but is still compliant and may be used by a real presentation through OD urls.

       
      • Hans-Jürgen Bardenhagen

        Thank you very much for your information. I think the correct iods atom is used with this method, because the MP4 header looks like this using FAAD2's -i switch:

        C:\Media\001 ct_reference.mp4 file info:
        Track   Type    Info
        1       audio   MPEG-4, 19.951 secs, 121 kbps, 44100 Hz

        So the default BIFS and OD tracks of mp4creator are only there for ISMA compliance reasons, right? Are they just empty dummy tracks, or is there something inside of them?

         
        • Jean Le Feuvre

          Jean Le Feuvre - 2003-09-19

          this doesn't tell us if there is an iods atom or not, but that you can check with mp4tool or dumpster.

          Regarding "default" bifs and OD, they're of course not dummy tracks (they must contain a valid scene description), and they are also required if the file has an audio and a video track - eg, the trick of having no BIFS and OD when there is only one audio track in the file just work because there's no more than one "media object" in this file.

          I won't describe more of these architecture things for now, since i should have the BIFS/MPEG4 tutorial (first version:) on-line this WE, and it'll hopefully make things clearer!

          cheers.

           
          • Hans-Jürgen Bardenhagen

            OK, I finally found the tool (and the time) to analyze such an audio-only MP4 file done with foo_faac, the FAAC output plugin for foobar2000. It's done with mp4dump from the MPEG4IP tools package, and although my version was compiled in Jan 2003 I hope it still works correctly, since there are no MPEG2/4 header fields involved here. I only copied the beginning of the output text file:

            C:\PSYTEL\MP4DUMP60.EXE version 0.9.7.4
            Dumping c:\media\ct_reference.mp4 meta-information...
            type ftyp
              majorBrand = mp42
              minorVersion = 0 (0x00000000)
              <table entries suppressed>
            type mdat
            type moov
              type mvhd
               version = 0 (0x00)
               flags = 0 (0x000000)
               creationTime = 3147747196 (0xbb9ecf7c)
               modificationTime = 3147747328 (0xbb9ed000)
               timeScale = 90000 (0x00015f90)
               duration = 1795650 (0x001b6642)
               rate = 1.000000
               volume = 1.000000
               reserved1 = <70 bytes>
               00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00
               00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00
               00 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00
               00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
               00 00 00 00 00 00
               nextTrackId = 2 (0x00000002)
              type iods
               version = 0 (0x00)
               flags = 0 (0x000000)
               objectDescriptorId = 1 (0x001) <10 bits>
               URLFlag = 0 (0x0) <1 bits>
               includeInlineProfileLevelFlag = 0 (0x0) <1 bits>
               reserved = 15 (0xf) <4 bits>
               ODProfileLevelId = 255 (0xff)
               sceneProfileLevelId = 255 (0xff)
               audioProfileLevelId = 15 (0x0f)
               visualProfileLevelId = 255 (0xff)
               graphicsProfileLevelId = 255 (0xff)
               esIds
               ociDescr
               ipmpDescrPtr
               extDescr
            [...]

            So I guess the method of muxing only one audio track to MP4 used in FAAC and/or foo_faac is correct. Please tell me if you also need the rest of the output...

             
    • Jean Le Feuvre

      Jean Le Feuvre - 2003-10-01

      That's correct yes - i would add "perfect" since the file includes an IOD rather than an OD, hence indicates the profile/levels used.

      I'll do my best to include the audio-only or video-only file playback for next release (it's on its way, but under heavy debug ..)

       
    • bond

      bond - 2003-10-27

      i wanted to add that apple's m4a files (created by itunes) also only contain 1 audio track:

      Track Type Info
      1 audio MPEG-4, 162.377 secs, 128 kbps, 44100 Hz

      iod?:

      C:\PROGRA~1\AUDIO-~1\CONTAI~1\MP4\MPEG4IP\MP4DUM~1.EXE version 0.9.8.4
      Dumping C:\...\test.m4a meta-information...
      type ftyp
        majorBrand = M4A
        minorVersion = 0 (0x00000000)
        <table entries suppressed>
      type moov
        type mvhd
         version = 0 (0x00)
         flags = 0 (0x000000)
         creationTime = 3143221543 (0xbb59c127)
         modificationTime = 3143221561 (0xbb59c139)
         timeScale = 600 (0x00000258)
         duration = 97426 (0x00017c92)
         rate = 1.000000
         volume = 1.000000
         reserved1 = <70 bytes>
         00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00
         00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00
         00 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00
         00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
         00 00 00 00 00 00
         nextTrackId = 2 (0x00000002)
        type trak
         type tkhd
          version = 0 (0x00)
          flags = 7 (0x000007)
          creationTime = 3143221543 (0xbb59c127)
          modificationTime = 3143221561 (0xbb59c139)
          trackId = 1 (0x00000001)
          reserved1 = <4 bytes> 00 00 00 00
          duration = 97426 (0x00017c92)
          reserved2 = <12 bytes> 00 00 00 00 00 00 00 00 00 00 00 00
          volume = 1.000000
          reserved3 = <38 bytes>
          00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00
      [...]