jasonsmall's Avatar
jasonsmall 4
4 Asked
5 Answered
1 Best
1
No one has voted on this question yet :(
3 years, 2 months ago

What is the best way to determine a video's size (resolution) using PHP on a linux based server? Please give an example.

I need a way to be able to tell the resolution of a video using php. It can be done using the "exec" command as long as the result can be accessed using php.
Tip for best answer: M$2.00
Separate topics with commas, or by pressing return. Use the delete or backspace key to edit or remove existing topics.

You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.

M$

What is Your Answer?

0
0
0

2 Answers

4
arjo's Avatar
arjo | 3 years, 2 months ago
4
ffmpeg-php is an extension for PHP that adds an easy to use, object-oriented API for accessing and retrieving information from video and audio files. It has methods for returning frames from movie files as images that can be manipulated using PHP's image functions. This works well for automatically creating thumbnail images from movies. ffmpeg-php is also useful for reporting the duration and bitrate of audio files (mp3, wma...). ffmpeg-php can access many of the video formats supported by ffmpeg (mov, avi, mpg, wmv...)
http://ffmpeg-php.sourceforge.net/

you can find some examples here:
http://ffmpeg-php.sourceforge.net/doc/api/ffmpeg_movie.php

$movie = new ffmpeg_movie(String path_to_media, boolean persistent) ;

$movie->getFrameRate();
$movie->getFrameHeight();
$movie->getFrameWidth();

You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.

M$

Report Abuse

Post Reply Cancel
0
farhan1223's Avatar
farhan1223 | 1 year, 4 months ago
1
To know this u have to learn the PHP language and the codes of it.Then u solve these kinds of problems.

Server management

You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.

M$

Report Abuse

Post Reply Cancel

Learn something new with our FREE educational apps!

Private lessons in the comfort of your own home. Get back in shape or finally pick up a guitar with our great experts guiding you the whole way!
Learn Guitar
Learn Hip Hop
Learn Pilates