25

I have an IP camera which is streaming via RTSP and RTP. Ideally I would like to convert RTSP to RTMP to stream it to LiveStream or similar streaming services. Can anyone please let me know how can I convert RTSP to RTMP for the purpose of streaming it to streaming services?

Juliën
  • 9,047
  • 7
  • 49
  • 80
Namesniper
  • 355
  • 1
  • 4
  • 10

4 Answers4

13

Using FFMPEG you can convert rtsp stream to rtmp

For Example

ffmpeg -i "[your rtsp link]" -f flv -r -s -an "[Your rtmp link]"

run the above syntax on ubuntu or linux os . it will convert your rtsp stream to rtmp stream

  • I know I'm late to the party, but when I use this particular syntax, I get the error: `"Invalid framerate value: -s"`. **I'm on windows** and I got ffmpeg from this [link](https://ffmpeg.zeranoe.com/builds/). I looked at the [documentation](https://www.ffmpeg.org/ffmpeg-all.html#Video-and-Audio-file-format-conversion) of ffmpeg about the `-s` option and added my resolution but it didn't help either.. – LoukMouk Aug 21 '18 at 18:35
  • 2
    Actually I manage to start YT stream with `ffmpeg -an -rtsp_transport tcp -i "[your rtsp link]" -tune zerolatency -vcodec libx264 -pix_fmt + -c:v copy -f flv "[Your rtmp link]" ` – Mladen Janjetovic Jun 16 '20 at 15:15
  • DOES NOT WORK for me, invalid frame rate for KEVIN and the youtube receive no data for Mladen Solution. Need to read the Doc and will update if i find out the solution. – troydo42 May 10 '22 at 08:49
3

After some extensive research, I have found that almost all RTSP->RTMP "solution" providers use Wowza 2 to convert RTSP->RTMP. Thats it. Once you tell them that you need anything else too, like to convert MPEG4 part 2 to MPEG4 part 10(H.264), they tell you that they cant do that.

Wowza 3, which will be released in October 2011, will have a transcoding module which which should be able to transcode the content in addition to RTSP->RTMP stream conversion.

other potential options are: VLCplayer mPlayer FFmpeg

I am still researching and will update this topic once I am done.

PengOne
  • 48,188
  • 17
  • 130
  • 149
Namesniper
  • 355
  • 1
  • 4
  • 10
  • This looks suspiciously too much like advertising for the mentioned commercial product. It is also probably false that "almost all" use that specific product as there is no sustainable evidence provided. – Ariel M. Jan 19 '22 at 17:42
1

To summarize your options, you can use one of the following streaming servers: Wowza, Unreal Media Server, crtmpserver, erlyvideo. All of them will receive RTSP stream and re-stream it with RTMP.

user1390208
  • 1,866
  • 20
  • 20
0

You can also use Gstreamer for it. Just create a rtsp/rtp client (source), pipe it to mux optionally (If you need any transcode, you can append here) and sink to rtmp. Compared to VLC, the performance will be faster and it is free compared to Wowza.

Deniz Beker
  • 1,984
  • 1
  • 18
  • 22