Streaming via ffmpeg. The filter_complex option allows us to synthesize two sound sources, but is it possible to turn on/off the synthesized sound source at an arbitrary timing? One of the sound sources is audio from the microphone input, which will be on throughout the streaming. Other than that, we would like to turn on/off several sound sources at any given time.
For example, to turn on the microphone input and one sound source at all times, the following command is executed
ffmpeg -rtbufsize 100M -f dshow -video_device_number 0 -i video="my camera" -i my_audio.mp3 -filter_complex "[1:a]volume=0.05,apad[0];[0][1]amerge[out]" -map 0:v -map [out]:a -f hls -hls_segment_type fmp4 -hls_time 5 -hls_fmp4_init_filename init.mp4 hls.m3u8 -f mpegts -flush_packets 0 udp://XXX.XXX.XXX.XXX:XXX?pkt_size=1316