<p>I'm trying to do a livestream with a video loop, sound from the desktop and an overlay image that updates when I replace the file and a text that also updates when a file is replace but I seem to be running into problems. Any help is most appreciated:</p>

<pre><code>VID=lol.mp4
STREAM_KEY=rmeow
TEXT=current.txt
COLOR="0xFFFFFF"
BCOLOR="0x000000"

ffmpeg -re -f alsa -i hw:Loopback,1,0 -framerate 10 -f image2 -loop 1 -i image.jpg -filter_complex overlay -stream_loop -1 -i $VID \
-c:v libx264 -preset veryfast -b:v 1984k -maxrate 1984k -bufsize 3968k -vf "scale=1280:-1,format=yuv420p" -g 20 -c:a aac -b:a 128k -ar 44100 \
-vf drawtext="fontfile=/usr/share/fonts/truetype/slant.ttf:bordercolor=$BCOLOR: borderw=1: fontcolor=$COLOR:textfile=$TEXT:reload=1:y=10:x=5:fontsize=38" \
-f flv "rtmp://live.restream.io/live/$STREAM_KEY" \

2&gt; log_stream.txt
</code></pre>

<p>Output:</p>

<pre><code>Only '-vf drawtext=fontfile=/usr/share/fonts/truetype/slant.ttf:bordercolor=0x000000: borderw=1: fontcolor=0xFFFFFF:textfile=current_song.txt:reload=1:y=10:x=5:fontsize=38' read, ignoring remaining -vf options: Use ',' to separate filters
Filtergraph 'drawtext=fontfile=/usr/share/fonts/truetype/slant.ttf:bordercolor=0x000000: borderw=1: fontcolor=0xFFFFFF:textfile=current_song.txt:reload=1:y=10:x=5:fontsize=38' was specified through the -vf/-af/-filter option for output stream 0:0, which is fed from a complex filtergraph.
-vf/-af/-filter and -filter_complex cannot be used together for the same stream.
</code></pre>

CC BY-SA 4.0
2020-05-09T06:32:55.780Z
*I seem to be running into problems* --> what problems?
Gyan
CC BY-SA 4.0
2020-05-09T11:32:06.183Z
Sorry, I've updated the main post
Orophix
<ffmpeg><streaming><linux>
FFMPEG Live stream loop with overlay - Errors
Orophix
# FFMPEG Live stream loop with overlay - Errors

(Asked by: username_0 on 2020-05-09)

I'm trying to do a livestream with a video loop, sound from the desktop and an overlay image that updates when I replace the file and a text that also updates when a file is replace but I seem to be running into problems. Any help is most appreciated:
VID=lol.mp4
STREAM_KEY=rmeow
TEXT=current.txt
COLOR="0xFFFFFF"
BCOLOR="0x000000"

ffmpeg -re -f alsa -i hw:Loopback,1,0 -framerate 10 -f image2 -loop 1 -i image.jpg -filter_complex overlay -stream_loop -1 -i $VID \
-c:v libx264 -preset veryfast -b:v 1984k -maxrate 1984k -bufsize 3968k -vf "scale=1280:-1,format=yuv420p" -g 20 -c:a aac -b:a 128k -ar 44100 \
-vf drawtext="fontfile=/usr/share/fonts/truetype/slant.ttf:bordercolor=$BCOLOR: borderw=1: fontcolor=$COLOR:textfile=$TEXT:reload=1:y=10:x=5:fontsize=38" \
-f flv "rtmp://live.restream.io/live/$STREAM_KEY" \

2> log_stream.txt

Output:
Only '-vf drawtext=fontfile=/usr/share/fonts/truetype/slant.ttf:bordercolor=0x000000: borderw=1: fontcolor=0xFFFFFF:textfile=current_song.txt:reload=1:y=10:x=5:fontsize=38' read, ignoring remaining -vf options: Use ',' to separate filters
Filtergraph 'drawtext=fontfile=/usr/share/fonts/truetype/slant.ttf:bordercolor=0x000000: borderw=1: fontcolor=0xFFFFFF:textfile=current_song.txt:reload=1:y=10:x=5:fontsize=38' was specified through the -vf/-af/-filter option for output stream 0:0, which is fed from a complex filtergraph.
-vf/-af/-filter and -filter_complex cannot be used together for the same stream.

**Tags:** ffmpeg, streaming, linux

> **Comments:**
> **username_1**: *I seem to be running into problems* --> what problems?  
> **username_0**: Sorry, I've updated the main post  

---

## 0 answers

