scratch

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 114  →  ?path2? @ 115
/graph.php
@@ -118,15 +118,20 @@
)
);
### Extract thumbnail.
$ffmpeg = FFMpeg\FFMpeg::create();
$video = $ffmpeg->open($CANON_URL);
$frame = $video->frame(
FFMpeg\Coordinate\TimeCode::fromSeconds(
$config['VIDEO_PREVIEW_IMAGE_FRAME_SECOND']
)
);
$frame->save($userPath.'.'.'jpg');
### Do not re-create the thumbnail if it already exists.
if(!file_exists($userPath.'.'.'jpg')) {
### Extract thumbnail.
$ffmpeg = FFMpeg\FFMpeg::create();
$video = $ffmpeg->open($CANON_URL);
$frame = $video->frame(
FFMpeg\Coordinate\TimeCode::fromSeconds(
$config['VIDEO_PREVIEW_IMAGE_FRAME_SECOND']
)
);
$frame->save($userPath.'.'.'jpg');
}
### Get preview image size.
list($imageWidth, $imageHeight) = getimagesize($userPath.'.'.'jpg');
### Probe video for width and height.