首页 > 解决方案 > ffmpeg 输出文件在哪里?

问题描述

我正在关注该链接http://adnan-tech.com/add-or-extract-audio-from-video-php-ffmpeg/ ,并根据该代码在 php 中创建文件

<form action="post_audio.php" method="POST" enctype="multipart/form-data">
                <div class="form-group">
                    <label>Select video</label>
                    <input type="file" name="video" class="form-control" required>
                </div>
 
                <div class="form-group">
                    <label>Select audio</label>
                    <input type="file" name="audio" class="form-control" required>
                </div>
 
                <input type="submit" class="btn btn-success" value="Add Audio">
            </form>

和我的 post_audio.php 文件

$video = $_FILES["video"]["tmp_name"];
        $audio = $_FILES["audio"]["tmp_name"];
 
        $command = "C:\ffmpeg\bin\ffmpeg.exe -i " . $video . " -i " . $audio . " -c:v copy -map 0:v:0 -map 1:a:0 output.mp4";
        system($command);
 
        $command = "C:\ffmpeg\bin\ffmpeg.exe -i " . $video . " original-audio.mp3";
        system($command);

但它什么也不返回,我不知道更新的输出文件在哪里

标签: phpffmpeg

解决方案


推荐阅读