<div dir="ltr">Hi,<div><br></div><div>I have a pipeline where I want to mux together streaming video audio and sensor readings / text data as a subtitle track to a video file. I don't want to use a text overlay to burn the subtitle to the video, just to have it as a separate track, which can be turned on or off on the client side. Also want to embed this data into the video file directly, therefore a separate srt file wont be a solution for me.</div><div><br></div><div>To achieve this I planned to use an "appsrc" element and push the text data to it programmatically from a simple python app.</div><div><br></div><div>My current pipeline looks like this:</div><div><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Menlo,Monaco,"Courier New",monospace;font-size:11px;line-height:17px;white-space:pre"><div><span style="color:rgb(206,145,120)">matroskamux name=output_queue_mux\</span></div><div>    <span style="color:rgb(86,156,214)">!</span> <span style="color:rgb(206,145,120)">filesink name=output_queue_filesink location=/data/videos_staging/0_1683496385.mkv\</span></div><div><span style="color:rgb(206,145,120)">udpsrc multicast-group=0.0.0.0 auto-multicast=true port=56001 name=input_queue_video_udpsrc\</span></div><div>    <span style="color:rgb(86,156,214)">!</span> <span style="color:rgb(206,145,120)">application/x-rtp,media=video,encoding-name=H264,payload=96,clock-rate=90000,packetization-mode=1,profile-level-id=424015,sprop-parameter-sets="Z0JAKJWgHgCJ+VA=,aM48gA==",src=1728323247,timestamp-offset=2499875162,seqnum-offset=11758,a-framerate=30\</span></div><div>    <span style="color:rgb(86,156,214)">!</span> <span style="color:rgb(206,145,120)">rtpjitterbuffer name=input_queue_video_rtpjitterbuffer ! rtph264depay name=input_queue_video_rtpdepay\</span></div><div>    <span style="color:rgb(86,156,214)">!</span> <span style="color:rgb(206,145,120)">h264parse name=input_queue_video_parse ! queue name=blocking_video_queue\</span></div><div>    <span style="color:rgb(86,156,214)">!</span> <span style="color:rgb(206,145,120)">omxh264dec ! videoconvert ! omxh264enc bitrate=8000000 control-rate=2 insert-sps-pps=true\</span></div><div>    <span style="color:rgb(86,156,214)">!</span> <span style="color:rgb(206,145,120)">output_queue_mux.\</span></div><div><span style="color:rgb(206,145,120)">udpsrc multicast-group=0.0.0.0 auto-multicast=true port=51000 name=input_queue_audio_udpsrc\</span></div><div>    <span style="color:rgb(86,156,214)">!</span> <span style="color:rgb(206,145,120)">application/x-rtp,media=audio,clock-rate=44100,encoding-name=L24,encoding-params=1,channels=1,payload=96,ssrc=687131883,timestamp-offset=3784732336,seqnum-offset=8272\</span></div><div>    <span style="color:rgb(86,156,214)">!</span> <span style="color:rgb(206,145,120)">rtpL24depay name=input_queue_audio_rtpL24depay\</span></div><div>    <span style="color:rgb(86,156,214)">!</span> <span style="color:rgb(206,145,120)">audioconvert name=input_queue_audio_audioconvert\</span></div><div>    <span style="color:rgb(86,156,214)">!</span> <span style="color:rgb(206,145,120)">input_queue_audio_adder.</span> </div><div><span style="color:rgb(206,145,120)">audiotestsrc wave=silence name=input_queue_audio_audiotestsrc\</span></div><div>    <span style="color:rgb(86,156,214)">!</span> <span style="color:rgb(206,145,120)">audiomixer name=input_queue_audio_adder\</span></div><div>    <span style="color:rgb(86,156,214)">!</span> <span style="color:rgb(206,145,120)">audioresample name=input_queue_audio_audioresample ! voaacenc name=input_queue_audio_voaacenc\</span></div><div>    <span style="color:rgb(86,156,214)">!</span> <span style="color:rgb(206,145,120)">queue name=blocking_audio_queue ! output_queue_mux.\</span></div><div><span style="color:rgb(206,145,120)">appsrc name=subtitle_appsrc format=GST_FORMAT_TIME stream-type=GST_APP_STREAM_TYPE_SEEKABLE is-live=true do-timestamp=true ! text/x-raw !queue leaky=downstream ! output_queue_mux.</span></div></div></div><div><br></div><div>My problem with this is that sensor readings are arriving occasionally (maybe no readings at all during recording) and as it does hold up the whole pipeline as it is try to wait for data from all of the inputs.</div><div><br></div><div>I have some kinda similar situation with the audio stream, which is also not reliable so I added a "audiotestsrc" to generate audio even when I don't receive anything from the stream. </div><div><br></div><div>Do you have any suggestions on what could be a solution to my problem?</div><div><br></div><div>Is there any way to mark a source option in mux? Or is there any option to achieve something similar like with the audio to always send some dummy data with timestamps to unblock the pipeline?</div><div><br></div><div>Thank you!</div><div><br></div><div>Bests,</div><div>Peter</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div>