I try to switch 2 video from webcam with 1 audio file looped, every 30 seconds (f.e.), but i didn't find how ....
/dev/video0 /dev/video2
to broadcast the result on youtube (rtmp) via an RPi 3+
Someone can help me ? or lightup for a way ... ?
I try to switch 2 video from webcam with 1 audio file looped, every 30 seconds (f.e.), but i didn't find how ....
/dev/video0 /dev/video2
to broadcast the result on youtube (rtmp) via an RPi 3+
Someone can help me ? or lightup for a way ... ?
Use the overlay filter with enable
option using lt
and mod
functions:
ffmpeg -i /dev/video0 -i /dev/video2 -stream_loop -1 -re -i audio.mp3 -filter_complex "[0][1]overlay=enable='lt(mod(t,60),30)'[v]" -map "[v]" -map 2:a -c:v libx264 -b:v 4000k -maxrate 4000k -bufsize 8000k -g 50 -c:a aac -f flv rtmp://youtube