Hi,
I have created the below pipeline to capture and save 2 1080p streams with separate audio in each stream with preview.
gst-launch-1.0 -e v4l2src device=/dev/video0 ! tee name=t1 t1. ! queue ! video/x-raw, width=1920, height=1080, framerate=60/1 ! videorate ! video/x-raw, width=1920, height=1080, framerate=30/1 ! nvvidconv ! queue ! nvv4l2h264enc maxperf-enable=1 bitrate=4000000 profile=4 ! queue ! h264parse ! queue ! mux. alsasrc device=“hw:2,0” ! queue ! audio/x-raw ! queue ! audioresample ! “audio/x-raw,rate=44100” ! queue ! voaacenc ! queue ! mp4mux name=mux ! filesink location=feed1mp1080HW1.mp4 v4l2src device=/dev/video1 ! tee name=t2 t2. ! queue ! video/x-raw, width=1920, height=1080, framerate=60/1 ! videorate ! video/x-raw, width=1920, height=1080, framerate=30/1 ! nvvidconv ! queue ! nvv4l2h264enc maxperf-enable=1 bitrate=4000000 profile=4 ! queue ! h264parse ! queue ! mux2. alsasrc device=“hw:3,0” ! queue ! audio/x-raw ! queue ! audioresample ! “audio/x-raw,rate=44100” ! queue ! voaacenc ! queue ! mp4mux name=mux2 ! filesink location=feed2mp1080HW1.mp4 videotestsrc pattern=black ! video/x-raw,width=320,height=240 ! nvvidconv ! queue ! comp.sink_0 t1. ! queue ! video/x-raw, width=1920, height=1080, framerate=60/1 ! videorate ! video/x-raw, width=1920, height=1080, framerate=30/1 ! nvvidconv ! queue ! “video/x-raw(memory:NVMM),width=960,height=540,format=NV12” ! queue ! comp.sink_1 t2. ! queue ! video/x-raw, width=1920, height=1080, framerate=60/1 ! videorate ! video/x-raw, width=1920, height=1080, framerate=30/1 ! nvvidconv ! queue ! ‘video/x-raw(memory:NVMM),width=960,height=540,format=NV12’ ! queue ! comp.sink_2 nvcompositor name=comp sink_0::width=1920 sink_0::height=1080 sink_1::xpos=0 sink_1::ypos=270 sink_1::width=960 sink_1::height=540 sink_2::xpos=960 sink_2::ypos=270 sink_2::width=960 sink_2::height=540 ! nvvidconv ! nvoverlaysink
In my application I have to do the following simultaneously
- Record 2 1080p streams with audio in each stream - done
- Preview the 2 streams -done
- Mix and play the audio streams through HDMI - not done
My requirement is to incoperate audio playback through HDMI to the above pipeline. What gstreamer method can be used here without affecting the recording ?
I was able to find the HDMI playback device via aplay -l
Thanks in advance