开发者

How can i detect CODEC in MPMoviePlayerController in iphone-sdk

When Video is made with the Sorenson CODEC... MPMoviePlayerController just plays Audio(and not the Video), Instead i want to show my custom error message at this point. How can i detect which CODEC is use开发者_如何转开发d by particular File programmatically ... ?

EDIT: I am not using Quick time in my code so that solution won't work

Thanks


Check this documentation to understand the Quicktime file format : http://developer.apple.com/library/mac/documentation/QuickTime/QTFF/qtff.pdf

The field you are looking for is the "vfmt" code that is containing the video fourcc code (there is one for each video track in your file, so take care if your file is containing several video tracks). The fourcc codes for Sorenson codec are "SVQ1" and "SVQ3".

Now you'll have to write some code to parse the QT file to find the correct atom, extract the "vfmt" value and compare it to SVQ1/SVQ3 !

Apple is providing some classes to easily parse quicktime files, but it is only available on Mac OS, not on iOS !

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜