loop all videos from folder to rtmp stream
You could do this by looping over the videos in a subshell, and piping to another copy of ffmpeg to generate the RTMP stream. For example:

(for j in *.mp4; do
    ffmpeg -threads 2 -re -fflags +genpts -i $j \
        -i '/c/Users/user/Desktop/ffmpeg_logo/mylogo.png' -filter_complex 'overlay=W-w-50:H-h-25' \
        -vcodec libx264 -profile:v baseline -b:v 2000k -r 24 -maxrate 2000k -bufsize 2000k  \
        -ac 2 -ar 44100 -g 48 -c:a aac -b:a 64k \
        -f mpegts -
done) | ffmpeg -f mpegts -i - -c copy -bsf:a aac_adtstoasc -f flv rtmp://user:password@ip:1935/live/mystream


Notice the brackets around the for loop; that creates a subshell to run the first read &amp; encode ffmpeg command. The output from that command is sent over the stdout ("standard output") pipe to the input of the second ffmpeg command, which generates the RTMP stream. The syntax for that is using - as the name of the input or output file.

I've had to include a bitstream filter aac_adtstoasc because I've used an MPEG Transport Stream as the format on the pipe as well.