I want to add a logo (png file with transparency) on top of my rtmp stream, i tried it with following command (adding -c:v prores_ks which is supposed to support alpha channel), but don't see any changes on the logo displayed (the supposedly transparent area is replaced with white pixels):

/var/lib/snapd/snap/bin/ffmpeg -threads 1 -i rtmp://$key -stream_loop -1 -i /home/apache/$key/logo.png -stream_loop -1 -i /home/apache/$key/prod.jpg -filter_complex "[0][1]overlay=x=10:y=10[v1];[v1][2]overlay=x=main_w-overlay_w-5:y=10[v2]" -map "[v2]" -map 0:a -framerate 25 -ar 44100 -c:a copy -b:a 20000k -movflags +faststart -preset medium -crf 1 -tune zerolatency -maxrate 20000k -c:v prores_ks -vcodec libx264 -fflags nobuffer -g 60 -max_muxing_queue_size 1024 -f flv pipe:1 | /var/lib/snapd/snap/bin/ffmpeg -threads 1 -i pipe:0 -vf drawtext="textfile=/home/apache/$key/rolling.txt: reload=1: fontcolor=white: fontsize=20: box=1: boxcolor=black@0.5: boxborderw=5: y=((h)-20):x=w-(mod(4*n,w+tw)-tw/40)" -nostats -loglevel 0 -framerate 25 -ar 44100 -c:a libfdk_aac -b:a 20000k -movflags +faststart -preset medium -crf 1 -tune zerolatency -maxrate 20000k -vcodec libx264 -fflags nobuffer -g 60 -max_muxing_queue_size 1024 -bsf:a aac_adtstoasc -map 0 -flvflags no_duration_filesize -flags +global_header -f tee '[f=flv:onfail=ignore]'rtmp://$key'|[f=flv:onfail=ignore]'rtmps://live-api-s.facebook.com:443/rtmp/$stream_key1'' 2> /dev/null

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.