ffmpeg测试

            //视频截图测试
// $outPath = rtrim($relativeFilePath, '.mp4');
// $outPath = $outPath . '_a.jpg';
// $shell = "ffmpeg -i " . $filePath . " -ss 1 -y -frames:v 1 -q:v 1 " . $outPath . " 2>&1";
// exec($shell, $output, $ret);
// var_dump($output);exit;
//return $res;

// $outPath = rtrim($filePath, '.mp4');
// $outPath = $outPath . '_a.jpg';
// var_dump($outPath);
// //ffmpeg -i RevolutionOS.rmvb sample.jpg -ss 00:00:05 -r 1 -vframes 1 -an -vcodec mjpeg
// $shell = "ffmpeg -i " . $filePath ." $outPath " ." 00:00:05 -r 1 -vframes 1 -an -vcodec mjpeg";
// exec($shell, $output, $ret);
// var_dump($filePath, $output, $ret);exit;

// $p = 'uploads/videos/a.mp4';
// if(!file_exists($p)){
// var_dump('不存在');exit;
// }else{
// $mypath = $path.'uploads\videos';
// var_dump('存在', $mypath.'\a.mp4');
// if(file_exists($mypath.'\a.mp4')){
// echo '视频在';
// }else{
// echo '视频不在';
// }
// $imgPath = $mypath."\a.jpg";
// }

// $shell = 'D:\xampp\ffmpeg\bin'.'\ffmpeg -i '.$mypath.'\a.mp4 '.$imgPath.' -ss 00:00:50 -r 1 -vframes 1 -an -f mjpeg';//vcodec
// var_dump($shell);
// exec($shell);

// $cmd='D:\xampp\ffmpeg\bin'.'\ffmpeg.exe -i '.$mypath.'\a.mp4 -f image2 -ss 15 -s 400*300 -vframes 1 '.$imgPath;
// exec($cmd);
// var_dump($cmd);
//exit;

posted on   andydaopeng  阅读(45)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2021-04-23 mac安装redis
2021-04-23 msql创建用户并授权
2013-04-23 js call用法
2013-04-23 睡觉姿势
2013-04-23 本草纲目之五味四气

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示