ffmpeg 无法在 siteground 上捕获屏幕截图

问题描述 投票:0回答:0

我在 laravel 中使用 ffmpeg (v5.1) 和 PHP 7.4

//where to save the image  
$new_file_name = time() . '.jpg';
$image = public_path() . '/uploads/images/' . $new_file_name; //Full path of image
$path = public_path() . '/uploads/' . $path;   //Full path of video
//ffmpeg command to find thumbnail from video
$interval = env('PLAEHOLDER_CAPTURE_TIME', 2);  //time to take screenshot at  
$cmd = "ffmpeg -i $path -ss 00:00:01 -vframes 1 $image 2>&1";
exec($cmd, $output);
var_dump($output); 
exit;

它抛出一个错误:

array(32) { [0]=> string(64) "ffmpeg 版本 5.1 版权所有 (c) 2000-2022 FFmpeg 开发人员" [1]=> string(25) " built with gcc 12 (GCC)" [2 ]=> string(128) " 配置:--enable-pic --enable-static --disable-ffplay --disable-ffprobe --disable-doc --disable-avdevice --disable-alsa" [3]= > string(40) " libavutil 57. 28.100 / 57. 28.100" [4]=> string(40) " libavcodec 59. 37.100 / 59. 37.100" [5] => string(40) " libavformat 59. 27.100 / 59 . 27.100" [6]=> string(40) " libavfilter 8. 44.100 / 8. 44.100" [7]=> string(40) " libswscale 6. 7.100 / 6. 7.100" [8] => string(40) " libswresample 4. 7.100 / 4. 7.100" [9]=> string(130) "Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/customer/www/backend.clavora.com /public_html/public/uploads/videos/1679277906.mp4':" [10]=> string(11) " Metadata:" [11]=> string(26) " major_brand : isom" [12]=> string(25) ) " minor_version: 512" [13]=> string(39) " compatible_brands: isomiso2avc1mp41" [14]=> string(35) " encoder : Lavf58.45.100" [15]=> string(59) " Du比例:00:00:32.58,开始:0.000000,比特率:515 kb/s" [16]=> string(161) " Stream #0:00x1: Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive ), 576x1024 [SAR 1:1 DAR 9:16], 380 kb/s, 30 fps, 30 tbr, 15360 tbn (default)" [17]=> string(13) " Metadata:" [18]=> string (56) " handler_name : ?Mainconcept Video Media Handler" [19]=> string(36) " vendor_id : [0][0][0][0]" [20]=> string(104) " Stream #0 :10x2: 音频:aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 129 kb/s (default)" [21]=> string(13) " Metadata:" [22]=> string( 60) " handler_name : #Mainconcept MP4 Sound Media Handler" [23]=> string(36) " vendor_id : [0][0][0][0]" [24]=> string(15) "流映射: " [25]=> string(55) " Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))" [26]=> string(31) "按[q]停止,[?] 寻求帮助" [27]=> string(78) "[auto_scale_0 @ 0x564f48c3b180] 无法在 auto_scale_0 上配置输出板" [28]=> string(29) "重新初始化过滤器时出错!" [29]=> string(76)“无法将帧注入过滤器网络:资源暂时不可用”[30]=> string(55)“处理流 #0:0 的解码数据时出错”[31]=> string(18) "转换失败!" }

php laravel ffmpeg screenshot
© www.soinside.com 2019 - 2024. All rights reserved.