RTP RTSP implementation in javascript - Stack Overflow

I have a client program and a server program. The server is on my localhost and it has my .mpeg video.U

I have a client program and a server program. The server is on my localhost and it has my .mpeg video.

Using node JS I am supposed to stream a video from a server. The client requests messages, such as play/pause/resume/rewind etc. so I guess I have to use RTSP, to figure out what to send over the RTP. But I don't know from where to start.

All I have so far is the RegEx to filter the message, for example on the client there are buttons like play/pause/setup etc. so I can grab that text. And I have a switch. But if I get setup what I should I do?

P.S I am not allowed to use RTSP modules or RTP modules. Gotta do it all from scratch.

I have a client program and a server program. The server is on my localhost and it has my .mpeg video.

Using node JS I am supposed to stream a video from a server. The client requests messages, such as play/pause/resume/rewind etc. so I guess I have to use RTSP, to figure out what to send over the RTP. But I don't know from where to start.

All I have so far is the RegEx to filter the message, for example on the client there are buttons like play/pause/setup etc. so I can grab that text. And I have a switch. But if I get setup what I should I do?

P.S I am not allowed to use RTSP modules or RTP modules. Gotta do it all from scratch.

Share Improve this question edited Feb 15, 2013 at 4:41 twix asked Feb 15, 2013 at 3:33 twixtwix 111 silver badge4 bronze badges 9
  • 2 Could you improve that title? It's truly meaningless to me. – John Saunders Commented Feb 15, 2013 at 3:57
  • how do you want me to improve it? – twix Commented Feb 15, 2013 at 4:20
  • What is your problem with your "RTP?RTSP implementation in javascript" – John Saunders Commented Feb 15, 2013 at 4:22
  • I don't know from where to start. I made my server grab requests from the client such as pause,play resume. but when I get these mands what do I do? I have the video.mpeg how do I use the rtp to send it to the client – twix Commented Feb 15, 2013 at 4:27
  • are you using html5 with websocket? – thang Commented Feb 15, 2013 at 4:45
 |  Show 4 more ments

1 Answer 1

Reset to default 3

When streaming mpeg file over the wire you will have to tackle RTSP and RTP separately. RTSP is used for signaling, session establishing and starting the underlying RTP stream.If you need to do this in node.js, I remend loading a library that already implements RTSP/RTP(creating your own is quite a undertaking, but it is doable as well).

Some info on loading c++ libraries in node.js that: How can I use a C++ library from node.js?

So basically, from you mpeg file, you need to extract raw h264 stream. For this I remend ffmpeg or some other libraries/code that understands mpeg file structure. Then you need to packetize the encoded frames inside of RTP packets; which you will then send back to the client from the server. The client will then depacketize the encoded frames into actual frame; and then decoded/display them on the screen .

I remend reading http://www.ietf/rfc/rfc3984.txt for info on standard way to packetize H264 video.

This is all very general approach, but it gives you a general idea. Hopefully this info helps, good luck.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745156333a4614142.html

相关推荐

  • RTP RTSP implementation in javascript - Stack Overflow

    I have a client program and a server program. The server is on my localhost and it has my .mpeg video.U

    17小时前
    60

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信