[英]Fade out video/audio with FFMPEG
i'm trying to simply fade out both video and audio of an input.mp4. 我试图简单地淡出input.mp4的视频和音频。 The video lasts 00:29:59 (1799 sec) and i want to fade out the last sec.
视频持续00:29:59(1799秒),我希望淡出最后一秒。 I'm using this command (it should just fadeout the video):
我正在使用此命令(它应该淡出视频):
ffmpeg -i input.mp4 -vf fade=t=out:st=1798:d=1 output.mp4
but it always give me the same error: 但它总是给我同样的错误:
Too many packets buffered for output stream 0:1.
[aac @ 0000000002605b60] Qavg: 2430.591
[aac @ 0000000002605b60] 2 frames left in the queue on closing
What am I doing wrong? 我究竟做错了什么?
EDIT: The file i was trying to edit was corrupted, with other files the filter works well :) 编辑:我试图编辑的文件已损坏,其他文件过滤器运行良好:)
Well if you were trying to also fade out the audio you would I believe need to incorporate the afade
filter. 好吧,如果你试图淡出音频,我认为需要加入
afade
过滤器。 You can accomplish both using a complex filter: 您可以使用复杂的过滤器完成两者:
ffmpeg -i input.mp4 \
-filter_complex \
"[0:v]fade=t=out:st=1798:d=1[v]; \
[0:a]afade=t=out:st=1798:d=1[a]" \
-map "[v]" -map "[a]" output.mp4
add '-max_muxing_queue_size 999'
to your ffmpeg command that is: 将
'-max_muxing_queue_size 999'
添加到您的ffmpeg命令中:
ffmpeg -i input.mp4 -max_muxing_queue_size 999 -vf fade=t=out:st=1798:d=1 output.mp4
haven't tried this command myself but I've encounter myself with same error and the flag solved the problem. 我自己没有尝试过这个命令,但我遇到了同样的错误并且旗帜解决了问题。 See also ffmpeg ticket
另请参见ffmpeg票证
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.