Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FFmpeg php metadata wrapper

Tags:

php

ffmpeg

I have two questions about FFmpeg 1. Does FFmpeg Output change with versions (ffmpeg -i) 2. If the output don't change, anyone know a good PHP/Python class that parse FFmpeg Output and get all metadata (Duration, Codec, Audio Biterate, Video Biterate, Width, Height...) 3. if the FFmpeg output change, anyone know a linux tool (cmd line) that get those metadatas without dependence of FFmpeg.

I know that the php-ffmpeg module exist, but it's so old and buggy (wrong duration for example..., can't get $movie->getAudioBitRate() working )

Thanks

like image 486
mathsonic Avatar asked Nov 06 '22 08:11

mathsonic


1 Answers

ffpmpeg-php seems to be your best bet, unless you want to grab/parse ffmpeg's output directly. If you plan on working with remote files (eg. urls vs. local files) then FFmpeg-php will not work with anything but absolute urls (eg. http://example.com/video.mp4 vs. http://example.com/?get_video=234). There might be a cURL option for accomplishing this but I've yet to come across anything stable.

like image 139
Stormbytes Avatar answered Nov 09 '22 09:11

Stormbytes