dqcj32855 2015-04-28 12:53
浏览 116
已采纳

FFMpeg在命令行中工作,但不在shell_exec中工作

When I convert a video using command line(ffmpeg -i dust.mp4 -s 320x240 video.flv 2>&1) it does the conversion fine. But when I use the php code it does not. The code is as follows:

echo "Starting ffmpeg...

";
$ffmpeg = "~/ffmpeg_sources/ffmpeg";
echo exec("$ffmpeg  -i dust.mp4 -s 320x240 video.flv 2>&1");
echo "Done.
";

And the output is :

Starting ffmpeg... sh: 1: ~/ffmpeg_sources/ffmpeg: not foundDone.

Any help will be appreciated.

Thanks in advance

  • 写回答

2条回答 默认 最新

  • doulao7998636570 2015-04-28 13:13
    关注

    I have already answered for this same question just look at that answer,you will know what n=mistake you done.

    For Video Thumbnail creation we use ffmpeg.

    In Linux Systems(centos 6.x) Ffmpeg installation process and Php example:-

    This process is done in my centos 6 and created thumbnails using php.

    Just click on this link Ffmpeg for video thumbnail creation

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致
  • ¥15 高德地图2.0 版本点聚合中Marker的位置无法实时更新,如何解决呢?
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题