(GO) live555 RTSP Client (OPENRTSP) Usage considerations

Source: Internet
Author: User

1: Compiling

(1):./genmakefiles Linux(2): make 2: Server Environmentserver-side is a support for RTSP server, H. a camera; 3: Run OPENRTSP./openrtsp-d 20-f 20-w 640-h 480-b 400000 "Rtsp://192.168.2.239/id=0"or./openrtsp-f 20-w 640-h 480-b 400000 "Rtsp://192.168.2.239/id=0"parameter interpretation; -D---> Program run time, if no program continues to obtain video from the server;- f----> Frame rate- w 640-h 480-----> Frame Resolution- b 400000----> bitrate4: If you do not modify the PlayCommon.cpp code, OPENRTSP will get the video data through stdout directly to the screen 5: If you take the bare stream yourself, you can call the SPS-related function to tell the decoder the H264 frame information, otherwise it cannot decodeunsigned int num=1;Sproprecord * sps = parsespropparametersets(subsession->fmtp_spropparametersets (), num);Filesink = h264videofilesink::createnew (*env, Outfilename,subsession->fmtp_spropparametersets (),filesinkbuffersize, onefileperframe);struct Timeval tv={0,0};unsigned char start_code[4] = {0x00, 0x00, 0x00, 0x01};filesink-> AddData (Start_code, 4, TV);Filesink->adddata (SPS[0].SPROPBYTES,SPS[0].SPROPLENGTH,TV);delete[] SPS; 6: Slightly modify the code so that openrtsp only video, and save to the specified fileStreamURL = argv[1];//Add by Andy_xicreatereceivers = True; Save Videooutputavifile = False; Because it's H264 .videoonly = True;singlemedium = "video"; As long as the video//<------End 7: Debug LoggingWhen you start OPENRTSP, you must see the SPS information in the SDP information, otherwise the decoder may not decodea=fmtp:106 profile-level-id=42001e; sprop-parameter-sets=z0kaknob4aixlq==,am48ga==;p acketization-mode=0  as long as there is this information, use the file command to see the generated H264 file displayed as follows: New.h264:JVT NAL sequence, H. video, Baseline @ LReference: 1, develop your own streaming media client on the basis of Livemedia

Http://www.cnblogs.com/lidabo/p/4103476.html

(GO) live555 RTSP Client (OPENRTSP) Usage considerations

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.