File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Linux / UNIX and the fly likes C/C++ program to read an AVI file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "C/C++ program to read an AVI file" Watch "C/C++ program to read an AVI file" New topic

C/C++ program to read an AVI file

samantha katam

Joined: Sep 19, 2005
Posts: 16
Well i am pretty much new to C++. I need a C/C++ program that can run in Linux to read an AVI file and print out all the attributes of the file ( e.g. frame rate, video width, height, .... ) and separate the video and audio data into two files. If not Please refer me to a site where i can get sample codes.

It would be great if you can respond quicker.

Thanks Sam
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

This is actually a pretty tall order. Can't you just use transcode?

[Jess in Action][AskingGoodQuestions]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17421

avidemux2 can probably do what you want. Also, if you run mplayer on video, it prints a synopsis of the video program(s) in the stream.

I burn DVDs frequently (ironically, because my NTSC-out video card has copy protection so I can't just output straight video to my wireless TV link after I "tivo" stuff to disk from late-night shows). The primary stream-processing tools I use are mencoder, ffmpeg, and "tovid".

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: C/C++ program to read an AVI file
It's not a secret anymore!