Since you actually asked 3 questions, let's go through it one after the other.
- If you want two separate outputs containing different streams, you need to explicitly map them. Your command starts just like your example, but after setting the input, you map everything that's supposed to go into your first output (stream or file doesn't matter) and set the target (file or stream), then map the streams for your 2nd output and set the target.
- To overlay a logo, you set your logo image as source and then add it to the video with the overlay filter. This is really easy with just one video stream, but since you have two video streams, and I guess you want the logo in both, you need a complex filter. See FFmpeg Documentation for overlay filter for more details.
- The use of complex filters alters the way you need to map your streams. Basically you map the input streams not to your files, but to your filters instead. Then you map your filters' output to your files. In the command below I'll use labelled pads for that, see ffmpeg filters documentation for details.
- Also using any kind of video filter conflicts with streamcopying (the option
-c:v copy
from your question). You need to set an encoder for this type of streaming. In the following example I'll use libx264 as this is widely compatible with most devices and shouldn't be too much in terms of hardware requirements. In terms of efficiency and bandwidth of course libx265 would be better, but will be too much to encode in real time on many devices. Even better would be a hardware encoder, but to answer this, you need to know on what device exactly the code will be run. Impossible to tell that with a generic command.
- You can set an audio file as 3rd source and loop it infinitely with
-stream_loop -1 -i your_audio_file_here
All together you command will look like this, placing the logo in the top left corner:
ffmpeg -stimeout 5000000 -rtsp_transport tcp /
-i "rtsp://admin:[email protected]:554/Streaming/Channels/101/" /
-stimeout 5000000 -rtsp_transport tcp /
-i "rtsp://admin:[email protected]:554/Streaming/Channels/101/" /
-i your_logo_image_here -stream_loop -1 -i your_audio_file_here /
-filter_complex "[0:v:0][2]overlay[video1]; [1:v:0][2]overlay[video2]" /
-map "[video1]" -map 3 -c:v libx264 -preset faster -c:a aac -f mpegts udp://176.xxx.xxx.126:91?pkt_size=1316 /
-map "[video2]" -map 3 -c:v libx264 -preset faster -c:a aac -f mpegts udp://176.xxx.xxx.126:92?pkt_size=1316