views:

13

answers:

1

Hi,

I'm on Mac OS X (Objective-C) and I'm looking for a way to determine if a file has a video stream. More specifically, a video stream that can be decoded by FFmpeg. I probably can put something together with Objective-C to see if a file has a QuickTime-compatible video stream but that's not enough. I could try MediaInfo but I don't know which files it can open.. Another option would be running FFmpeg and grep to see if there's a video stream. But this is relatively slow so I looked at FFmpeg's source code to see how they detect it and I couldn't even find out in which file to start.

A: 

Here is a tutorial on using libavformat and libavcodec (both part of FFMpeg) to get video stream info.

SB