dsshsta97935 2016-11-27 22:01
浏览 41

在后台转换视频

I found this question which is the same question I have, but with the small but important difference, that I'm using Windows so cronjobs are no thing.
I basically want to convert a video in PHP, but don't want the PHP script to hang up until the conversion is finished and instead return immediately.

My current code:

if ($videoext !== "mp4") {
    exec ( "./ffmpeg.exe -i " . $inputFile. " " . $outputFile/*without extension*/ . ".mp4" );//convert to useable format
    if (! in_array ( $videoext, $GLOBALS ['fileextensions'] )) {//Unsupported extension
        unlink ( $inputFile);//delete if not useful
    }
}

I'm using PHP7 with XAMPP for windows Any help is appreciated

EDIT: I know that pthreads exist, but I'm not sure if they do what I'd expect them to do and too stupid to get them working on my XAMPP installation

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 keil里为什么main.c定义的函数在it.c调用不了
    • ¥50 切换TabTip键盘的输入法
    • ¥15 可否在不同线程中调用封装数据库操作的类
    • ¥15 微带串馈天线阵列每个阵元宽度计算
    • ¥15 keil的map文件中Image component sizes各项意思
    • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
    • ¥15 划分vlan后,链路不通了?
    • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
    • ¥15 Vue3 大型图片数据拖动排序
    • ¥15 Centos / PETGEM