mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-29 22:45:14 -04:00
Add passthru delegate and avconv support.
This commit is contained in:
parent
365b6d8019
commit
08e18b40b5
5 changed files with 18 additions and 3 deletions
|
@ -3,6 +3,7 @@
|
|||
class Thumb {
|
||||
|
||||
private static $FFMPEG_CMD = "ffmpeg -ss 0:01:00 -i [SOURCE] -an -vframes 1 [TARGET]";
|
||||
private static $AVCONV_CMD = "avconv -ss 0:01:00 -i [SOURCE] -an -vframes 1 [TARGET]";
|
||||
private static $CONVERT_CMD = "convert -strip [SOURCE][0] [TARGET]";
|
||||
private static $THUMB_CACHE = "thumbs";
|
||||
|
||||
|
@ -36,6 +37,9 @@ class Thumb {
|
|||
$capture_abs_path = $source_abs_path;
|
||||
} else if ($type === "mov") {
|
||||
$capture_abs_path = $this->capture(Thumb::$FFMPEG_CMD, $source_abs_path);
|
||||
if ($capture_abs_path === null) {
|
||||
$capture_abs_path = $this->capture(Thumb::$AVCONV_CMD, $source_abs_path);
|
||||
}
|
||||
} else if ($type === "doc") {
|
||||
$capture_abs_path = $this->capture(Thumb::$CONVERT_CMD, $source_abs_path);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue