Closed (fixed)
Project:
Video
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Dec 2007 at 21:12 UTC
Updated:
19 Mar 2008 at 16:51 UTC
If you upload a video file with a strange name, say test_640x480.mov, for instance with a screen size of 320x220, the video_ffmpeg_helper module will try to find the screen size of the file and will find 640x480 instead of the correct size. The reason is that the regular expression used in the function _video_ffmpeg_helper_get_video_info(&$node) of video_ffmpeg_helper.module is not correct.
Replace the regular expression for the size ($pattern = '/[0-9]{2,4}x[0-9]{2,4}/'; ...) by
$pattern = '/Video: .*, ([0-9]{2,4}x[0-9]{2,4})/';
...
$resolution = $matches[1][0];
.
Do the same thing for the duration: replace the regular expression ($pattern = '/[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]/'; ...) by
$pattern = '/Duration: ([0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9])/';
...
$playtime = $matches[1][0];
.
Comments
Comment #1
fax8 commentedcommitted to 5.x-dev . Thanks for your help.
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.