ffmpeg覆盖输出文件(如果存在) [英] ffmpeg override output file if exists

查看:3383
本文介绍了ffmpeg覆盖输出文件(如果存在)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用startend时间从音频文件.FLAC创建片段,这是我的command.

I am creating a clip from an audio file .FLAC with a start and end time, here is my command.

ffmpeg -i /audio/191079007530_1_01.flac 
       -t 51 
       -ss 69 
       /clips/44z274v23303t264y2z2s2s2746454t234_clip.mp3 
       2>&1 >> /ffmpegLogs.log

我将此命令与PHP代码一起使用,我的问题是

I use this command with my PHP code and my question is,

当我在控制台上运行上述命令时,它会要求我

When i run the above command on the console it asks me to

如果目标中已经存在输出文件,则覆盖输出文件

override the output file if the output file already exists in the destination,

如果文件存在,我应该使用什么switch或其他command自动覆盖.

what switch or extra command should I use to automatically override if the file exists.

推荐答案

在命令中使用选项-y

ffmpeg -y 
-i /audio/your_file_name.flac 
-t 51 
-ss 69 
/clips/your_clip_name.mp3 2>&1 >> /ffmpegLogs.log

这篇关于ffmpeg覆盖输出文件(如果存在)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆