# Plays 4 videos in a 2x2 grid with audio of all 4 videos mpv video_01.mp4 --external-file=video_02.mp4 --external-file=video_03.mp4 --external-file=video_04.mp4 --lavfi-complex='[vid1] [vid2] hstack [t1] ; [vid3] [vid4] hstack [t2] ; [t1] [t2] vstack [vo];[aid1][aid2][aid3][aid4]amix=inputs=4[ao]' # Play 2 videos of different resolutions cam_01="rtsp://thingino:thingino@camera-01:554/ch0" cam_02="http://192.168.1.150:8081" scale="1280:720" mpv --lavfi-complex="[vid1]scale=${scale}[scaled1];[vid2]scale=${scale}[scaled2];[scaled1][scaled2]hstack[vo];" "$cam_01" --external-file="$cam_02"