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