Hi, Firstly I'd like to say thanks for the liveMedia library and for supporting the community! But I have a problem ...
When I run "openRTSP -b 300000 rtsp://192.168.2.101" on the H.264 stream of my IP camera it works perfectly, but when I tried modifying testRTSPClient to do the equivalent (ie: saving NAL packets to a H264 raw bitstream file), it works perfectly sometimes but occasionally the video looks broken. I compared the output using h264bitstream ( https://github.com/aizvorski/h264bitstream) and found the difference to be that sometimes my testRTSPClient code isn't saving an IDR frame and that seems to be causing the weird videos. Anyway, here is the code I used inside testRTSPClient, I basically got testRTSPClient to call the same functions as openRTSP, so I assume there is something else I have to do to get testRTSPClient handling H264 correctly: I replaced the line in continueAfterSETUP() of testRTSPClient.cpp from: scs.subsession->sink = DummySink::createNew(env, *scs.subsession, rtspClient->url()); With this code (taken from createOutputFiles() in playCommon.cpp): FileSink* fileSink = NULL; if (strcmp(scs.subsession->mediumName(), "video") == 0) { if (strcmp(scs.subsession->codecName(), "H264") == 0) { char outFileName[1000] = "video.264"; unsigned int fileSinkBufferSize = 300000; // For H.264 video stream, we use a special sink that adds 'start codes', // and (at the start) the SPS and PPS NAL units: fileSink = H264VideoFileSink::createNew(env, outFileName, scs.subsession->fmtp_spropparametersets(), fileSinkBufferSize); } } scs.subsession->sink = fileSink; Is there anything that needs to be done to testRTSPClient so it generates H264 raw bitstream files properly? Cheers, Shervin Emami. Senior Embedded Vision Engineer, DIB Australia.
_______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel