Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
347 views
in Technique[技术] by (71.8m points)

How To Scroll Subtitle With FFMpeg

The following code works fine except 1 parameter:

ffmpeg -i 1.MP4 -i logo.png -i profile.png -filter_complex "overlay=main_w-overlay_w-8:8,overlay=10:10,drawtext=fontfile=verdanab.ttf:text=HelloWorld:fontcolor=white:fontsize=12:bordercolor=black:borderw=5:x=65:y=30-text_h/2,subtitles=subtitle.srt:force_style='MarginV=25,MarginL=w-(t-4.5)*w/5.5'" -c:a copy output.MP4

The following part does not work:

MarginL=w-(t-4.5)*w/5.5

I added this section to be a scrolling subtitle. However, it has no effect. It works on the 'drawtext' section but not on the 'force_style' section.

How can I solve this problem?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...