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?