Thumbnail icon indicating copy to clipboard operation
Thumbnail copied to clipboard

Resize Does Not Work

Open ApplicationError opened this issue 5 years ago • 5 comments

This is probably a user error -- but maybe, maybe it's a bug.

I am not able to get the thumbnails to be resized.

Here is my thumbnail.php

<?php

/*
|--------------------------------------------------------------------------
| File which returns array of constants containing the thumbnail 
| integration configurations. 
|--------------------------------------------------------------------------
|
*/

return array(

    /*
    |--------------------------------------------------------------------------
    | FFMPEG BINARIES CONFIGURATIONS
    |--------------------------------------------------------------------------
    |
    | If you want to give binary paths explicitly, you can configure the FFMPEG 
    | binary paths set to the below 'env' varibales.
    |
    | NOTE: FFMpeg will autodetect ffmpeg and ffprobe binaries.
    |
    */

    'binaries' => [
        'enabled' => env('FFMPEG_BINARIES', false),
        'path'    => [
            'ffmpeg'  => env('FFMPEG_PATH', '/opt/local/ffmpeg/bin/ffmpeg'),
            'ffprobe' => env('FFPROBE_PATH', '/opt/local/ffmpeg/bin/ffprobe'),
            'timeout' => env('FFMPEG_TIMEOUT', 3600), // The timeout for the underlying process
            'threads' => env('FFMPEG_THREADS', 12), // The number of threads that FFMpeg should use
        ],

    ],

    /*
    |--------------------------------------------------------------------------
    | Thumbnail image dimensions
    |--------------------------------------------------------------------------
    |
    | Specify the dimensions for thumbnail image
    |
    */

    'dimensions' => [
        'width'  => env('THUMBNAIL_IMAGE_WIDTH', 800),
        'height' => env('THUMBNAIL_IMAGE_HEIGHT', 800),
    ],

    /*
    |--------------------------------------------------------------------------
    | Thumbnail watermark alpha
    |--------------------------------------------------------------------------
    |
    | Specify the secret THUMBNAIL_X
    |
    */

    'watermark' => [
        'image' => [
            'enabled' => env('WATERMARK_IMAGE', false),
            'path'    => env('WATERMARK_PATH', 'http://voluntarydba.com/pics/YouTube%20Play%20Button%20Overlay.png'),
        ],
        'video' => [
            'enabled' => env('WATERMARK_VIDEO', false),
            'path'    => env('WATERMARK_PATH', ''),
        ],
    ],

    /*
    |--------------------------------------------------------------------------
    | Thumbnail some x
    |--------------------------------------------------------------------------
    |
    | Specify the secret THUMBNAIL_X
    |
    */

    'THUMBNAIL_X' => '<YOUR_THUMBNAIL_X>',

);

// php artisan vendor:publish

// end of file thumbnail.php

Here is my env file

...
#Custom FFMPEG binaries path
FFMPEG_BINARIES = true
FFMPEG_PATH     = /usr/local/bin/ffmpeg
FFPROBE_PATH    = /usr/local/bin/ffprobe
FFMPEG_TIMEOUT  = 3600
FFMPEG_THREADS  = 12
...

The thumbnail files are being generated, but they are the size of the video. I'd love to have them dropped to a square format.

Laravel Framework 6.16.0

ApplicationError avatar Feb 22 '20 22:02 ApplicationError

Hello I have the same problem. The thumbnail file are being generated but not with the with and the height defined in .env file

coperfield86 avatar Apr 28 '20 11:04 coperfield86

Same here

danieltrolezi avatar Aug 11 '20 12:08 danieltrolezi

can i resize the video thumb image before use watermark image.

Because the video thumb image have too compress, so client reject this.

ramkumawathis avatar May 04 '21 14:05 ramkumawathis

Hi Could you add a sample repo which reproduces this!

lakshmaji avatar May 06 '21 17:05 lakshmaji

Any update on this issue because I am also facing the same? Neither it's using from the config file nor from env.

SAKSHISONI avatar Sep 09 '21 09:09 SAKSHISONI