I am trying to find the codec used to compress a movie. I am sure if I need to somehow use CMFormatDescription and get a CMVideoCodecType key. I am stuck as to how to get pa
A slightly more readable version of @jbat100's answer (for those who were as confused as I was with that #define FourCC2Str, hah)
// Get your format description from whichever track you want
CMFormatDescriptionRef formatHint;
// Get the codec and correct endianness
CMVideoCodecType formatCodec = CFSwapInt32BigToHost(CMFormatDescriptionGetMediaSubType(formatHint));
// add 1 for null terminator
char formatCodecBuf[sizeof(CMVideoCodecType) + 1] = {0};
memcpy(formatCodecBuf, &formatCodec, sizeof(CMVideoCodecType));
NSString *formatCodecString = @(formatCodecBuf);