I am trying to play live stream coming from the server with RTSP URL. A sample RTSP URL is given below:
rtsp://username:password@machine_ip/42331536059e9f21
Actually, this stream is the call between two participants (caller & called). But when I play this URL with FFPLAY, I get just one stream(called) while I should get both streams (caller and called). I am using the following command:
ffplay rtsp://username:password@machine_ip/42331536059e9f21
Am I missing some parameters along with this command to fetch all streams.
You can use ffmpeg, attach the streams to each other using vstack/hstack and pipe it through ffplay
ffmpeg\
-i "rtsp://user:[email protected]:554/" \
-i "rtsp://user:[email protected]:554/" \
-filter_complex\
"[0:v][1:v]hstack=inputs=2[v]"\
-map "[v]"\
-c:v libx264 -f nut - | ffplay -i -
or launch ffplayer twice
ffplay "rtsp://user:[email protected]:554/" &
ffplay "rtsp://user:[email protected]:554/" &
It's actually the limitation of FFPLAY that it doesn't support multiple streams at the same time.
FFplay has currently no support for playing two audio streams simultaneously.
Here is the reference of this answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With