Kunal Vyas
Kunal Vyas

Reputation: 1579

Get video's duration

I have tried, in vain, to fetch the duration of a video file using c++. I'm on a Linux platform. How do I go about it? Is there some file on my native file system where this information is stored, or does it move with the video file? Google gives me every method on ruby, c# etc etc, but I haven't found any libraries for c++.

Upvotes: 2

Views: 1271

Answers (2)

Alessandro Pezzato
Alessandro Pezzato

Reputation: 8842

You can try to look at midentify source code. It's a tool that come with mplayer (http://www.mplayerhq.hu/). If you're too lazy, you can take it's output and parse it in your c++ application

Upvotes: 0

genpfault
genpfault

Reputation: 52164

Give libavcodec a shot.

Upvotes: 1

Related Questions