<p>Ok I've found the solution that works, it was <a href="https://stackoverflow.com/a/8197837/592005">here</a> all along but needed some changes (link only since it's link to the stackoverflow)</p>

CC BY-SA 3.0
2016-10-12T13:35:41.750Z
2016-10-12T13:35:41.750Z
2017-05-23T12:40:36.170Z
Pawel K
<p>Hi I'm currently trying to use gstreamer-1.0 to consume rtsp source and provide RTP streams for audio and video in the streams (for Janus Gateway). I have a working solution with ffmpeg so basically would need help to translate this to working gstreamer pipeline.</p>

<pre><code>ffmpeg -rtsp_transport tcp -i rtsp://ip:port/h264.sdp \
-an -c:v h264 -profile:v baseline -preset ultrafast -tune zerolatency -vf "fps=20" -bsf:v h264_mp4toannexb  -f rtp rtp://localhost:8004 \
-vn -acodec copy -f rtp rtp://localhost:8005
</code></pre>

<p>Currenlty I have only this:</p>

<pre><code>gst-launch-1.0 rtspsrc location=rtsp://ip:port/h264.sdp latency=0 protocols=tcp ! rtph264depay ! rtph264pay name=pay0 pt=96 ! udpsink port=8004 host=localhost
</code></pre>

<p>but this is not transcoding, and by itself the stream is not playable (strangely it works if I start the ffmpeg example to see video and then run gst but this is beyond the point here), so I would like to have x264 transcoding (re-encoding?) to baseline profile with minimum processing power required.</p>

<ffmpeg><streaming>
Gstreamer 1.0 rtspsrc to rtp (audio and video)
Pawel K
# Gstreamer 1.0 rtspsrc to rtp (audio and video)

(Asked by: username_0 on 2016-10-12)

Hi I'm currently trying to use gstreamer-1.0 to consume rtsp source and provide RTP streams for audio and video in the streams (for Janus Gateway). I have a working solution with ffmpeg so basically would need help to translate this to working gstreamer pipeline.
ffmpeg -rtsp_transport tcp -i rtsp://ip:port/h264.sdp \
-an -c:v h264 -profile:v baseline -preset ultrafast -tune zerolatency -vf "fps=20" -bsf:v h264_mp4toannexb  -f rtp rtp://localhost:8004 \
-vn -acodec copy -f rtp rtp://localhost:8005

Currenlty I have only this:
gst-launch-1.0 rtspsrc location=rtsp://ip:port/h264.sdp latency=0 protocols=tcp ! rtph264depay ! rtph264pay name=pay0 pt=96 ! udpsink port=8004 host=localhost

but this is not transcoding, and by itself the stream is not playable (strangely it works if I start the ffmpeg example to see video and then run gst but this is beyond the point here), so I would like to have x264 transcoding (re-encoding?) to baseline profile with minimum processing power required.

**Tags:** ffmpeg, streaming


---

## 1 answers

### Answer by username_0 on 2016-10-12. Score: 0 | Accepted answer

Ok I've found the solution that works, it was [here](https://stackoverflow.com/a/8197837/592005) all along but needed some changes (link only since it's link to the stackoverflow)


---

