使用FFMPEG显示视频内可视进度条吗? [英] Showing in-video visual progress bar with FFMPEG?
问题描述
由于OBS Studio缺少视觉指示器来显示视频的进展情况(以及何时需要前进到下一个场景),我想知道是否有命令行选项(或解决方案)将FFMPEG转换为重新编码视频,并在视频底部显示进度条,以显示该视频到目前为止已播放了多长时间.
有这样的功能吗?
下面是一个简单的3秒示例,其中使用了动画
ffmpeg -i input.mp4 -filter_complex" color = c = red:s = 1280x10 [bar]; [0] [bar] overlay = -w +(w/10)* t:Hh:shortest= 1"-c:复制输出.mp4
您将需要更改的内容:
-
在彩色滤光片中,我以
1280
作为示例来匹配input.mp4
的宽度.您可以使用ffprobe
获取宽度或ffprobe
来获取持续时间.
As OBS Studio lacks a visual indicator to show how far a video has progressed (and when you need to advance to the next scene), I was wondering if there is a command-line option (or solution) to get FFMPEG to re-encode the video and show a progress bar at the bottom of the video that shows how long the video has been playing so far.
Is there such a feature?
Here's a simple 3 second example using an animated overlay:
ffmpeg -i input.mp4 -filter_complex "color=c=red:s=1280x10[bar];[0][bar]overlay=-w+(w/10)*t:H-h:shortest=1" -c:a copy output.mp4
What you will have to change:
In the color filter I used
1280
as an example to match the width ofinput.mp4
. You can useffprobe
to get the width or the scale2ref filter to resize to matchinput.mp4
.In the overlay filter I used
10
as an example for the total duration in seconds ofinput.mp4
. You can useffprobe
to get the duration.
这篇关于使用FFMPEG显示视频内可视进度条吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!