Hi,
I noticed that when Gallery plays back videos, it automatically gets the correct size for a video. What method does it use to do this, or does it store it in the database? In which case, how does it determine the size at the time of upload?
Thank you,
-Metroid48
Posts: 32509
Yes, the size of videos is detected and stored in the database.
if not detected automatically, users can change it manually in "edit movie" -> movie.
the detection is done with the ffmpeg module which calls the ffmpeg binary via php's exec() function.
--------------
Enter the Gallery 2 Theme Contest today!
Posts: 4
Thanks, does this work on AVI and MPG, even MOV files? As it seems to work most of the time.
Anyway, I'm really new to php and am not sure how to utilise exec() on the ffmpeg executable to get the width/height of a video file.
Thanks!
EDIT: I used PuTTY, a SSH shell, and used this command:
And got a full response, width/height and all. And yes, I did use the actual username and filenames. However, I am unsure of how to parse the resulting array with PHP. Any suggestions?
Posts: 4
If I just directly echo the output variable, I just get "Array". It seems that it is outputting an array, then, however I am unsure of how to access the array sections through PHP to get the width/height. Or anything, for that matter.