How to find length of a video file (wmv,avi,dat) ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jmangya
Forum Newbie
Posts: 2
Joined: Fri Mar 17, 2006 12:24 am

How to find length of a video file (wmv,avi,dat) ?

Post by jmangya »

Hello ,

I need to find the time for the particular uplaoded avi,dat,mpeg video file.
Is it possible to calculate the time by using PHP/PHP class .

What is the solution if clinet want to restrict users with the 2 mins video file only.

Thx in advance,
Mangesh
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

After the file is uploaded there is probably a Unix command you could run via exec and then grep the results to obtain the length of the video file.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

ffmpeg may be of interest.
Post Reply