You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows Batch调用FFmpeg检测M3u8前3分钟响度写入文件失败

解决Windows批处理中FFmpeg响度检测结果写入空文件的问题
  • 问题根源:FFmpeg的loudnorm滤镜检测结果输出到标准错误流(stderr),而你原命令仅将**标准输出流(stdout)**追加到log.txt,导致日志文件为空。
  • 修复后的命令:通过2>&1将标准错误流也重定向到文件,修改后的批处理代码如下:
    for /F "tokens=*" %%A in (input.txt) do ffmpeg -i %%A -ss 0 -t 180 -af loudnorm=I=-16:TP=-1.5:LRA=15:print_format=summary -f null - >> log.txt 2>&1
    
  • 优化建议:若需要对应每个链接的检测结果,可在每条结果前添加链接标识,方便排查:
    for /F "tokens=*" %%A in (input.txt) do (
        echo === 检测链接: %%A === >> log.txt
        ffmpeg -i %%A -ss 0 -t 180 -af loudnorm=I=-16:TP=-1.5:LRA=15:print_format=summary -f null - >> log.txt 2>&1
    )
    

内容的提问来源于stack exchange,提问作者Atlantis0813

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.01 09:50:35