Skip navigation

I need to distinguish between MP4 and MOV files without using the extension .mov or .mp4.

447 Views 3 Replies Latest reply: May 9, 2012 9:58 AM by Jon Walker RSS
man209 Calculating status...
Currently Being Moderated
May 8, 2012 2:00 AM

Hi,

I need to distinguish between MP4 and MOV files without using the extension .mov or .mp4.

 

If I use FTYP major_brand = 'qt  ' as the distinguishing factor, is that sufficient? Or do I need some information from compatible_brands as well?

Can we have mov files where major_brand != 'qt  ', Ex If 'qt  ' is one of the compatible_brands but not major_brand: would we call it a valid mov file?

  • Jon Walker Level 6 Level 6 (17,520 points)

    I need to distinguish between MP4 and MOV files without using the extension .mov or .mp4.

    What do you mean by "distinguish" here? QT players normally do this on their own for MPEG-4/AAC data in MOV and MP4 or for H.264/AAC data in MOV, MP4, or M4V file containers whether the extension is present or not or even if the extension was manually changed at the finder level. (In most cases the actual container does not matter as far as QT apps are concerned.) Apps like "MediaInfo" will report correctly report the file type whether the extension is present or has been manually changed by a user whereas most QuickTime apps now report the file kind based on the extension. (I.e., missing extension is a "document" file kind, a MOV extension is "QuickTime" file kind, and MP4 is an MPEG-4 kind.

     

    /___sbsstatic___/migration-images/migration-img-not-avail.png

    iMac, Mac OS X (10.7.3), 3.4 GHz Quad Core i7, 4 GB 1333 MHz
  • Jon Walker Level 6 Level 6 (17,520 points)

    So far this has served me well. But I would like to know whether we can have mov files which might not have major_brand = 'qt  '.

    I don't believe so. Only routines that check/use the file extension to make decisions are likely to be fooled here since they usually bypass internal checking of file type which is not really modified when doing things like manually changing a file extension in the finder and QT routines that actually modify the embedded data automatically only do so when copying the MP4 data to a real MOV container. I suppose it would be possible for a determined user to falsify the file type manually but I have no idea as to why a user would ever want to do so.

     

    /___sbsstatic___/migration-images/migration-img-not-avail.png

    iMac, Mac OS X (10.7.3), 3.4 GHz Quad Core i7, 4 GB 1333 MHz

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.