Does RTSP support streaming file video MP4?

2019-02-11 01:08发布

问题:

Anyone know does RTSP support MP4 for streaming? Or what file video formats that RTSP support?

回答1:

RTSP is a protocol for realtime streaming. You can stream any data, in any format you want including text, audio, video, presentation... bricks... no meter what, you can RTSP-it.

Main idea is that when new streaming session opens you have to DESCRIBE your streaming content to the client with a SDP response (Session Description Protocol). There you say "my content is video, it has N FPS, uses this codec, these are the required parameters for decoding a picture..." so the client can tell if it can reproduce the stream data.

Streaming server doesn't care for MP4, MPEG2 or any other container format... as long as the server can open a container file it can stream its contents over RTSP.

So your question should be: "Does this RTSP server implementation support MP4 file format?"



回答2:

Don't mess codec and container.

RTSP is a protocol, that allows you to create streaming session and configure details of RTP delivery.

RTP is a protocol that packs audio and video frames and send them to client.

Audio and video frames are coded with proper codecs into compressed presentation.

RTP allows you to transport such codecs as AAC, H.264, MPEG4. So perhaps you will be able to stream content of mp4 container via RTP.



回答3:

Yes.

From the RfC's abstract: The Real Time Streaming Protocol, or RTSP, is an application-level protocol for control over the delivery of data with real-time properties.

RTSP relies on SDP to announce codecs and their parameters. Good luck with composing an SDP body that accurately describes your video file, though. Video codec and transport standards in their endles combinations are a huge mess.