1
Currently, I am using this to reading a text file and scrolling it to the bottom from right to left:
ffmpeg -i rtmp://127.0.0.1/source/$name -threads 1 -c:v libx264 -profile:v baseline -b:v 128K -s 640x360 -vf "drawtext=enable='gte(t,3)':fontfile=/usr/share/fonts/dejavu/DejaVuSans.ttf:fontsize=40:fontcolor=white:textfile=/opt/stream/sample_text.txt:reload=1:y=h-line_h:x=-50*t" -f flv -c:a aac -ac 1 -strict -2 -b:a 32k rtmp://127.0.0.1/out/$name;
But it only runs once. How can I make it repeat infinitely? The text on the text file will be dynamic, sometimes it will be small and sometimes it will be big. Also, the current command only reads and scroll the first line of the file, is there any way to read and scroll full text file line by line?
See https://superuser.com/a/1026814/114058 for looping. Place all lines on a single line in the file.
– Gyan – 2019-03-21T15:52:48.343Thanks a lot, It works. But when I add more characters (text /word/sentence) to the file, scrolling is speeding up and is not readable. Any way to keep the speed fixed, no matter how long the line is? – Angel – 2019-03-21T16:52:59.800