Posted by Toby A Inkster on 05/02/07 08:59
Rami Elomaa wrote:
> php has nothing like that built in. In fact there is nothing for
> manipulating videos in the built-in library. You'll need an external
> package or perhaps run some external tool from command line.
Regarding external tools to run from the command line, mplayer comes with
a script called midentify. Using this you can get output like the
following. Of interest are ID_VIDEO_WIDTH, ID_VIDEO_HEIGHT and perhaps
ID_LENGTH.
ID_AUDIO_ID=1
ID_VIDEO_ID=2
ID_FILENAME=example.wmv
ID_DEMUXER=asv
ID_VIDEO_FORMAT=WMV3
ID_VIDEO_BITRATE=0
ID_VIDEO_WIDTH=640
ID_VIDEO_HEIGHT=480
ID_VIDEO_FPS=1000.000
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_CODEC=ffwmav2
ID_AUDIO_FORMAT=353
ID_AUDIO_BITRATE=31960
ID_AUDIO_RATE=44100
ID_AUDIO_NCH=2
ID_LENGTH=634.00
ID_VIDEO_CODEC=wmv9dmo
--
Toby A Inkster BSc (Hons) ARCS
http://tobyinkster.co.uk/
Geek of ~ HTML/SQL/Perl/PHP/Python/Apache/Linux
Navigation:
[Reply to this message]
|