0

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.
2
  • I seem to be running into problems --> what problems?
    – Gyan
    May 9, 2020 at 6:32
  • Sorry, I've updated the main post
    – Orophix
    May 9, 2020 at 11:32

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.