public function getThumbnail($video_path,$storage_path,$thumnail_name,$tts=10)
    {

        try {
            if(config('thumbnail.binaries.enabled')) {
                $ffmpeg = FFMpeg::create(
                    array(
                        'ffmpeg.binaries'  => config('thumbnail.binaries.path.ffmpeg'),
                        'ffprobe.binaries' => config('thumbnail.binaries.path.ffprobe'),
                        'timeout'          => config('thumbnail.binaries.path.timeout'),
                        'ffmpeg.threads'   => config('thumbnail.binaries.path.threads'),
                    )
                );
            } 
            else {
                $ffmpeg   = FFMpeg::create();   
            }
            
            $video        = $ffmpeg->open($video_path);
            $result_image = $storage_path.'/'.$thumnail_name;

            $video
                ->filters()
                ->resize(new Coordinate\Dimension(config('thumbnail.dimensions.height'), config('thumbnail.dimensions.width'))) 
                ->synchronize();//320, 240
            $video
                ->frame(Coordinate\TimeCode::fromSeconds($tts))
                ->save($result_image);

            if($video) {
                if(config('thumbnail.watermark.image.enabled')) {
                    $src       = imagecreatefrompng(config('thumbnail.watermark.image.path'));
                    $got_image = imagecreatefromjpeg($result_image);
            
                    // Get dimensions of image screen shot
                    $width     = imagesx($got_image);
                    $height    = imagesy($got_image);

                    // final output image dimensions
                    $newwidth  = config('thumbnail.dimensions.width');   
                    $newheight = config('thumbnail.dimensions.height');

                    $tmp       = imagecreatetruecolor($newwidth,$newheight);

                    imagecopyresampled($tmp,$got_image,0,0,0,0,$newwidth,$newheight,$width,$height);

                    // Set the brush
                    imagesetbrush($tmp, $src);
                    // Draw a couple of brushes, each overlaying each
                    imageline($tmp, imagesx($tmp) / 2, imagesy($tmp) / 2, imagesx($tmp) / 2, imagesy($tmp) / 2, IMG_COLOR_BRUSHED);
                    imagejpeg($tmp,$result_image,100);
                }
                return true;
            }
            else {
                return false;
            }
        } catch(Exception $thumbnailException) {
            // error processing request
            throw new Exception($thumbnailException->getMessage());            
        }
    }