RTMP Input UDP Unicast output

Hi all.
i have a working line off ffmpeg, getting audio and video from a rtmp server (srs), and outputting to a decoder in udp unicast.

the result of the ffprobe of the rtmp stream is this:

Stream #0:0: Data: none
Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s
Stream #0:2: Video: h264 (Constrained Baseline), yuv420p(progressive), 1280x720, 3500 kb/s, 50 fps, 50 tbr, 1k tbn

and my ffmpeg line is this:
ffmpeg -threads 1 -fflags +genpts -stream_loop -1 -re -i rtmp://XXX.XX.XX.XX:1935/live/canal -c:v copy -c:a mp2 -ab 128k -ar 48000 -threads 1 -metadata service_provider=“Linux EncoderTV” -metadata service_name=“Canal” -muxrate 7.5M -pcr_period 20 -pat_period 0.1 -sdt_period 0.25 -mpegts_flags +pat_pmt_at_frames -mpegts_flags system_b -flush_packets 0 -f mpegts ‘udp://’

Can do the same thing with gst? if so, can anyone help to make the pipeline?

Something like this perhaps (untested, and missing some config bits from the ffmpeg command line, you can check the various elements in gst-inspect-1.0 to see available configuration options):

$ gst-launch-1.0 mpegtsmux name=mux alignment=7 ! udpsink host= port=1230 \
  rtmp2src location=rtmp://.. ! flvdemux name=demux \
  demux. ! queue ! h264parse ! queue ! mux.
  demux. ! queue ! aacparse ! decodebin3 ! audioconvert ! audioresample ! audio/x-raw,rate=48000 ! twolamemp2enc bitrate=128 ! mpegaudioparse ! queue ! mux.

There’s also avenc_mp2 which could be used in place of twolamemp2enc.