10

I have a question, if I use nginx for RTMP stream, can this function to stream video with RTSP?

What are the differences between RTSP and RTMP? Can I use my RTMP server to stream with the RTSP protocol?

Sorry for my English.

2
  • 1
    so is there a way to do that (from rtmp to rtsp)?
    – Ozan
    Oct 13, 2017 at 8:15
  • Did you ever find a solution for this? May 23, 2019 at 10:32

3 Answers 3

0

This is an old question but I want to clarify some concepts for future visitors.

I have a question, if I use nginx for RTMP stream, can this function to stream video with RTSP?

The answer is NO. Your nginx server will stream using the RTMP protocol. What you can do is: Receive a stream from a RTSP protocol and convert it into a RTMP protocol using ffmpeg.

What are the differences between RTSP and RTMP? Can I use my RTMP server to stream with the RTSP protocol?

The main difference is that they are different protocols. It is like talking about UDP and TCP. U can't send data using UDP and receive it using TCP. What you can do is send data using UDP receive it using UDP and the re-send it using TCP. So that is what we gonna do here.

-1

Using nginx-rtmp, you still can add on-the-fly encoding of your RTMP stream to RTSP using ffmpeg. Example of the config:

rtmp {
   access_log /var/log/nginx/rtmp_access.log;
   server {
       listen 1935;
       ping 30s;
       notify_method get;
       application camera1 {
           live on;
           exec_pull ffmpeg -i rtsp://admin:[email protected]/axis-media/media.amp -threads 2 -f flv -r 25 -s 1280x720 -an rtmp://localhost:1935/cam1/stream 2>>/var/log/nginx/ffmpeg.log;
       }
   }
}
3
  • 12
    You are converting from RTSP to RTMP in that example, hence your answer is misleading.
    – ouija
    Sep 3, 2015 at 0:41
  • 3
    Is there a way to convert RTMP to RTSP/RTP? Feb 23, 2016 at 22:46
  • 2
    This is misleading. You are pulling from rtsp source and converting it to rtmp.
    – Amin Husni
    Jul 20, 2017 at 15:29
-9

RTMP - proprietary protocol from Adobe, RTSP is open standard from IETF. They are not compatible with each other.

1
  • 4
    RTMP was open sourced a long time ago.
    – cdanea
    Nov 24, 2016 at 8:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.