ffmpeg -i inputfile1 -i inputfile2 -y \
-filter_complex '[0:0] [0:1] [1:0] [1:1] concat=n=2:v=1:a=1 [v] [a];\
[v]drawtext=fontsize=72:fontcolor=White:fontfile=/usr/share/fonts/truetype/DejaVuSans.ttf:text=Text Line To Render:x=(w)/2:y=(h)/2[o]'\
-map '[o]' -map '[a]' ...other encoding parameters... outputfile
[a] are just labels – you could very well use
[q] and that would be fine too. Only stream 0 goes to first label and stream 1 to second label. So I'm assuming stream 0 is video.
You have to ensure that the streams in
inputfile2 have the same order. Then we pass the output of video stream as input to the drawtext filter by saying
The output of this is now labeled as
[o] at the end of the
drawtext parameters. By saying
-map [o], we use the output from
drawtext to pass on forward to your other encoding parameters.
The font path I'm using is from OpenSUSE. Yours could be different.