[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[文本处理] ffmpeg在cmd可以运行但在bat无法运行

做了ffmpeg的两个带通道的序列帧叠加输出视频设置
ffmpeg -f image2 -framerate 25 -i d:\\test\\%d.tga -loop 1 -i d:\\test2\\%d.tga -filter_complex overlay=shortest=1 d:\\out8.mp4            在cmd可以运行

但编辑成.bat文件后为:
echo off
ffmpeg -f image2 -framerate 25 -i d:\\test\\%%d.tga -loop 1 -i d:\\test2\\%%d.tga -filter_complex overlay=shortest=1 d:\\out8.mp4
pause




报错无法运行,转换报错如下:
Input #0, image2, from 'd:\\test\\%d.tga':
  Duration: 00:00:00.12, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: targa, bgra, 4096x4096, 25 tbr, 25 tbn, 25 tbc
Input #1, image2, from 'd:\\test2\\%d.tga':
  Duration: 00:00:00.12, start: 0.000000, bitrate: N/A
    Stream #1:0: Video: targa, bgra, 4096x4096, 25 tbr, 25 tbn, 25 tbc
File 'd:\\out8.mp4' already exists. Overwrite? [y/N] y
Stream mapping:
  Stream #0:0 (targa) -> overlay:main
  Stream #1:0 (targa) -> overlayverlay
  overlay -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
[libx264 @ 000001f6a5fc4f80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [error]: malloc of size 28876917 failed
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[image2 @ 000001f6a5fc1580] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
Conversion failed!



跪求大神帮忙解决!!!!!!

回复 1# lzcl


请把你的bat文件上传我看看。
如果需要上传文件,可以用阿里云盘或百度网盘。
我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

TOP

malloc of size 28876917 failed

TOP

本帖最后由 newswan 于 2023-3-27 15:20 编辑

ffmpeg %d.tga 是什么?
可以用echo 看看,批处理预处理后的命令
  1. echo off
  2. echo ffmpeg -f image2 -framerate 25 -i d:\\test\\%%d.tga -loop 1 -i d:\\test2\\%%d.tga -filter_complex overlay=shortest=1 d:\\out8.mp4
  3. pause
复制代码
或者用 cmd/c start 执行 ffmpeg,试试

TOP

这是tag格式的序列,应该是完整的了

TOP

%%d.tga

这是文件名还是代码没写完整?
bat小白,请多指教!谢谢!

TOP

返回列表