RTP for Timeless recording

Hi everyone.

I am trying to transform a recording video in a timeless recording video to be able to loop it with the multifilesrc.

I use the following command to pass the mp4 through udp

gst-launch-1.0 filesrc location="some/path/mp4" ! queue ! decodebin name="decodebin"  \
      decodebin. ! "video/x-raw" ! videoconvert ! x264enc ! h264parse config-interval=-1 ! rtph264pay pt=96 ! mux. \
      decodebin. ! "audio/x-raw" ! audioconvert ! avenc_aac ! aacparse ! rtpmp4apay pt=96 ! mux. \
      rtpmux name=mux ! rtpstreampay name=pay0 ! udpsink host= port=10600 

and then i use this command for recording:

gst-launch-1.0 udpsrc port=10600 ! application/x-rtp-stream ! rtpstreamdepay name=pay1 \
      pay1. ! application/x-rtp,media=video ! rtph264depay ! h264parse ! video/x-h264,alignment=au ! mp4mux name=mux \
      pay1. ! application/x-rtp,media=audio ! rtpL16depay ! audio/x-raw ! audioconvert ! avenc_aac name="audio_encoder" ! "audio/mpeg" ! aacparse ! audio/mpeg ! mux. \
      mux. ! filesink location=my_timeless_file.mp4

the problem is that i get an error that “pay1.” can not be linked with “rtpL16depay” and i dont find the reason.

Could you help me to understand or if there is another approach to get a timeless recording.

I suspect the reason is that rtpstreamdepay has only a single source pad, and you can only link a source pad to one other sink pad.

If you want to duplicate a stream you need to use a tee element, then you can access the stream multiple times from there.

A rtpptdemux or rtpssrcdemux might also help to de-bundle the two streams.

I’m not sure if you’ll get a proper EOS on your receiver like that (which will be needed if you want the mp4 file to be finalised properly, so that it’s playable). You can of course pass -e to gst-launch and then it will be sent by gst-launch if you control-C but that’s probably not what you’re after?

Hi tmp, sorry for the late response. I manage to use the timeless recording audio by adding it a mock audio. regarding the recommendation for the command the tee works good but the outfile was corrupted for some reason. thanks for your response