问题
This is the mosaic code GStreamer 2x2
gst-launch-1.0 -e \ videomixer name=mix \ sink_0::xpos=0 sink_0::ypos=0 sink_0::alpha=0\ sink_1::xpos=0 sink_1::ypos=0 \ sink_2::xpos=200 sink_2::ypos=0 \ sink_3::xpos=0 sink_3::ypos=100 \ sink_4::xpos=200 sink_4::ypos=100 \ rtmpsrc location='rtmp://streaming.example.com:1935/209147924'\ ! decodebin name=dec1 ! videoconvert ! videoscale \ ! video/x-raw,width=200,height=100 \ ! mix.sink_1 \ decodebin1. ! queue ! audioconvert ! audiomixer name=amix \ rtmpsrc location='rtmp://streaming.example.com:1935/209147925'\ ! decodebin name=dec2 ! videoconvert ! videoscale \ ! video/x-raw,width=200,height=100 \ ! mix.sink_2 \ decodebin2. ! queue ! audioconvert ! amix. \ rtmpsrc location='rtmp://streaming.example.com:1935/209147926'\ ! decodebin name=dec3 ! videoconvert ! videoscale \ ! video/x-raw,width=200,height=100 \ ! mix.sink_3 \ decodebin3. ! queue ! audioconvert ! amix. \ rtmpsrc location='rtmp://streaming.example.com:1935/209147927'\ ! decodebin name=dec4 ! videoconvert ! videoscale \ ! video/x-raw,width=200,height=100 \ ! mix.sink_4 \ decodebin4. ! queue ! audioconvert ! amix. \ mix. ! queue ! videoconvert ! x264enc ! flvmux name=mux streamable=true ! queue ! rtmpsink location='rtmp://streaming.example.com:1935/test' dec1. ! queue ! audioconvert ! audiomixer name=amix \ dec2. ! queue ! audioconvert ! amix. \ dec3. ! queue ! audioconvert ! amix. \ dec4. ! queue ! audioconvert ! amix. \ amix. ! audioconvert ! audioresample ! audio/x-raw,rate=48000 ! voaacenc bitrate=96000 ! audio/mpeg ! aacparse ! audio/mpeg, mpegversion=4 ! mux.
Thank you for your farewell. Working code.
来源:https://stackoverflow.com/questions/52534611/add-sound-to-the-gstreamer-mosaic