问题
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?
回答1:
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 use ffprobe 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 use ffprobe to get the duration.
来源:https://stackoverflow.com/questions/62989964/showing-in-video-visual-progress-bar-with-ffmpeg