Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resize Does Not Work #27

Open
ApplicationError opened this issue Feb 22, 2020 · 5 comments
Open

Resize Does Not Work #27

ApplicationError opened this issue Feb 22, 2020 · 5 comments

Comments

@ApplicationError
Copy link

ApplicationError commented Feb 22, 2020

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

@coperfield86
Copy link

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

@danieltrolezi
Copy link

Same here

@ramkumawathis
Copy link

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

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

@lakshmaji
Copy link
Owner

Hi Could you add a sample repo which reproduces this!

@SAKSHISONI
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants